GNOME Bugzilla – Bug 724826
Side panel switcher: no popover menu when only one panel
Last modified: 2014-02-22 11:29:45 UTC
When there's only one page in side-panel, we don't want popover menu to appear
Created attachment 269831 [details] [review] Side panel switcher: no popover menu when only one panel
Created attachment 269954 [details] [review] Side panel switcher: no popover menu when only one panel
Review of attachment 269954 [details] [review]: ::: gedit/gedit-window.c @@ +2422,2 @@ static void +on_side_panel_stack_child_title_changed (GtkWidget *widget, I am not sure we need to be so fancy: we know for sure that if there is only one child, then it is the documents pane since that one is not removable, so we can just put the "Documents" label in the ui file and do not update it dynamically @@ +2460,3 @@ +{ + GeditWindowPrivate *priv = window->priv; + You are leaking the list @@ +2479,3 @@ + GeditWindow *window) +{ + priv->side_stack_switcher = priv->side_stack_switcher_tmp; nitpick: one arg per line in g_signal_connect (I dp not 100% like this rule, but most of gedit-window.c is like that) @@ +2498,3 @@ { GtkWidget *documents_panel; + GeditWindowPrivate *priv = window->priv; nitpick: make priv the first var @@ +2511,3 @@ + + g_object_ref (priv->side_stack_switcher_tmp); + g_object_ref (priv->side_stack_switcher); you need to ref_sink the widget that is not added to the container @@ +2516,3 @@ + GTK_STACK (priv->side_panel)); + + g_object_ref (priv->side_stack_switcher); indentation is off
Created attachment 269956 [details] [review] Side panel switcher: no popover menu when only one panel
Created attachment 269960 [details] [review] Side panel switcher: no popover menu when only one panel
amended the patch a bit to use headerbar title property instead of manually using a label.