[nautilus] Replace deprecated GTK_WIDGET_* macros and depend on newer GTK+



commit 4f870048b8d6754e29dd5ed0c4104f453caf7d3b
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Thu Mar 4 15:44:05 2010 +0100

    Replace deprecated GTK_WIDGET_* macros and depend on newer GTK+

 configure.in                                       |    2 +-
 libnautilus-private/nautilus-clipboard.c           |    2 +-
 libnautilus-private/nautilus-horizontal-splitter.c |   10 +++++-----
 libnautilus-private/nautilus-icon-canvas-item.c    |    8 ++++----
 libnautilus-private/nautilus-icon-container.c      |   16 ++++++++--------
 libnautilus-private/nautilus-progress-info.c       |    2 +-
 libnautilus-private/nautilus-tree-view-drag-dest.c |    2 +-
 src/file-manager/fm-list-view.c                    |    4 ++--
 src/file-manager/fm-properties-window.c            |    2 +-
 src/file-manager/fm-tree-view.c                    |    2 +-
 src/nautilus-application.c                         |    2 +-
 src/nautilus-bookmarks-window.c                    |    2 +-
 src/nautilus-navigation-window-pane.c              |    6 +++---
 src/nautilus-navigation-window.c                   |    4 ++--
 src/nautilus-notebook.c                            |    2 +-
 src/nautilus-pathbar.c                             |   12 ++++++------
 src/nautilus-side-pane.c                           |    2 +-
 src/nautilus-spatial-window.c                      |    2 +-
 src/nautilus-window-manage-views.c                 |    8 ++++----
 src/nautilus-window.c                              |    2 +-
 src/nautilus-zoom-control.c                        |    2 +-
 21 files changed, 47 insertions(+), 47 deletions(-)
---
diff --git a/configure.in b/configure.in
index 3b9a073..92dbbe6 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ dnl ===========================================================================
 m4_define(glib_minver,                 2.23.0)
 m4_define(gnome_desktop_minver,        2.29.91)
 m4_define(pango_minver,                1.1.2)
