Mercurial > pidgin.yaz
comparison src/gtkrequest.c @ 7068:faddd59a0e74
[gaim-migrate @ 7632]
Make some of the request dialogs more pretty, and increase the size for the
multi-line input dialog.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 30 Sep 2003 08:14:33 +0000 |
parents | 87bfe52a4099 |
children | c6807437dcd7 |
comparison
equal
deleted
inserted
replaced
7067:71e0da45abe6 | 7068:faddd59a0e74 |
---|---|
26 #include "prefs.h" | 26 #include "prefs.h" |
27 | 27 |
28 #include "gtkrequest.h" | 28 #include "gtkrequest.h" |
29 #include "gtkutils.h" | 29 #include "gtkutils.h" |
30 #include "stock.h" | 30 #include "stock.h" |
31 #include "ui.h" | |
31 | 32 |
32 #ifdef USE_GTKSPELL | 33 #ifdef USE_GTKSPELL |
33 # include <gtkspell/gtkspell.h> | 34 # include <gtkspell/gtkspell.h> |
34 #endif | 35 #endif |
35 | 36 |
262 | 263 |
263 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); | 264 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); |
264 | 265 |
265 /* Descriptive label */ | 266 /* Descriptive label */ |
266 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 267 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" |
267 "%s</span>\n\n%s", | 268 "%s</span>%s%s", |
268 primary, (secondary ? secondary : "")); | 269 primary, |
270 (secondary ? "\n\n" : ""), | |
271 (secondary ? secondary : "")); | |
269 | 272 |
270 label = gtk_label_new(NULL); | 273 label = gtk_label_new(NULL); |
271 | 274 |
272 gtk_label_set_markup(GTK_LABEL(label), label_text); | 275 gtk_label_set_markup(GTK_LABEL(label), label_text); |
273 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 276 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
286 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | 289 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), |
287 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | 290 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); |
288 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), | 291 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), |
289 GTK_SHADOW_IN); | 292 GTK_SHADOW_IN); |
290 | 293 |
291 gtk_widget_set_size_request(sw, 300, 75); | 294 gtk_widget_set_size_request(sw, 320, 130); |
292 | 295 |
293 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | 296 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
294 | 297 |
295 entry = gtk_text_view_new(); | 298 entry = gtk_text_view_new(); |
296 gtk_text_view_set_editable(GTK_TEXT_VIEW(entry), TRUE); | 299 gtk_text_view_set_editable(GTK_TEXT_VIEW(entry), TRUE); |
300 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(entry), GTK_WRAP_WORD_CHAR); | |
297 | 301 |
298 #ifdef USE_GTKSPELL | 302 #ifdef USE_GTKSPELL |
299 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) | 303 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) |
300 gtkspell_new_attach(GTK_TEXT_VIEW(entry), NULL, NULL); | 304 gtkspell_new_attach(GTK_TEXT_VIEW(entry), NULL, NULL); |
301 #endif | 305 #endif |
410 vbox = gtk_vbox_new(FALSE, 12); | 414 vbox = gtk_vbox_new(FALSE, 12); |
411 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); | 415 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); |
412 | 416 |
413 /* Descriptive label */ | 417 /* Descriptive label */ |
414 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 418 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" |
415 "%s</span>\n\n%s", | 419 "%s</span>%s%s", |
416 primary, (secondary ? secondary : "")); | 420 primary, |
421 (secondary ? "\n\n" : ""), | |
422 (secondary ? secondary : "")); | |
417 | 423 |
418 label = gtk_label_new(NULL); | 424 label = gtk_label_new(NULL); |
419 | 425 |
420 gtk_label_set_markup(GTK_LABEL(label), label_text); | 426 gtk_label_set_markup(GTK_LABEL(label), label_text); |
421 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 427 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
496 | 502 |
497 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 503 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
498 | 504 |
499 if (primary != NULL || secondary != NULL) { | 505 if (primary != NULL || secondary != NULL) { |
500 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" | 506 label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">" |
501 "%s</span>\n\n%s", | 507 "%s</span>%s%s", |
502 (primary ? primary : ""), | 508 (primary ? primary : ""), |
509 (secondary ? "\n\n" : ""), | |
503 (secondary ? secondary : "")); | 510 (secondary ? secondary : "")); |
504 | 511 |
505 label = gtk_label_new(NULL); | 512 label = gtk_label_new(NULL); |
506 | 513 |
507 gtk_label_set_markup(GTK_LABEL(label), label_text); | 514 gtk_label_set_markup(GTK_LABEL(label), label_text); |
628 GTK_POLICY_AUTOMATIC); | 635 GTK_POLICY_AUTOMATIC); |
629 | 636 |
630 textview = gtk_text_view_new(); | 637 textview = gtk_text_view_new(); |
631 gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), | 638 gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), |
632 TRUE); | 639 TRUE); |
640 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(textview), | |
641 GTK_WRAP_WORD_CHAR); | |
633 | 642 |
634 #ifdef USE_GTKSPELL | 643 #ifdef USE_GTKSPELL |
635 if (gaim_prefs_get_bool( | 644 if (gaim_prefs_get_bool( |
636 "/gaim/gtk/conversations/spellcheck")) | 645 "/gaim/gtk/conversations/spellcheck")) |
637 { | 646 { |