From 2d593502f4be4efaae1d80a387fba3c7ba14b26e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 28 Oct 2009 03:54:36 +0000 Subject: [PATCH] (trunk gtk) fix minor layout/resize errors in the torrent dialog's tracker tab --- gtk/details.c | 3 ++- gtk/hig.c | 15 +++++++++++++++ gtk/hig.h | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gtk/details.c b/gtk/details.c index 8f68dcb95..7789bc090 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -1681,6 +1681,7 @@ buildTrackerSummary( const char * key, const tr_tracker_stat * st, gboolean show break; case TR_TRACKER_ACTIVE: tr_strltime_rounded( timebuf, now - st->lastAnnounceStartTime, sizeof( timebuf ) ); + g_string_append_c( gstr, '\n' ); g_string_append_printf( gstr, _( "Asking for more peers now... %s" ), timebuf ); break; } @@ -1999,7 +2000,7 @@ onEditTrackers( GtkButton * button, gpointer data ) GTK_POLICY_AUTOMATIC ); gtk_container_add( GTK_CONTAINER( sw ), w ); gtk_container_add( GTK_CONTAINER( fr ), sw ); - hig_workarea_add_wide_control( t, &row, fr ); + hig_workarea_add_wide_tall_control( t, &row, fr ); hig_workarea_finish( t, &row ); gtk_box_pack_start( GTK_BOX( GTK_DIALOG( d )->vbox ), t, TRUE, TRUE, GUI_PAD_SMALL ); diff --git a/gtk/hig.c b/gtk/hig.c index 4691cadaf..1063be47b 100644 --- a/gtk/hig.c +++ b/gtk/hig.c @@ -91,6 +91,21 @@ hig_workarea_add_wide_control( GtkWidget * t, ++ * row; } +void +hig_workarea_add_wide_tall_control( GtkWidget * t, + int * row, + GtkWidget * w ) +{ + GtkWidget * r = rowNew( w ); + + gtk_table_attach( GTK_TABLE( t ), r, 0, 2, *row, *row + 1, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, + 0, 0 ); + + ++ * row; +} + GtkWidget * hig_workarea_add_wide_checkbutton( GtkWidget * t, int * row, diff --git a/gtk/hig.h b/gtk/hig.h index 502776b80..0f74426e7 100644 --- a/gtk/hig.h +++ b/gtk/hig.h @@ -33,6 +33,10 @@ void hig_workarea_add_section_title( GtkWidget * table, int * row, const char * section_title ); +void hig_workarea_add_wide_tall_control( GtkWidget * table, + int * row, + GtkWidget * w ); + void hig_workarea_add_wide_control( GtkWidget * table, int * row, GtkWidget * w );