1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

(trunk gtk) transmission-gtk requires GTK+ 2.8 or higher, so remove the `#if GTK_CHECK_VERSION(2,8,0)' checks because we already know the answer.

This commit is contained in:
Jordan Lee 2011-04-12 11:13:41 +00:00
parent b1459c5d3b
commit 4a15899499
3 changed files with 1 additions and 28 deletions

View file

@ -40,10 +40,6 @@ action_cb( GtkAction * a, gpointer user_data )
gtr_actions_handler( gtk_action_get_name( a ), user_data ); gtr_actions_handler( gtk_action_get_name( a ), user_data );
} }
#if !GTK_CHECK_VERSION( 2, 8, 0 )
#define GTK_STOCK_INFO GTK_STOCK_PROPERTIES
#endif
#if !GTK_CHECK_VERSION( 2, 10, 0 ) #if !GTK_CHECK_VERSION( 2, 10, 0 )
#define GTK_STOCK_SELECT_ALL NULL #define GTK_STOCK_SELECT_ALL NULL
#endif #endif

View file

@ -69,14 +69,12 @@
#define MY_CONFIG_NAME "transmission" #define MY_CONFIG_NAME "transmission"
#define MY_READABLE_NAME "transmission-gtk" #define MY_READABLE_NAME "transmission-gtk"
#if GTK_CHECK_VERSION( 2, 8, 0 ) #define SHOW_LICENSE
#define SHOW_LICENSE
static const char * LICENSE = static const char * LICENSE =
"The OS X client, CLI client, and parts of libtransmission are licensed under the terms of the MIT license.\n\n" "The OS X client, CLI client, and parts of libtransmission are licensed under the terms of the MIT license.\n\n"
"The Transmission daemon, GTK+ client, Qt client, Web client, and most of libtransmission are licensed under the terms of the GNU GPL version 2, with two special exceptions:\n\n" "The Transmission daemon, GTK+ client, Qt client, Web client, and most of libtransmission are licensed under the terms of the GNU GPL version 2, with two special exceptions:\n\n"
"1. The MIT-licensed portions of Transmission listed above are exempt from GPLv2 clause 2(b) and may retain their MIT license.\n\n" "1. The MIT-licensed portions of Transmission listed above are exempt from GPLv2 clause 2(b) and may retain their MIT license.\n\n"
"2. Permission is granted to link the code in this release with the OpenSSL project's 'OpenSSL' library and to distribute the linked executables. Works derived from Transmission may, at their authors' discretion, keep or delete this exception."; "2. Permission is granted to link the code in this release with the OpenSSL project's 'OpenSSL' library and to distribute the linked executables. Works derived from Transmission may, at their authors' discretion, keep or delete this exception.";
#endif
struct cbdata struct cbdata
{ {
@ -104,11 +102,7 @@ struct cbdata
static void static void
gtr_window_present( GtkWindow * window ) gtr_window_present( GtkWindow * window )
{ {
#if GTK_CHECK_VERSION( 2, 8, 0 )
gtk_window_present_with_time( window, gtk_get_current_event_time( ) ); gtk_window_present_with_time( window, gtk_get_current_event_time( ) );
#else
gtk_window_present( window );
#endif
} }
/*** /***
@ -1322,7 +1316,6 @@ on_core_error( TrCore * core UNUSED, guint code, const char * msg, struct cbdata
} }
} }
#if GTK_CHECK_VERSION( 2, 8, 0 )
static gboolean static gboolean
on_main_window_focus_in( GtkWidget * widget UNUSED, on_main_window_focus_in( GtkWidget * widget UNUSED,
GdkEventFocus * event UNUSED, GdkEventFocus * event UNUSED,
@ -1335,20 +1328,16 @@ on_main_window_focus_in( GtkWidget * widget UNUSED,
return FALSE; return FALSE;
} }
#endif
static void static void
on_add_torrent( TrCore * core, tr_ctor * ctor, gpointer gdata ) on_add_torrent( TrCore * core, tr_ctor * ctor, gpointer gdata )
{ {
struct cbdata * cbdata = gdata; struct cbdata * cbdata = gdata;
GtkWidget * w = gtr_torrent_options_dialog_new( cbdata->wind, core, ctor ); GtkWidget * w = gtr_torrent_options_dialog_new( cbdata->wind, core, ctor );
#if GTK_CHECK_VERSION( 2, 8, 0 )
g_signal_connect( w, "focus-in-event", g_signal_connect( w, "focus-in-event",
G_CALLBACK( on_main_window_focus_in ), cbdata ); G_CALLBACK( on_main_window_focus_in ), cbdata );
if( cbdata->wind ) if( cbdata->wind )
gtk_window_set_urgency_hint( cbdata->wind, TRUE ); gtk_window_set_urgency_hint( cbdata->wind, TRUE );
#endif
gtk_widget_show( w ); gtk_widget_show( w );
} }

View file

@ -39,18 +39,6 @@
#include "tr-window.h" #include "tr-window.h"
#include "util.h" #include "util.h"
#if !GTK_CHECK_VERSION( 2, 8, 0 )
static void
gtk_tree_view_column_queue_resize( GtkTreeViewColumn * column ) /* yuck */
{
const int spacing = gtk_tree_view_column_get_spacing( column );
gtk_tree_view_column_set_spacing( column, spacing + 1 );
gtk_tree_view_column_set_spacing( column, spacing );
}
#endif
typedef struct typedef struct
{ {
GtkWidget * speedlimit_on_item[2]; GtkWidget * speedlimit_on_item[2];