From: Darren S. <ds...@us...> - 2004-10-29 18:32:27
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15243/src Modified Files: preferences.c Log Message: More fiddling with the layout (some widgets may be >160px wide). Index: preferences.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/preferences.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- preferences.c 28 Oct 2004 20:30:43 -0000 1.23 +++ preferences.c 29 Oct 2004 18:32:16 -0000 1.24 @@ -44,18 +44,17 @@ static int is_visible; #define do_two_columns { \ - gtk_table_attach(GTK_TABLE(table), label, 1,2, entries-1, entries, GTK_SHRINK|GTK_FILL, GTK_SHRINK|GTK_FILL, 5, 5); \ - gtk_widget_set_size_request (widget, 160, -1); \ - gtk_table_attach(GTK_TABLE(table), widget, 0,1, entries-1, entries, GTK_FILL,GTK_SHRINK, 2,5); \ + gtk_table_attach(GTK_TABLE(table), label, 1,4, entries-1, entries, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 5, 5); \ + gtk_table_attach(GTK_TABLE(table), widget, 0,1, entries-1, entries, GTK_EXPAND|GTK_FILL,GTK_SHRINK, 2,5); \ widgets++; \ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); \ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);\ sep = gtk_hseparator_new (); \ - gtk_table_attach(GTK_TABLE(table), sep, 0, 2, entries, entries+1, GTK_SHRINK|GTK_FILL, GTK_SHRINK|GTK_FILL, 5, 5);\ + gtk_table_attach(GTK_TABLE(table), sep, 0,4, entries, entries+1, GTK_EXPAND|GTK_FILL, GTK_SHRINK|GTK_FILL, 5, 5);\ } #define do_one_column { \ - gtk_table_attach(GTK_TABLE(table), widget, 0,2, entries-1, entries, GTK_EXPAND,0, 2,5); \ + gtk_table_attach(GTK_TABLE(table), widget, 0,4, entries-1, entries, GTK_EXPAND,0, 2,5); \ widgets++; \ } @@ -203,16 +202,17 @@ if (!strncmp (entry.key, section, len) && entry.description && entry.exp_level<20) { - char labeltext[256]; + char *labeltext = NULL; GtkWidget *sep; labelkey = &entry.key[len+1]; entries +=2; - snprintf(labeltext, 255, "%s\n%s", labelkey, entry.description); - + asprintf(&labeltext, "<b>%s</b>\n%s", labelkey, entry.description); label = gtk_label_new(labeltext); + free (labeltext); + gtk_label_set_use_markup (GTK_LABEL(label), TRUE); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); /* gtk_misc_set_alignment (GTK_MISC(label), 0.0, 1.0); */ gtk_label_set_line_wrap (GTK_LABEL(label), TRUE); |