mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(trunk gtk) Remove the `PREF_KEY_MAIN_WINDOW_LAYOUT_ORDER' preferences key. This feature seemed like a good idea once upon a time, but I've never heard a report of anyone actually using it...
This commit is contained in:
parent
0f9e1d0aa0
commit
83bdedec8e
3 changed files with 6 additions and 23 deletions
|
@ -188,7 +188,6 @@ tr_prefs_init_defaults( tr_benc * d )
|
|||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_WIDTH, 300 );
|
||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 );
|
||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 50 );
|
||||
tr_bencDictAddStr( d, PREF_KEY_MAIN_WINDOW_LAYOUT_ORDER, "menu,toolbar,filter,list,statusbar" );
|
||||
|
||||
str = NULL;
|
||||
#if GLIB_CHECK_VERSION( 2, 14, 0 )
|
||||
|
|
|
@ -42,7 +42,6 @@ GtkWidget * tr_prefs_dialog_new( GObject * core,
|
|||
#define PREF_KEY_STATUSBAR_STATS "statusbar-stats"
|
||||
#define PREF_KEY_TOOLBAR "show-toolbar"
|
||||
#define PREF_KEY_BLOCKLIST_UPDATES_ENABLED "blocklist-updates-enabled"
|
||||
#define PREF_KEY_MAIN_WINDOW_LAYOUT_ORDER "main-window-layout-order"
|
||||
#define PREF_KEY_MAIN_WINDOW_HEIGHT "main-window-height"
|
||||
#define PREF_KEY_MAIN_WINDOW_WIDTH "main-window-width"
|
||||
#define PREF_KEY_MAIN_WINDOW_X "main-window-x"
|
||||
|
|
|
@ -705,27 +705,12 @@ tr_window_new( GtkUIManager * ui_mgr, TrCore * core )
|
|||
GTK_SHADOW_IN );
|
||||
gtk_container_add( GTK_CONTAINER( w ), p->view );
|
||||
|
||||
/* layout the widgets */
|
||||
{
|
||||
const char * str = pref_string_get( PREF_KEY_MAIN_WINDOW_LAYOUT_ORDER );
|
||||
char ** tokens = g_strsplit( str, ",", -1 );
|
||||
for( i=0; tokens && tokens[i]; ++i )
|
||||
{
|
||||
const char * key = tokens[i];
|
||||
|
||||
if( !strcmp( key, "menu" ) )
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), mainmenu, FALSE, FALSE, 0 );
|
||||
else if( !strcmp( key, "toolbar" ) )
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), toolbar, FALSE, FALSE, 0 );
|
||||
else if( !strcmp( key, "filter" ) )
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), filter, FALSE, FALSE, 0 );
|
||||
else if( !strcmp( key, "list" ) )
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), list, TRUE, TRUE, 0 );
|
||||
else if( !strcmp( key, "statusbar" ) )
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), status, FALSE, FALSE, 0 );
|
||||
}
|
||||
g_strfreev( tokens );
|
||||
}
|
||||
/* lay out the widgets */
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), mainmenu, FALSE, FALSE, 0 );
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), toolbar, FALSE, FALSE, 0 );
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), filter, FALSE, FALSE, 0 );
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), list, TRUE, TRUE, 0 );
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), status, FALSE, FALSE, 0 );
|
||||
|
||||
{
|
||||
/* this is to determine the maximum width/height for the label */
|
||||
|
|
Loading…
Reference in a new issue