mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(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:
@@ -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 }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user