Changeset 6182 for branches/1.2x
- Timestamp:
- Jun 13, 2008, 9:12:49 PM (14 years ago)
- Location:
- branches/1.2x/gtk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2x/gtk/main.c
r6181 r6182 1190 1190 else if (!strcmp (action_name, "help")) 1191 1191 { 1192 gtr_open_file( "http://www.transmissionbt.com/help/gtk/" 1193 SHORT_VERSION_STRING ); 1192 char * url = gtr_get_help_url( ); 1193 gtr_open_file( url ); 1194 g_free( url ); 1194 1195 } 1195 1196 else if (!strcmp (action_name, "toggle-main-window")) -
branches/1.2x/gtk/tr-prefs.c
r5782 r6182 104 104 response_cb( GtkDialog * dialog, int response, gpointer unused UNUSED ) 105 105 { 106 if( response == GTK_RESPONSE_HELP ) 107 gtr_open_file( "http://www.transmissionbt.com/help/gtk/" 108 SHORT_VERSION_STRING "/html/preferences.html" ); 106 if( response == GTK_RESPONSE_HELP ) { 107 char * base = gtr_get_help_url( ); 108 char * url = g_strdup_printf( "%s/html/preferences.html", base ); 109 gtr_open_file( url ); 110 g_free( url ); 111 g_free( base ); 112 } 109 113 110 114 if( response == GTK_RESPONSE_CLOSE ) -
branches/1.2x/gtk/util.c
r5735 r6182 429 429 } 430 430 431 char* 432 gtr_get_help_url( void ) 433 { 434 const char * fmt = "http://www.transmissionbt.com/help/gtk/%d.%dx"; 435 int major, minor; 436 sscanf( SHORT_VERSION_STRING, "%d.%d", &major, &minor ); 437 return g_strdup_printf( fmt, major, minor/10 ); 438 } 439 431 440 void 432 441 gtr_open_file( const char * path ) -
branches/1.2x/gtk/util.h
r5662 r6182 90 90 void gtr_uninhibit_hibernation( guint ); 91 91 92 char* gtr_get_help_url( void ); 92 93 #ifdef GTK_MAJOR_VERSION 93 94
Note: See TracChangeset
for help on using the changeset viewer.