[nautilus] navigation-window-pane: cleanup the class a bit
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] navigation-window-pane: cleanup the class a bit
- Date: Thu, 17 Feb 2011 16:32:34 +0000 (UTC)
commit 40bfe945c48bc368c11be4341a6c3f27b5543960
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 16 11:32:06 2011 -0500
navigation-window-pane: cleanup the class a bit
src/nautilus-navigation-window-pane.c | 26 +++++++++++++-------------
src/nautilus-navigation-window.c | 10 +++-------
2 files changed, 16 insertions(+), 20 deletions(-)
---
diff --git a/src/nautilus-navigation-window-pane.c b/src/nautilus-navigation-window-pane.c
index 0cf5973..cbebefc 100644
--- a/src/nautilus-navigation-window-pane.c
+++ b/src/nautilus-navigation-window-pane.c
@@ -35,8 +35,6 @@
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-entry.h>
-static void nautilus_navigation_window_pane_dispose (GObject *object);
-
G_DEFINE_TYPE (NautilusNavigationWindowPane,
nautilus_navigation_window_pane,
NAUTILUS_TYPE_WINDOW_PANE)
@@ -609,7 +607,7 @@ nautilus_navigation_window_pane_hide_search_bar (NautilusNavigationWindowPane *p
}
}
-void
+static void
nautilus_navigation_window_pane_setup (NautilusNavigationWindowPane *pane)
{
NautilusEntry *entry;
@@ -787,16 +785,6 @@ real_sync_search_widgets (NautilusWindowPane *window_pane)
}
static void
-nautilus_navigation_window_pane_class_init (NautilusNavigationWindowPaneClass *class)
-{
- G_OBJECT_CLASS (class)->dispose = nautilus_navigation_window_pane_dispose;
- NAUTILUS_WINDOW_PANE_CLASS (class)->show = nautilus_navigation_window_pane_show;
- NAUTILUS_WINDOW_PANE_CLASS (class)->set_active = real_set_active;
- NAUTILUS_WINDOW_PANE_CLASS (class)->sync_search_widgets = real_sync_search_widgets;
- NAUTILUS_WINDOW_PANE_CLASS (class)->sync_location_widgets = real_sync_location_widgets;
-}
-
-static void
nautilus_navigation_window_pane_dispose (GObject *object)
{
NautilusNavigationWindowPane *pane = NAUTILUS_NAVIGATION_WINDOW_PANE (object);
@@ -807,6 +795,16 @@ nautilus_navigation_window_pane_dispose (GObject *object)
G_OBJECT_CLASS (nautilus_navigation_window_pane_parent_class)->dispose (object);
}
+static void
+nautilus_navigation_window_pane_class_init (NautilusNavigationWindowPaneClass *class)
+{
+ G_OBJECT_CLASS (class)->dispose = nautilus_navigation_window_pane_dispose;
+ NAUTILUS_WINDOW_PANE_CLASS (class)->show = nautilus_navigation_window_pane_show;
+ NAUTILUS_WINDOW_PANE_CLASS (class)->set_active = real_set_active;
+ NAUTILUS_WINDOW_PANE_CLASS (class)->sync_search_widgets = real_sync_search_widgets;
+ NAUTILUS_WINDOW_PANE_CLASS (class)->sync_location_widgets = real_sync_location_widgets;
+}
+
NautilusNavigationWindowPane *
nautilus_navigation_window_pane_new (NautilusWindow *window)
{
@@ -815,6 +813,8 @@ nautilus_navigation_window_pane_new (NautilusWindow *window)
pane = g_object_new (NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE, NULL);
NAUTILUS_WINDOW_PANE(pane)->window = window;
+ nautilus_navigation_window_pane_setup (pane);
+
return pane;
}
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 906871e..bbb8f40 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -83,7 +83,6 @@ static int mouse_back_button = 8;
static void mouse_back_button_changed (gpointer callback_data);
static void mouse_forward_button_changed (gpointer callback_data);
static void use_extra_mouse_buttons_changed (gpointer callback_data);
-static NautilusWindowSlot *create_extra_pane (NautilusNavigationWindow *window);
G_DEFINE_TYPE (NautilusNavigationWindow, nautilus_navigation_window, NAUTILUS_TYPE_WINDOW)
@@ -759,9 +758,6 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, NAUTILUS_TYPE_NAVIGATION_WINDOW, NautilusNavigationWindowDetails);
- pane = nautilus_navigation_window_pane_new (win);
- win->details->panes = g_list_prepend (win->details->panes, pane);
-
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);
@@ -793,7 +789,9 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
G_SETTINGS_BIND_DEFAULT);
nautilus_navigation_window_initialize_actions (window);
- nautilus_navigation_window_pane_setup (pane);
+
+ pane = nautilus_navigation_window_pane_new (win);
+ win->details->panes = g_list_prepend (win->details->panes, pane);
gtk_paned_pack1 (GTK_PANED(hpaned), pane->widget, TRUE, FALSE);
gtk_widget_show (pane->widget);
@@ -877,8 +875,6 @@ create_extra_pane (NautilusNavigationWindow *window)
pane = nautilus_navigation_window_pane_new (win);
win->details->panes = g_list_append (win->details->panes, pane);
- nautilus_navigation_window_pane_setup (pane);
-
paned = GTK_PANED (window->details->split_view_hpane);
if (gtk_paned_get_child1 (paned) == NULL) {
gtk_paned_pack1 (paned, pane->widget, TRUE, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]