[SF#681]Fix positioning of new created panel, the edge was not saved.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Wed, 22 Oct 2014 22:08:43 +0000 (01:08 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Wed, 22 Oct 2014 22:08:43 +0000 (01:08 +0300)
ChangeLog
src/panel.c

index cd92305..e7efe04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 * Fixed crash in taskbar after visible task changed name then gone.
 * Ensured panel background update after some plugin was resized.
 * FileManager statement from old config should never be scanned again.
+* Fixed positioning of new created panel, the edge was not saved.
 
 0.7.1
 -------------------------------------------------------------------------
index d5171e6..286cd33 100644 (file)
@@ -934,6 +934,7 @@ static void panel_popupmenu_create_panel( GtkMenuItem* item, LXPanel* panel )
     GdkScreen *screen;
     LXPanel *new_panel = panel_allocate();
     Panel *p = new_panel->priv;
+    config_setting_t *global;
 
     /* Allocate the edge. */
     screen = gdk_screen_get_default();
@@ -961,7 +962,9 @@ found_edge:
     p->name = gen_panel_name(p->edge, p->monitor);
 
     /* create new config with first group "Global" */
-    config_group_add_subgroup(config_root_setting(p->config), "Global");
+    global = config_group_add_subgroup(config_root_setting(p->config), "Global");
+    config_group_set_string(global, "edge", num2str(edge_pair, p->edge, "none"));
+    config_group_set_int(global, "monitor", p->monitor);
     panel_configure(new_panel, 0);
     panel_normalize_configuration(p);
     panel_start_gui(new_panel);