(trunk gtk) remove an unnecessary GTK_CHECK_VERSION(2,10,0) check now that the minimum gtk+ version's been bumped

This commit is contained in:
Jordan Lee
2011-08-08 16:02:37 +00:00
parent f23b930f36
commit 10aa77490a
3 changed files with 2 additions and 20 deletions

View 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 }

View 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
#endif

View File

@@ -16,10 +16,6 @@
#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 );