-m4_define(gtk_minver,                  2.19.0)
+m4_define(gtk_minver,                  2.19.6)
 m4_define(xml_minver,                  2.4.7)
 m4_define(exif_minver,                 0.5.12)
 m4_define(beagle_minver,               0.2.4)
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 4ef7589..01b1fb1 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -363,7 +363,7 @@ focus_changed_callback (GtkWidget *widget,
 			gpointer callback_data)
 {
 	/* Connect the component to the container if the widget has focus. */
-	if (GTK_WIDGET_HAS_FOCUS (widget)) {
+	if (gtk_widget_has_focus (widget)) {
 		if (!clipboard_items_are_merged_in (widget)) {
 			merge_in_clipboard_menu_items (G_OBJECT (widget), callback_data);
 		}
diff --git a/libnautilus-private/nautilus-horizontal-splitter.c b/libnautilus-private/nautilus-horizontal-splitter.c
index fd4e071..717d763 100644
--- a/libnautilus-private/nautilus-horizontal-splitter.c
+++ b/libnautilus-private/nautilus-horizontal-splitter.c
@@ -129,7 +129,7 @@ splitter_is_hidden (NautilusHorizontalSplitter *splitter)
 	
 	parent = GTK_PANED (splitter);
 
-	return GTK_WIDGET_VISIBLE (parent->child1);
+	return gtk_widget_get_visible (parent->child1);
 }
 
 void
@@ -238,12 +238,12 @@ nautilus_horizontal_splitter_size_allocate (GtkWidget     *widget,
 
 	widget->allocation = *allocation;
 
-	if (paned->child2 != NULL && GTK_WIDGET_VISIBLE (paned->child2)) { 
+	if (paned->child2 != NULL && gtk_widget_get_visible (paned->child2)) { 
 		EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate,
 				 (widget, allocation));
-	} else if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1)) {
+	} else if (paned->child1 && gtk_widget_get_visible (paned->child1)) {
 
-		if (GTK_WIDGET_REALIZED (widget)) {
+		if (gtk_widget_get_realized (widget)) {
 			gdk_window_hide (paned->handle);
 		}
 
@@ -259,7 +259,7 @@ nautilus_horizontal_splitter_size_allocate (GtkWidget     *widget,
 		
 		gtk_widget_size_allocate (paned->child1, &child_allocation);
 	} else
-		if (GTK_WIDGET_REALIZED (widget)) {
+		if (gtk_widget_get_realized (widget)) {
 			gdk_window_hide (paned->handle);
 		}
 
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index 0cd7434..0e08d31 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -1322,7 +1322,7 @@ draw_label_text (NautilusIconCanvasItem *item,
 	if (needs_highlight && !details->is_renaming) {
 		draw_frame (item,
 			    drawable,
-			    GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (container)) ? container->details->highlight_color_rgba : container->details->active_color_rgba,
+			    gtk_widget_has_focus (GTK_WIDGET (container)) ? container->details->highlight_color_rgba : container->details->active_color_rgba,
 			    create_mask,
 			    is_rtl_label_beside ? text_rect.x0 + item->details->text_dx : text_rect.x0,
 			    text_rect.y0,
@@ -1883,7 +1883,7 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item)
 
 		old_pixbuf = temp_pixbuf;
 
-		color =  GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (canvas)) ? NAUTILUS_ICON_CONTAINER (canvas)->details->highlight_color_rgba : NAUTILUS_ICON_CONTAINER (canvas)->details->active_color_rgba;
+		color =  gtk_widget_has_focus (GTK_WIDGET (canvas)) ? NAUTILUS_ICON_CONTAINER (canvas)->details->highlight_color_rgba : NAUTILUS_ICON_CONTAINER (canvas)->details->active_color_rgba;
 
 		temp_pixbuf = eel_create_colorized_pixbuf (temp_pixbuf,
 							   EEL_RGBA_COLOR_GET_R (color),
@@ -1928,7 +1928,7 @@ map_pixbuf (NautilusIconCanvasItem *icon_item)
 	      && icon_item->details->rendered_is_prelit == icon_item->details->is_prelit
 	      && icon_item->details->rendered_is_highlighted_for_selection == icon_item->details->is_highlighted_for_selection
 	      && icon_item->details->rendered_is_highlighted_for_drop == icon_item->details->is_highlighted_for_drop
-	      && (icon_item->details->is_highlighted_for_selection && icon_item->details->rendered_is_focused == GTK_WIDGET_HAS_FOCUS (EEL_CANVAS_ITEM (icon_item)->canvas)))) {
+	      && (icon_item->details->is_highlighted_for_selection && icon_item->details->rendered_is_focused == gtk_widget_has_focus (GTK_WIDGET (EEL_CANVAS_ITEM (icon_item)->canvas))))) {
 		if (icon_item->details->rendered_pixbuf != NULL) {
 			g_object_unref (icon_item->details->rendered_pixbuf);
 		}
@@ -1937,7 +1937,7 @@ map_pixbuf (NautilusIconCanvasItem *icon_item)
 		icon_item->details->rendered_is_prelit = icon_item->details->is_prelit;
 		icon_item->details->rendered_is_highlighted_for_selection = icon_item->details->is_highlighted_for_selection;
 		icon_item->details->rendered_is_highlighted_for_drop = icon_item->details->is_highlighted_for_drop;
-		icon_item->details->rendered_is_focused = GTK_WIDGET_HAS_FOCUS (EEL_CANVAS_ITEM (icon_item)->canvas);
+		icon_item->details->rendered_is_focused = gtk_widget_has_focus (GTK_WIDGET (EEL_CANVAS_ITEM (icon_item)->canvas));
 	}
 
 	g_object_ref (icon_item->details->rendered_pixbuf);
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 03af3a9..0b1f2c3 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4218,7 +4218,7 @@ style_set (GtkWidget *widget,
 
 	nautilus_icon_container_theme_changed (NAUTILUS_ICON_CONTAINER (widget));	
 
-	if (GTK_WIDGET_REALIZED (widget)) {
+	if (gtk_widget_get_realized (widget)) {
 		invalidate_label_sizes (container);
 		nautilus_icon_container_request_update_all (container);
 	}
@@ -4254,7 +4254,7 @@ button_press_event (GtkWidget *widget,
 	/* Move focus to icon container, unless we're still renaming (to avoid exiting
 	 * renaming mode)
 	 */
-  	if (!GTK_WIDGET_HAS_FOCUS (widget) && !(is_renaming (container) || is_renaming_pending (container))) {
+  	if (!gtk_widget_has_focus (widget) && !(is_renaming (container) || is_renaming_pending (container))) {
     		gtk_widget_grab_focus (widget);
     	}
 
@@ -4485,7 +4485,7 @@ start_stretching (NautilusIconContainer *container)
 
 	/* Ensure the window itself is focused.. */
 	toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
-	if (toplevel != NULL && GTK_WIDGET_REALIZED (toplevel)) {
+	if (toplevel != NULL && gtk_widget_get_realized (toplevel)) {
 		eel_gdk_window_focus (toplevel->window, GDK_CURRENT_TIME);
 	}
 
@@ -5287,11 +5287,11 @@ nautilus_icon_container_real_start_interactive_search (NautilusIconContainer *co
 	GtkWidgetClass *entry_parent_class;
 
 	if (container->details->search_window != NULL &&
-	    GTK_WIDGET_VISIBLE (container->details->search_window)) {
+	    gtk_widget_get_visible (container->details->search_window)) {
 		return TRUE;
 	}
 
-	if (!GTK_WIDGET_HAS_FOCUS (container)) {
+	if (!gtk_widget_has_focus (GTK_WIDGET (container))) {
 		return FALSE;
 	}
 
@@ -8542,7 +8542,7 @@ nautilus_icon_container_get_label_color_and_gc (NautilusIconContainer *container
 	
 	if (is_name) {
 		if (is_highlight) {
-			if (GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (container))) {
+			if (gtk_widget_has_focus (GTK_WIDGET (container))) {
 				idx = LABEL_COLOR_HIGHLIGHT;
 			} else {
 				idx = LABEL_COLOR_ACTIVE;
@@ -8556,7 +8556,7 @@ nautilus_icon_container_get_label_color_and_gc (NautilusIconContainer *container
 		}
 	} else {
 		if (is_highlight) {
-			if (GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (container))) {
+			if (gtk_widget_has_focus (GTK_WIDGET (container))) {
 				idx = LABEL_INFO_COLOR_HIGHLIGHT;
 			} else {
 				idx = LABEL_INFO_COLOR_ACTIVE;
@@ -8601,7 +8601,7 @@ setup_label_gcs (NautilusIconContainer *container)
 	guint light_info_value, dark_info_value;
 	gboolean frame_text;
 	
-	if (!GTK_WIDGET_REALIZED (container))
+	if (!gtk_widget_get_realized (GTK_WIDGET (container)))
 		return;
 
 	widget = GTK_WIDGET (container);
diff --git a/libnautilus-private/nautilus-progress-info.c b/libnautilus-private/nautilus-progress-info.c
index ac182d8..ecde2a9 100644
--- a/libnautilus-private/nautilus-progress-info.c
+++ b/libnautilus-private/nautilus-progress-info.c
@@ -197,7 +197,7 @@ static void
 status_icon_activate_cb (GtkStatusIcon *icon,
 			 GtkWidget *progress_window)
 {
-	if (GTK_WIDGET_VISIBLE (progress_window)) {
+	if (gtk_widget_get_visible (progress_window)) {
 		gtk_widget_hide (progress_window);
 	} else {
 		gtk_window_present (GTK_WINDOW (progress_window));
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c
index b0fa10e..3018a41 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -181,7 +181,7 @@ highlight_expose (GtkWidget *widget,
 	int width;
 	int height;
 
-	if (GTK_WIDGET_DRAWABLE (widget)) {
+	if (gtk_widget_is_drawable (widget)) {
 		bin_window = 
 			gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
 		
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index dda571e..2ba25f4 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -970,7 +970,7 @@ key_press_callback (GtkWidget *widget, GdkEventKey *event, gpointer callback_dat
 			handled = FALSE;
 			break;
 		}
-		if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (FM_LIST_VIEW (view)->details->tree_view))) {
+		if (!gtk_widget_has_focus (GTK_WIDGET (FM_LIST_VIEW (view)->details->tree_view))) {
 			handled = FALSE;
 			break;
 		}
@@ -2594,7 +2594,7 @@ fm_list_view_click_policy_changed (FMDirectoryView *directory_view)
 		}
 
 		tree = view->details->tree_view;
-		if (GTK_WIDGET_REALIZED (GTK_WIDGET (tree))) {
+		if (gtk_widget_get_realized (GTK_WIDGET (tree))) {
 			win = GTK_WIDGET (tree)->window;
 			gdk_window_set_cursor (win, NULL);
 			
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index f1577bb..845a7c9 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -833,7 +833,7 @@ name_field_focus_out (NautilusEntry *name_field,
 {
 	g_assert (FM_IS_PROPERTIES_WINDOW (callback_data));
 
-	if (GTK_WIDGET_SENSITIVE (name_field)) {
+	if (gtk_widget_get_sensitive (GTK_WIDGET (name_field))) {
 		name_field_done_editing (name_field, FM_PROPERTIES_WINDOW (callback_data));
 	}
 
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index 45ef18b..de9523d 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -226,7 +226,7 @@ show_selection_idle_callback (gpointer callback_data)
 		(view->details->sort_model, path);
 	gtk_tree_path_free (path);
 	gtk_tree_view_set_cursor (view->details->tree_widget, sort_path, NULL, FALSE);
-	if (GTK_WIDGET_REALIZED (view->details->tree_widget)) {
+	if (gtk_widget_get_realized (GTK_WIDGET (view->details->tree_widget))) {
 		gtk_tree_view_scroll_to_cell (view->details->tree_widget, sort_path, NULL, FALSE, 0, 0);
 	}
 	gtk_tree_path_free (sort_path);
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 9c48736..6a596eb 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -736,7 +736,7 @@ open_window (NautilusApplication *application,
 		g_object_unref (location);
 	}
 	
-	if (geometry != NULL && !GTK_WIDGET_VISIBLE (window)) {
+	if (geometry != NULL && !gtk_widget_get_visible (GTK_WIDGET (window))) {
 		/* never maximize windows opened from shell if a
 		 * custom geometry has been requested.
 		 */
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c
index 78a3a6b..98fc4c2 100644
--- a/src/nautilus-bookmarks-window.c
+++ b/src/nautilus-bookmarks-window.c
@@ -499,7 +499,7 @@ nautilus_bookmarks_window_save_geometry (GtkWindow *window)
 	g_return_if_fail (NAUTILUS_IS_BOOKMARK_LIST (bookmarks));
 
 	/* Don't bother if window is already closed */
-	if (GTK_WIDGET_VISIBLE (window)) {
+	if (gtk_widget_get_visible (GTK_WIDGET (window))) {
 		char *geometry_string;
 		
 		geometry_string = eel_gtk_window_get_geometry_string (window);
diff --git a/src/nautilus-navigation-window-pane.c b/src/nautilus-navigation-window-pane.c
index bc49cb5..65359cf 100644
--- a/src/nautilus-navigation-window-pane.c
+++ b/src/nautilus-navigation-window-pane.c
@@ -721,7 +721,7 @@ gboolean
 nautilus_navigation_window_pane_path_bar_showing (NautilusNavigationWindowPane *pane)
 {
 	if (pane->path_bar != NULL) {
-		return GTK_WIDGET_VISIBLE (pane->path_bar);
+		return gtk_widget_get_visible (pane->path_bar);
 	}
 	/* If we're not visible yet we haven't changed visibility, so its TRUE */
 	return TRUE;
@@ -771,7 +771,7 @@ gboolean
 nautilus_navigation_window_pane_search_bar_showing (NautilusNavigationWindowPane *pane)
 {
 	if (pane->search_bar != NULL) {
-		return GTK_WIDGET_VISIBLE (pane->search_bar);
+		return gtk_widget_get_visible (pane->search_bar);
 	}
 	/* If we're not visible yet we haven't changed visibility, so its TRUE */
 	return TRUE;
@@ -806,7 +806,7 @@ nautilus_navigation_window_pane_location_bar_showing (NautilusNavigationWindowPa
 		return FALSE;
 	}
 	if (pane->location_bar != NULL) {
-		return GTK_WIDGET_VISIBLE (pane->location_bar);
+		return gtk_widget_get_visible (pane->location_bar);
 	}
 	/* If we're not visible yet we haven't changed visibility, so its TRUE */
 	return TRUE;
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index a852656..0033525 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -892,7 +892,7 @@ gboolean
 nautilus_navigation_window_toolbar_showing (NautilusNavigationWindow *window)
 {
 	if (window->details->toolbar != NULL) {
-		return GTK_WIDGET_VISIBLE (window->details->toolbar);
+		return gtk_widget_get_visible (window->details->toolbar);
 	}
 	/* If we're not visible yet we haven't changed visibility, so its TRUE */
 	return TRUE;
@@ -926,7 +926,7 @@ gboolean
 nautilus_navigation_window_status_bar_showing (NautilusNavigationWindow *window)
 {
 	if (NAUTILUS_WINDOW (window)->details->statusbar != NULL) {
-		return GTK_WIDGET_VISIBLE (NAUTILUS_WINDOW (window)->details->statusbar);
+		return gtk_widget_get_visible (NAUTILUS_WINDOW (window)->details->statusbar);
 	}
 	/* If we're not visible yet we haven't changed visibility, so its TRUE */
 	return TRUE;
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index d05290c..58003b9 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -176,7 +176,7 @@ find_tab_num_at_pos (NautilusNotebook *notebook, gint abs_x, gint abs_y)
 		tab = gtk_notebook_get_tab_label (nb, page);
 		g_return_val_if_fail (tab != NULL, -1);
 
-		if (!GTK_WIDGET_MAPPED (GTK_WIDGET (tab)))
+		if (!gtk_widget_get_mapped (GTK_WIDGET (tab)))
 		{
 			page_num++;
 			continue;
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 3ec1998..df39db0 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -228,7 +228,7 @@ slider_timeout (gpointer user_data)
 
 	path_bar->drag_slider_timeout = 0;
 
-	if (GTK_WIDGET_VISIBLE (GTK_WIDGET (path_bar))) {
+	if (gtk_widget_get_visible (GTK_WIDGET (path_bar))) {
 		if (path_bar->drag_slider_timeout_for_up_button) {
 			nautilus_path_bar_scroll_up (path_bar);
 		} else {
@@ -780,7 +780,7 @@ static void
 nautilus_path_bar_remove_1 (GtkContainer *container,
 		       	    GtkWidget    *widget)
 {
-        gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+        gboolean was_visible = gtk_widget_get_visible (widget);
         gtk_widget_unparent (widget);
         if (was_visible) {
                 gtk_widget_queue_resize (GTK_WIDGET (container));
@@ -944,10 +944,10 @@ nautilus_path_bar_scroll_timeout (NautilusPathBar *path_bar)
         GDK_THREADS_ENTER ();
 
         if (path_bar->timer) {
-                if (GTK_WIDGET_HAS_FOCUS (path_bar->up_slider_button)) {
+                if (gtk_widget_has_focus (path_bar->up_slider_button)) {
 			nautilus_path_bar_scroll_up (path_bar);
 		} else {
-			if (GTK_WIDGET_HAS_FOCUS (path_bar->down_slider_button)) {
+			if (gtk_widget_has_focus (path_bar->down_slider_button)) {
 				nautilus_path_bar_scroll_down (path_bar);
 			}
          	}
@@ -984,7 +984,7 @@ nautilus_path_bar_slider_button_press (GtkWidget       *widget,
 	   			       GdkEventButton  *event,
 				       NautilusPathBar *path_bar)
 {
-        if (!GTK_WIDGET_HAS_FOCUS (widget)) {
+        if (!gtk_widget_has_focus (widget)) {
                 gtk_widget_grab_focus (widget);
 	}
 
@@ -1040,7 +1040,7 @@ static void
 nautilus_path_bar_state_changed (GtkWidget    *widget,
 			         GtkStateType  previous_state)
 {
-        if (!GTK_WIDGET_IS_SENSITIVE (widget)) {
+        if (!gtk_widget_get_sensitive (widget)) {
                 nautilus_path_bar_stop_scrolling (NAUTILUS_PATH_BAR (widget));
 	}
 }
diff --git a/src/nautilus-side-pane.c b/src/nautilus-side-pane.c
index 341c768..6dcb1b7 100644
--- a/src/nautilus-side-pane.c
+++ b/src/nautilus-side-pane.c
@@ -210,7 +210,7 @@ menu_position_under (GtkMenu *menu,
 	GtkWidget *widget;
 	
 	g_return_if_fail (GTK_IS_BUTTON (user_data));
-	g_return_if_fail (GTK_WIDGET_NO_WINDOW (user_data));
+	g_return_if_fail (!gtk_widget_get_has_window (GTK_WIDGET (user_data)));
 
 	widget = GTK_WIDGET (user_data);
 	
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index c9177ae..169fe87 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -131,7 +131,7 @@ nautilus_spatial_window_configure_event (GtkWidget *widget,
 	if (window->details->save_geometry_timeout_id != 0) {
 		g_source_remove (window->details->save_geometry_timeout_id);
 	}
-	if (GTK_WIDGET_VISIBLE (GTK_WIDGET (window)) && !NAUTILUS_IS_DESKTOP_WINDOW (window)) {
+	if (gtk_widget_get_visible (GTK_WIDGET (window)) && !NAUTILUS_IS_DESKTOP_WINDOW (window)) {
 		geometry_string = eel_gtk_window_get_geometry_string (GTK_WINDOW (window));
 	
 		/* If the last geometry is NULL the window must have just
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 66a5649..ac3d6bc 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -594,7 +594,7 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot *slot,
 
         if ((flags & NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND) != 0) {
                 if (NAUTILUS_IS_SPATIAL_WINDOW (window) && !NAUTILUS_IS_DESKTOP_WINDOW (window)) {
-                        if (GTK_WIDGET_VISIBLE (target_window)) {
+                        if (gtk_widget_get_visible (GTK_WIDGET (target_window))) {
                                 nautilus_window_close (window);
                         } else {
                                 g_signal_connect_object (target_window,
@@ -1120,7 +1120,7 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
 	}
 
 	if (view_id != NULL) {
-                if (!GTK_WIDGET_VISIBLE (window) && NAUTILUS_IS_SPATIAL_WINDOW (window)) {
+                if (!gtk_widget_get_visible (GTK_WIDGET (window)) && NAUTILUS_IS_SPATIAL_WINDOW (window)) {
 			/* We now have the metadata to set up the window position, etc */
 			setup_new_spatial_window (slot, file);
 		}
@@ -1130,7 +1130,7 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
 		display_view_selection_failure (window, file,
 						location, error);
 
-		if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (window))) {
+		if (!gtk_widget_get_visible (GTK_WIDGET (window))) {
 			/* Destroy never-had-a-chance-to-be-seen window. This case
 			 * happens when a new window cannot display its initial URI. 
 			 */
@@ -1817,7 +1817,7 @@ nautilus_window_report_view_failed (NautilusWindow *window,
 
 			fallback_load_location = g_object_ref (slot->pending_location);
 		} else {
-			if (!GTK_WIDGET_VISIBLE (window)) {
+			if (!gtk_widget_get_visible (GTK_WIDGET (window))) {
 				do_close_window = TRUE;
 			}
 		}
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index c2194fc..b822500 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -359,7 +359,7 @@ nautilus_window_sync_allow_stop (NautilusWindow *window,
 			gtk_action_set_sensitive (action, slot->allow_stop);
 		}
 
-		if (GTK_WIDGET_REALIZED (GTK_WIDGET (window))) {
+		if (gtk_widget_get_realized (GTK_WIDGET (window))) {
 			update_cursor (window);
 		}
 
diff --git a/src/nautilus-zoom-control.c b/src/nautilus-zoom-control.c
index e0b7a97..c055006 100644
--- a/src/nautilus-zoom-control.c
+++ b/src/nautilus-zoom-control.c
@@ -159,7 +159,7 @@ menu_position_under_widget (GtkMenu   *menu,
 	gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
 
 	gdk_window_get_origin (widget->window, x, y);
-	if (GTK_WIDGET_NO_WINDOW (widget)) {
+	if (!gtk_widget_get_has_window (widget)) {
 		*x += widget->allocation.x;
 		*y += widget->allocation.y;
 	}



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