[gthumb] removed the accessors that require gtk+ 2.21 or greater



commit d6691717c1c68f40add00de292e7c10db963d7be
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Jul 23 22:06:36 2010 +0200

    removed the accessors that require gtk+ 2.21 or greater

 configure.ac                         |    2 +-
 extensions/file_manager/callbacks.c  |   11 ++++++++++-
 gthumb/gth-browser.c                 |    3 ++-
 gthumb/gth-toggle-menu-tool-button.c |    4 +++-
 4 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 58bb3b3..fcfc303 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ GNOME_CXX_WARNINGS
 GTHUMB_EXTENSION_RULES
 
 GLIB_REQUIRED=2.16.0
-GTK_REQUIRED=2.21.0
+GTK_REQUIRED=2.20.0
 GCONF_REQUIRED=2.6.0
 EXIV2_REQUIRED=0.18
 CLUTTER_REQUIRED=1.0.0
diff --git a/extensions/file_manager/callbacks.c b/extensions/file_manager/callbacks.c
index 037a240..c53aa4b 100644
--- a/extensions/file_manager/callbacks.c
+++ b/extensions/file_manager/callbacks.c
@@ -258,11 +258,19 @@ gth_file_list_drag_data_received (GtkWidget        *file_view,
 
 	g_signal_stop_emission_by_name (file_view, "drag-data-received");
 
+	/*
 	if ((gdk_drag_context_get_suggested_action (context) == GDK_ACTION_COPY)
 	    || (gdk_drag_context_get_suggested_action (context) == GDK_ACTION_MOVE))
 	{
 		success = TRUE;
 	}
+	*/
+
+	if ((context->suggested_action == GDK_ACTION_COPY)
+	    || (context->suggested_action == GDK_ACTION_MOVE))
+	{
+		success = TRUE;
+	}
 
 	gtk_drag_finish (context, success, FALSE, time);
 
@@ -288,7 +296,8 @@ gth_file_list_drag_data_received (GtkWidget        *file_view,
 			gboolean       move;
 
 			file_source = gth_browser_get_location_source (browser);
-			move = gdk_drag_context_get_suggested_action (context) == GDK_ACTION_MOVE;
+			/*move = gdk_drag_context_get_suggested_action (context) == GDK_ACTION_MOVE;*/
+			move = context->suggested_action == GDK_ACTION_MOVE;
 			if (move && ! gth_file_source_can_cut (file_source)) {
 				GtkWidget *dialog;
 				int        response;
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 89d8e3e..9fb9f68 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -2397,7 +2397,8 @@ folder_tree_drag_data_received (GtkWidget        *tree_view,
 	char          **uris;
 	GList          *file_list;
 
-	suggested_action = gdk_drag_context_get_suggested_action (context);
+	/*suggested_action = gdk_drag_context_get_suggested_action (context);*/
+	suggested_action = context->suggested_action;
 
 	if ((suggested_action == GDK_ACTION_COPY) || (suggested_action == GDK_ACTION_MOVE))
 		success = TRUE;
diff --git a/gthumb/gth-toggle-menu-tool-button.c b/gthumb/gth-toggle-menu-tool-button.c
index bb7206c..2b3cae3 100644
--- a/gthumb/gth-toggle-menu-tool-button.c
+++ b/gthumb/gth-toggle-menu-tool-button.c
@@ -498,7 +498,9 @@ menu_position_func (GtkMenu                 *menu,
 			*y -= menu_req.height;
 	}
 	else {
-		gdk_window_get_origin (gtk_button_get_event_window (GTK_BUTTON (widget)), x, y);
+		/*gdk_window_get_origin (gtk_button_get_event_window (GTK_BUTTON (widget)), x, y);*/
+		gdk_window_get_origin (GTK_BUTTON (widget)->event_window, x, y);
+
 		gtk_widget_size_request (widget, &req);
 
 		if (direction == GTK_TEXT_DIR_LTR)



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