From b0379147d9592244b16606b00b016cc426a0ea60 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 25 Mar 2011 07:32:30 +0000 Subject: [PATCH] (trunk gtk) get everything except torrent-cell-renderer building under GTK+ 3.0.5 --- gtk/main.c | 9 +++++++++ gtk/tr-window.c | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gtk/main.c b/gtk/main.c index 28a93b0fc..9d6ccec7b 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1561,11 +1561,18 @@ update_model( gpointer gdata ) return !done; } +/* GTK+ versions before 2.18.0 don't have a default URI hook... */ +#if !GTK_CHECK_VERSION(2,18,0) + #define NEED_URL_HOOK +#endif + +#ifdef NEED_URL_HOOK static void on_uri_clicked( GtkAboutDialog * u UNUSED, const gchar * uri, gpointer u2 UNUSED ) { gtr_open_uri( uri ); } +#endif static void show_about_dialog( GtkWindow * parent ) @@ -1578,7 +1585,9 @@ show_about_dialog( GtkWindow * parent ) NULL }; +#ifdef NEED_URL_HOOK gtk_about_dialog_set_url_hook( on_uri_clicked, NULL, NULL ); +#endif d = g_object_new( GTK_TYPE_ABOUT_DIALOG, "authors", authors, diff --git a/gtk/tr-window.c b/gtk/tr-window.c index db6520e89..81415c6d9 100644 --- a/gtk/tr-window.c +++ b/gtk/tr-window.c @@ -874,7 +874,12 @@ gtr_window_set_busy( TrWindow * w, gboolean isBusy ) gdk_window_set_cursor( gtr_widget_get_window( GTK_WIDGET( w ) ), cursor ); gdk_display_flush( display ); - if( cursor ) + if( cursor ) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref( cursor ); +#else gdk_cursor_unref( cursor ); +#endif + } } }