]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) remove an unnecessary GTK_CHECK_VERSION(2,10,0) check now that the minimu...
authorJordan Lee <jordan@transmissionbt.com>
Mon, 8 Aug 2011 16:02:37 +0000 (16:02 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Mon, 8 Aug 2011 16:02:37 +0000 (16:02 +0000)
gtk/main.c
gtk/tr-icon.c
gtk/tr-icon.h

index 069443b966c1b2776d8bcb3a3c4a1c38248d58e5..985efe2077173236b0b36ca42146e61da1cb9dd5 100644 (file)
@@ -638,11 +638,9 @@ main( int argc, char ** argv )
           &startpaused, _( "Start with all torrents paused" ), NULL },
         { "version",    '\0', 0, G_OPTION_ARG_NONE,
           &showversion, _( "Show version number and exit" ), NULL },
-#ifdef STATUS_ICON_SUPPORTED
         { "minimized",  'm', 0, G_OPTION_ARG_NONE,
           &startminimized,
           _( "Start minimized in notification area" ), NULL },
-#endif
         { "config-dir", 'g', 0, G_OPTION_ARG_FILENAME, &configDir,
           _( "Where to look for configuration files" ), NULL },
         { NULL, 0,   0, 0, NULL, NULL, NULL }
index 0c38d9079429da94d717039681c8d7f71c09aada..9e95161afd47886a385c9c6a9fafc7988ec10aa0 100644 (file)
@@ -31,11 +31,6 @@ get_core_quark( void )
 
 #define ICON_NAME "transmission"
 
-#ifndef STATUS_ICON_SUPPORTED
-gpointer gtr_icon_new( TrCore * core UNUSED ) { return NULL; }
-void gtr_icon_refresh( gpointer vicon UNUSED ) { }
-#else
-
 #ifdef HAVE_LIBAPPINDICATOR
 void
 gtr_icon_refresh( gpointer vindicator UNUSED )
@@ -138,10 +133,10 @@ getIconName( void )
     return icon_name;
 }
 
-#ifdef HAVE_LIBAPPINDICATOR
 gpointer
 gtr_icon_new( TrCore * core)
 {
+#ifdef HAVE_LIBAPPINDICATOR
     GtkWidget * w;
     const char * icon_name = getIconName( );
     AppIndicator * indicator = app_indicator_new( ICON_NAME, icon_name, APP_INDICATOR_CATEGORY_SYSTEM_SERVICES );
@@ -150,19 +145,12 @@ gtr_icon_new( TrCore * core)
     app_indicator_set_menu( indicator, GTK_MENU ( w ) );
     g_object_set_qdata( G_OBJECT( indicator ), get_core_quark( ), core );
     return indicator;
-}
 #else
-gpointer
-gtr_icon_new( TrCore * core )
-{
     const char * icon_name = getIconName( );
     GtkStatusIcon * icon = gtk_status_icon_new_from_icon_name( icon_name );
     g_signal_connect( icon, "activate", G_CALLBACK( activated ), NULL );
     g_signal_connect( icon, "popup-menu", G_CALLBACK( popup ), NULL );
     g_object_set_qdata( G_OBJECT( icon ), get_core_quark( ), core );
     return icon;
-}
-
-#endif
-
 #endif
+}
index 8a4b975a5b51456d1dc10e0876982ecb452de10c..5e8c9057175fc3b8e32365cc69ed3155073d1660 100644 (file)
 #include <gtk/gtk.h>
 #include "tr-core.h"
 
-#if GTK_CHECK_VERSION( 2,10,0 )
- #define STATUS_ICON_SUPPORTED
-#endif
-
 gpointer  gtr_icon_new      ( TrCore * core );
 void      gtr_icon_refresh  ( gpointer );