wereHamster's patch to remove some clutter from the prefs dialog

This commit is contained in:
Charles Kerr 2007-12-13 19:54:24 +00:00
parent 7f335e1bf0
commit 449186969f
3 changed files with 35 additions and 21 deletions

View File

@ -77,6 +77,23 @@ hig_workarea_add_wide_control (GtkWidget * table,
++*row;
}
void
hig_workarea_add_double_control (GtkWidget * table,
int * row,
GtkWidget * wl,
GtkWidget * wr)
{
gtk_table_attach (GTK_TABLE(table), wl,
1, 2, *row, *row+1,
GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE(table), wr,
3, 4, *row, *row+1,
GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
++*row;
}
GtkWidget *
hig_workarea_add_wide_checkbutton (GtkWidget * table,
int * row,

View File

@ -41,6 +41,12 @@ hig_workarea_add_wide_control (GtkWidget * table,
int * row,
GtkWidget * w);
void
hig_workarea_add_double_control (GtkWidget * table,
int * row,
GtkWidget * wl,
GtkWidget * wr);
GtkWidget*
hig_workarea_add_wide_checkbutton (GtkWidget * table,
int * row,

View File

@ -197,7 +197,7 @@ tr_prefs_dialog_new( GObject * core, GtkWindow * parent )
int row = 0;
const char * s;
GtkWidget * t;
GtkWidget * w;
GtkWidget * w, * w2;
GtkWidget * l;
GtkWidget * d;
@ -212,35 +212,26 @@ tr_prefs_dialog_new( GObject * core, GtkWindow * parent )
t = hig_workarea_create ();
hig_workarea_add_section_title (t, &row, _("Speed Limits"));
hig_workarea_add_section_spacer (t, row, 4);
hig_workarea_add_section_spacer (t, row, 2);
s = _("_Limit Upload Speed");
s = _("_Limit Upload Speed (KiB/s)");
w = new_check_button( s, PREF_KEY_UL_LIMIT_ENABLED, core );
hig_workarea_add_wide_control( t, &row, w );
w2 = new_spin_button( PREF_KEY_UL_LIMIT, core, 0, INT_MAX );
hig_workarea_add_double_control( t, &row, w, w2 );
w = new_spin_button( PREF_KEY_UL_LIMIT, core, 0, INT_MAX );
s = _("Maximum _Upload Speed (KiB/s)");
l = hig_workarea_add_row( t, &row, s, w, NULL );
s = _("Li_mit Download Speed");
s = _("Li_mit Download Speed (KiB/s)");
w = new_check_button( s, PREF_KEY_DL_LIMIT_ENABLED, core );
hig_workarea_add_wide_control( t, &row, w );
w = new_spin_button( PREF_KEY_DL_LIMIT, core, 0, INT_MAX );
s = _("Maximum _Download Speed (KiB/s)");
l = hig_workarea_add_row( t, &row, s, w, NULL );
w2 = new_spin_button( PREF_KEY_DL_LIMIT, core, 0, INT_MAX );
hig_workarea_add_double_control( t, &row, w, w2 );
hig_workarea_add_section_divider( t, &row );
hig_workarea_add_section_title (t, &row, _("Downloads"));
hig_workarea_add_section_spacer (t, row, 4);
hig_workarea_add_section_spacer (t, row, 3);
s = _("Al_ways prompt for download directory");
s = _("P_rompt for download directory");
w = new_check_button( s, PREF_KEY_DIR_ASK, core );
hig_workarea_add_wide_control( t, &row, w );
w = new_path_chooser_button( PREF_KEY_DIR_DEFAULT, core );
s = _("Download Di_rectory");
l = hig_workarea_add_row( t, &row, s, w, NULL );
w2 = new_path_chooser_button( PREF_KEY_DIR_DEFAULT, core );
hig_workarea_add_double_control( t, &row, w, w2 );
w = new_action_combo( PREF_KEY_ADDSTD, core );
s = _("For torrents added _normally:");