/pidgin/main: 02b5a573215c: Fix a glib warning about bad gtk_wid...
Tomasz Wasilczyk
twasilczyk at pidgin.im
Mon Mar 17 05:50:06 EDT 2014
Changeset: 02b5a573215c70c6c1ecc9ab7d7bbd24bbf666a9
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-03-17 10:41 +0100
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/02b5a573215c
Description:
Fix a glib warning about bad gtk_widget_set_size_request call
diffstat:
pidgin/gtkblist.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (24 lines):
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -5921,6 +5921,7 @@ static void pidgin_blist_show(PurpleBudd
GError *error;
GtkAccelGroup *accel_group;
GtkTreeSelection *selection;
+ int blist_width;
GtkTargetEntry dte[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
{"application/x-im-contact", 0, DRAG_BUDDY},
{"text/x-vcard", 0, DRAG_VCARD },
@@ -6087,8 +6088,10 @@ static void pidgin_blist_show(PurpleBudd
gtkblist->headline_image = gtk_image_new_from_pixbuf(NULL);
gtk_misc_set_alignment(GTK_MISC(gtkblist->headline_image), 0.0, 0);
gtkblist->headline_label = gtk_label_new(NULL);
- gtk_widget_set_size_request(gtkblist->headline_label,
- purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/width")-25,-1);
+ blist_width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/width") - 25;
+ if (blist_width < -1)
+ blist_width = -1;
+ gtk_widget_set_size_request(gtkblist->headline_label, blist_width, -1);
gtk_label_set_line_wrap(GTK_LABEL(gtkblist->headline_label), TRUE);
gtk_box_pack_start(GTK_BOX(gtkblist->headline), gtkblist->headline_image, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(gtkblist->headline), gtkblist->headline_label, TRUE, TRUE, 0);
More information about the Commits
mailing list