Mercurial > pidgin.yaz
comparison src/gtkrequest.c @ 7843:9408c12b4a61
[gaim-migrate @ 8497]
Change the alias buddy, alias chat, and alias contact dialogs. They're
supposed to be more HIG-friendly. They're definitely a bit smaller...
I guess that's good? I dunno. I think I'm just not used to them being
so small. This was from a patch from Nathan Fredrickson.
I changed all the request dialogs so they do not require primary text.
I'm not really sure if this is good or not. I dunno. Like, add buddy
and add chat both have only small text, and they look ok.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 13 Dec 2003 02:29:23 +0000 |
parents | cf6a7939af78 |
children | a6298fd7ee21 |
comparison
equal
deleted
inserted
replaced
7842:9227553c97dd | 7843:9408c12b4a61 |
---|---|
209 const char *secondary, const char *default_value, | 209 const char *secondary, const char *default_value, |
210 gboolean multiline, gboolean masked, | 210 gboolean multiline, gboolean masked, |
211 const char *ok_text, GCallback ok_cb, | 211 const char *ok_text, GCallback ok_cb, |
212 const char *cancel_text, GCallback cancel_cb, | 212 const char *cancel_text, GCallback cancel_cb, |
213 void *user_data) | 213 void *user_data) |
214 | |
214 { | 215 { |
215 GaimGtkRequestData *data; | 216 GaimGtkRequestData *data; |
216 GtkWidget *dialog; | 217 GtkWidget *dialog; |
217 GtkWidget *vbox; | 218 GtkWidget *vbox; |
218 GtkWidget *hbox; | 219 GtkWidget *hbox; |
264 vbox = gtk_vbox_new(FALSE, 12); | 265 vbox = gtk_vbox_new(FALSE, 12); |
265 | 266 |
266 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); | 267 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); |
267 | 268 |
268 /* Descriptive label */ | 269 /* Descriptive label */ |
269 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 270 label_text = g_strdup_printf((primary ? "<span weight=\"bold\" size=\"larger\">" |
270 "%s</span>%s%s", | 271 "%s</span>%s%s" : "%s%s%s"), |
271 primary, | 272 (primary ? primary : ""), |
272 (secondary ? "\n\n" : ""), | 273 ((primary && secondary) ? "\n\n" : ""), |
273 (secondary ? secondary : "")); | 274 (secondary ? secondary : "")); |
274 | 275 |
275 label = gtk_label_new(NULL); | 276 label = gtk_label_new(NULL); |
276 | 277 |
277 gtk_label_set_markup(GTK_LABEL(label), label_text); | 278 gtk_label_set_markup(GTK_LABEL(label), label_text); |
278 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 279 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
413 /* Vertical box */ | 414 /* Vertical box */ |
414 vbox = gtk_vbox_new(FALSE, 12); | 415 vbox = gtk_vbox_new(FALSE, 12); |
415 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); | 416 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); |
416 | 417 |
417 /* Descriptive label */ | 418 /* Descriptive label */ |
418 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 419 label_text = g_strdup_printf((primary ? "<span weight=\"bold\" size=\"larger\">" |
419 "%s</span>%s%s", | 420 "%s</span>%s%s" : "%s%s%s"), |
420 primary, | 421 (primary ? primary : ""), |
421 (secondary ? "\n\n" : ""), | 422 ((primary && secondary) ? "\n\n" : ""), |
422 (secondary ? secondary : "")); | 423 (secondary ? secondary : "")); |
423 | 424 |
424 label = gtk_label_new(NULL); | 425 label = gtk_label_new(NULL); |
425 | 426 |
426 gtk_label_set_markup(GTK_LABEL(label), label_text); | 427 gtk_label_set_markup(GTK_LABEL(label), label_text); |
427 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 428 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
501 gtk_widget_show(vbox); | 502 gtk_widget_show(vbox); |
502 | 503 |
503 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 504 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
504 | 505 |
505 if (primary != NULL || secondary != NULL) { | 506 if (primary != NULL || secondary != NULL) { |
506 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 507 label_text = g_strdup_printf((primary ? "<span weight=\"bold\" size=\"larger\">" |
507 "%s</span>%s%s", | 508 "%s</span>%s%s" : "%s%s%s"), |
508 (primary ? primary : ""), | 509 (primary ? primary : ""), |
509 (secondary ? "\n\n" : ""), | 510 ((primary && secondary) ? "\n\n" : ""), |
510 (secondary ? secondary : "")); | 511 (secondary ? secondary : "")); |
511 | 512 |
512 label = gtk_label_new(NULL); | 513 label = gtk_label_new(NULL); |
513 | 514 |
514 gtk_label_set_markup(GTK_LABEL(label), label_text); | 515 gtk_label_set_markup(GTK_LABEL(label), label_text); |
515 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 516 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |