diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-02-21 01:36:00 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-02-21 01:38:14 -0500 |
commit | 9531e7cb106f161d8a43da7ca161fac8becd3de6 (patch) | |
tree | 0de64701a85de6f2b12f1d73807492b9a469d637 | |
parent | 243a3f883f7b2969c11ddac8c6d46521ffa5ef4d (diff) | |
download | nautilus-9531e7cb106f161d8a43da7ca161fac8becd3de6.tar.gz |
window: plug a leak
Don't leak the GtkSizeGroup after we add widgets to it. Also, move it to
the pane, where it should belong now.
-rw-r--r-- | src/nautilus-window-pane.c | 6 | ||||
-rw-r--r-- | src/nautilus-window-private.h | 2 | ||||
-rw-r--r-- | src/nautilus-window.c | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/nautilus-window-pane.c b/src/nautilus-window-pane.c index 216bf328b..e31e3d850 100644 --- a/src/nautilus-window-pane.c +++ b/src/nautilus-window-pane.c @@ -666,7 +666,8 @@ nautilus_window_pane_setup (NautilusWindowPane *pane) pane->widget = gtk_vbox_new (FALSE, 0); window = pane->window; - header_size_group = window->details->header_size_group; + header_size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); + gtk_size_group_set_ignore_hidden (header_size_group, FALSE); /* build the toolbar */ action_group = nautilus_window_create_toolbar_action_group (window); @@ -752,6 +753,9 @@ nautilus_window_pane_setup (NautilusWindowPane *pane) * thus affect the default position of the split view paned. */ gtk_widget_set_size_request (pane->widget, 60, 60); + + /* we can unref the size group now */ + g_object_unref (header_size_group); } static void diff --git a/src/nautilus-window-private.h b/src/nautilus-window-private.h index 3953e6f49..6a4f03fda 100644 --- a/src/nautilus-window-private.h +++ b/src/nautilus-window-private.h @@ -90,8 +90,6 @@ struct NautilusWindowDetails GtkWidget *content_paned; GtkWidget *content_box; NautilusNavigationState *nav_state; - - GtkSizeGroup *header_size_group; /* Side Pane */ int side_pane_width; diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 177af13c5..dbaa6973f 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -603,9 +603,6 @@ nautilus_window_constructed (GObject *self) g_signal_connect_object (nautilus_signaller_get_current (), "popup_menu_changed", G_CALLBACK (nautilus_window_load_extension_menus), window, G_CONNECT_SWAPPED); - window->details->header_size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - gtk_size_group_set_ignore_hidden (window->details->header_size_group, FALSE); - window->details->content_paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_table_attach (GTK_TABLE (window->details->table), window->details->content_paned, |