[nautilus] view: remove nautilus_view_get_widget()



commit a2093ba1340334fa2733aa3ba2c00e7d1cfb683e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Feb 25 09:55:30 2011 -0500

    view: remove nautilus_view_get_widget()
    
    Having a function just to call a cast seems a bit weird...

 src/nautilus-view.c                |    6 ------
 src/nautilus-view.h                |    1 -
 src/nautilus-window-manage-views.c |    2 +-
 src/nautilus-window-slot.c         |    8 ++++----
 4 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index ebff573..3df845a 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2439,12 +2439,6 @@ nautilus_view_grab_focus (NautilusView *view)
 	}
 }
 
-GtkWidget *
-nautilus_view_get_widget (NautilusView *view)
-{
-	return GTK_WIDGET (view);
-}
-
 int
 nautilus_view_get_selection_count (NautilusView *view)
 {
diff --git a/src/nautilus-view.h b/src/nautilus-view.h
index f83bfda..d5afaf1 100644
--- a/src/nautilus-view.h
+++ b/src/nautilus-view.h
@@ -351,7 +351,6 @@ gboolean            nautilus_view_is_editable                     (NautilusView
 
 /* NautilusView methods */
 const char *      nautilus_view_get_view_id                (NautilusView      *view);
-GtkWidget *       nautilus_view_get_widget                 (NautilusView      *view);
 
 /* file operations */
 char *            nautilus_view_get_backing_uri            (NautilusView      *view);
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 775e14c..3b2c2f0 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1193,7 +1193,7 @@ location_has_really_changed (NautilusWindowSlot *slot)
 	window = slot->pane->window;
 
 	if (slot->new_content_view != NULL) {
-		widget = nautilus_view_get_widget (slot->new_content_view);
+		widget = GTK_WIDGET (slot->new_content_view);
 		/* Switch to the new content view. */
 		if (gtk_widget_get_parent (widget) == NULL) {
 			nautilus_window_slot_set_content_view_widget (slot, slot->new_content_view);
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index f914422..d430722 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -224,14 +224,14 @@ nautilus_window_slot_dispose (GObject *object)
 	nautilus_window_slot_clear_back_list (slot);
 
 	if (slot->content_view) {
-		widget = nautilus_view_get_widget (slot->content_view);
+		widget = GTK_WIDGET (slot->content_view);
 		gtk_widget_destroy (widget);
 		g_object_unref (slot->content_view);
 		slot->content_view = NULL;
 	}
 
 	if (slot->new_content_view) {
-		widget = nautilus_view_get_widget (slot->new_content_view);
+		widget = GTK_WIDGET (slot->new_content_view);
 		gtk_widget_destroy (widget);
 		g_object_unref (slot->new_content_view);
 		slot->new_content_view = NULL;
@@ -454,14 +454,14 @@ nautilus_window_slot_set_content_view_widget (NautilusWindowSlot *slot,
 		/* disconnect old view */
 		nautilus_window_disconnect_content_view (window, slot->content_view);
 
-		widget = nautilus_view_get_widget (slot->content_view);
+		widget = GTK_WIDGET (slot->content_view);
 		gtk_widget_destroy (widget);
 		g_object_unref (slot->content_view);
 		slot->content_view = NULL;
 	}
 
 	if (new_view != NULL) {
-		widget = nautilus_view_get_widget (new_view);
+		widget = GTK_WIDGET (new_view);
 		gtk_container_add (GTK_CONTAINER (slot->view_box),
 						  GTK_WIDGET (new_view));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]