Mercurial > pidgin.yaz
comparison pidgin/gtknotify.c @ 18860:0a8dc9eb4f8e
Allow notification labels to be selectable (for copy-and-paste purposes). Fixes #563.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 10 Aug 2007 02:51:54 +0000 |
parents | 3f45fdbfac1b |
children | c5898e7d70fa |
comparison
equal
deleted
inserted
replaced
18859:c1546f6c0432 | 18860:0a8dc9eb4f8e |
---|---|
272 | 272 |
273 label = gtk_label_new(NULL); | 273 label = gtk_label_new(NULL); |
274 | 274 |
275 gtk_label_set_markup(GTK_LABEL(label), label_text); | 275 gtk_label_set_markup(GTK_LABEL(label), label_text); |
276 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 276 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
277 gtk_label_set_selectable(GTK_LABEL(label), TRUE); | |
277 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 278 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
278 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 279 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
279 | 280 |
280 gtk_widget_show_all(dialog); | 281 gtk_widget_show_all(dialog); |
281 | 282 |
607 | 608 |
608 label = gtk_label_new(NULL); | 609 label = gtk_label_new(NULL); |
609 | 610 |
610 gtk_label_set_markup(GTK_LABEL(label), label_text); | 611 gtk_label_set_markup(GTK_LABEL(label), label_text); |
611 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 612 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
613 gtk_label_set_selectable(GTK_LABEL(label), TRUE); | |
612 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 614 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
613 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | 615 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
614 gtk_widget_show(label); | 616 gtk_widget_show(label); |
615 | 617 |
616 /* Add the imhtml */ | 618 /* Add the imhtml */ |
624 | 626 |
625 /* Add the Close button. */ | 627 /* Add the Close button. */ |
626 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | 628 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
627 gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); | 629 gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); |
628 gtk_widget_show(button); | 630 gtk_widget_show(button); |
631 gtk_widget_grab_focus(button); | |
629 | 632 |
630 g_signal_connect_swapped(G_OBJECT(button), "clicked", | 633 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
631 G_CALLBACK(gtk_widget_destroy), window); | 634 G_CALLBACK(gtk_widget_destroy), window); |
632 g_signal_connect(G_OBJECT(window), "key_press_event", | 635 g_signal_connect(G_OBJECT(window), "key_press_event", |
633 G_CALLBACK(formatted_input_cb), NULL); | 636 G_CALLBACK(formatted_input_cb), NULL); |