summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Lefebvre <[email protected]>2015-10-15 21:14:45 +0100
committerClement Lefebvre <[email protected]>2015-10-15 21:14:45 +0100
commitd952904cceb4e0380cfb1219a499c1abc4b77926 (patch)
tree2740a9b825765871b2fc4dc27d12623c08c2e428
parentc5ca0c2b71f4178341fc05e258d3541efc603761 (diff)
downloadmate-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.c15
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 *