diff options
author | Clement Lefebvre <[email protected]> | 2015-10-15 21:14:45 +0100 |
---|---|---|
committer | Clement Lefebvre <[email protected]> | 2015-10-15 21:14:45 +0100 |
commit | d952904cceb4e0380cfb1219a499c1abc4b77926 (patch) | |
tree | 2740a9b825765871b2fc4dc27d12623c08c2e428 | |
parent | c5ca0c2b71f4178341fc05e258d3541efc603761 (diff) | |
download | mate-panel-d952904cceb4e0380cfb1219a499c1abc4b77926.tar.bz2 mate-panel-d952904cceb4e0380cfb1219a499c1abc4b77926.tar.xz |
Don't change position/right-stick of locked applets
Until position calculations are refactored to fix the issue of the panel applets
getting reordered on resolution changes don't save position/right-stick on locked applets.
-rw-r--r-- | mate-panel/applet.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mate-panel/applet.c b/mate-panel/applet.c index df58e389..9fdadf53 100644 --- a/mate-panel/applet.c +++ b/mate-panel/applet.c @@ -1199,6 +1199,17 @@ mate_panel_applet_save_position (AppletInfo *applet_info, "position" properties of an applet that may in fact be locked down. So check if these are writable before attempting to write them */ + locked = panel_widget_get_applet_locked (panel_widget, applet_info->widget) ? 1 : 0; + if (g_settings_get_boolean (applet_info->settings, PANEL_OBJECT_LOCKED_KEY) ? 1 : 0 != locked) + g_settings_set_boolean (applet_info->settings, PANEL_OBJECT_LOCKED_KEY, locked); + + if (locked) { + // Until position calculations are refactored to fix the issue of the panel applets + // getting reordered on resolution changes... + // .. don't save position/right-stick on locked applets + return; + } + right_stick = panel_is_applet_right_stick (applet_info->widget) ? 1 : 0; if (g_settings_is_writable (applet_info->settings, PANEL_OBJECT_PANEL_RIGHT_STICK_KEY) && (g_settings_get_boolean (applet_info->settings, PANEL_OBJECT_PANEL_RIGHT_STICK_KEY) ? 1 : 0) != right_stick) @@ -1211,10 +1222,6 @@ mate_panel_applet_save_position (AppletInfo *applet_info, if (g_settings_is_writable (applet_info->settings, PANEL_OBJECT_POSITION_KEY) && g_settings_get_int (applet_info->settings, PANEL_OBJECT_POSITION_KEY) != position) g_settings_set_int (applet_info->settings, PANEL_OBJECT_POSITION_KEY, position); - - locked = panel_widget_get_applet_locked (panel_widget, applet_info->widget) ? 1 : 0; - if (g_settings_get_boolean (applet_info->settings, PANEL_OBJECT_LOCKED_KEY) ? 1 : 0 != locked) - g_settings_set_boolean (applet_info->settings, PANEL_OBJECT_LOCKED_KEY, locked); } const char * |