mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +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_WIDTH, 300 );
|
||||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 );
|
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 );
|
||||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 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;
|
str = NULL;
|
||||||
#if GLIB_CHECK_VERSION( 2, 14, 0 )
|
#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_STATUSBAR_STATS "statusbar-stats"
|
||||||
#define PREF_KEY_TOOLBAR "show-toolbar"
|
#define PREF_KEY_TOOLBAR "show-toolbar"
|
||||||
#define PREF_KEY_BLOCKLIST_UPDATES_ENABLED "blocklist-updates-enabled"
|
#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_HEIGHT "main-window-height"
|
||||||
#define PREF_KEY_MAIN_WINDOW_WIDTH "main-window-width"
|
#define PREF_KEY_MAIN_WINDOW_WIDTH "main-window-width"
|
||||||
#define PREF_KEY_MAIN_WINDOW_X "main-window-x"
|
#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_SHADOW_IN );
|
||||||
gtk_container_add( GTK_CONTAINER( w ), p->view );
|
gtk_container_add( GTK_CONTAINER( w ), p->view );
|
||||||
|
|
||||||
/* layout the widgets */
|
/* lay out the widgets */
|
||||||
{
|
gtk_box_pack_start( GTK_BOX( vbox ), mainmenu, FALSE, FALSE, 0 );
|
||||||
const char * str = pref_string_get( PREF_KEY_MAIN_WINDOW_LAYOUT_ORDER );
|
gtk_box_pack_start( GTK_BOX( vbox ), toolbar, FALSE, FALSE, 0 );
|
||||||
char ** tokens = g_strsplit( str, ",", -1 );
|
gtk_box_pack_start( GTK_BOX( vbox ), filter, FALSE, FALSE, 0 );
|
||||||
for( i=0; tokens && tokens[i]; ++i )
|
gtk_box_pack_start( GTK_BOX( vbox ), list, TRUE, TRUE, 0 );
|
||||||
{
|
gtk_box_pack_start( GTK_BOX( vbox ), status, FALSE, FALSE, 0 );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
/* this is to determine the maximum width/height for the label */
|
/* this is to determine the maximum width/height for the label */
|
||||||
|
|
Loading…
Reference in a new issue