prefs: Add draggable_border_width preference

https://bugzilla.gnome.org/show_bug.cgi?id=644930
This commit is contained in:
Jasper St. Pierre 2011-07-20 02:14:58 -04:00
parent ce9c7a210d
commit 6f5882302f
4 changed files with 38 additions and 1 deletions

View File

@ -594,6 +594,7 @@ prefs_changed_callback (MetaPreference pref,
switch (pref)
{
case META_PREF_THEME:
case META_PREF_DRAGGABLE_BORDER_WIDTH:
meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE);
meta_display_retheme_all ();
break;

View File

@ -68,6 +68,7 @@
#define KEY_LIVE_HIDDEN_WINDOWS "/apps/mutter/general/live_hidden_windows"
#define KEY_WORKSPACES_ONLY_ON_PRIMARY "/apps/mutter/general/workspaces_only_on_primary"
#define KEY_DRAGGABLE_BORDER_WIDTH "/apps/mutter/general/draggable_border_width"
#define KEY_NO_TAB_POPUP "/apps/metacity/general/no_tab_popup"
@ -100,6 +101,7 @@ static gboolean gnome_accessibility = FALSE;
static gboolean gnome_animations = TRUE;
static char *cursor_theme = NULL;
static int cursor_size = 24;
static int draggable_border_width = 10;
static gboolean resize_with_right_button = FALSE;
static gboolean edge_tiling = FALSE;
static gboolean force_fullscreen = TRUE;
@ -493,6 +495,11 @@ static MetaIntPreference preferences_int[] =
&cursor_size,
1, 128, 24,
},
{ "/apps/mutter/general/draggable_border_width",
META_PREF_DRAGGABLE_BORDER_WIDTH,
&draggable_border_width,
0, 64, 10,
},
{ NULL, 0, NULL, 0, 0, 0, },
};
@ -1987,6 +1994,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_NO_TAB_POPUP:
return "NO_TAB_POPUP";
case META_PREF_DRAGGABLE_BORDER_WIDTH:
return "DRAGGABLE_BORDER_WIDTH";
}
return "(unknown)";
@ -3040,6 +3050,12 @@ meta_prefs_set_no_tab_popup (gboolean whether)
#endif
}
int
meta_prefs_get_draggable_border_width (void)
{
return draggable_border_width;
}
#ifndef HAVE_GCONF
static void
init_button_layout(void)

View File

@ -63,7 +63,8 @@ typedef enum
META_PREF_FORCE_FULLSCREEN,
META_PREF_LIVE_HIDDEN_WINDOWS,
META_PREF_WORKSPACES_ONLY_ON_PRIMARY,
META_PREF_NO_TAB_POPUP
META_PREF_NO_TAB_POPUP,
META_PREF_DRAGGABLE_BORDER_WIDTH
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@ -142,6 +143,8 @@ gboolean meta_prefs_get_workspaces_only_on_primary (void);
gboolean meta_prefs_get_no_tab_popup (void);
void meta_prefs_set_no_tab_popup (gboolean whether);
int meta_prefs_get_draggable_border_width (void);
/* XXX FIXME This should be x-macroed, but isn't yet because it would be
* difficult (or perhaps impossible) to add the suffixes using the current
* system. It needs some more thought, perhaps after the current system

View File

@ -68,5 +68,22 @@
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/draggable_border_width</key>
<applyto>/apps/mutter/general/draggable_border_width</applyto>
<owner>mutter</owner>
<type>int</type>
<default>10</default>
<locale name="C">
<short>Draggable border width</short>
<long>
The amount of total draggable borders. If the theme's visible
borders are not enough, invisible borders will be added to meet
this value.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>