/pidgin/main: d9ff435d843d: Remove extra width sizing in the min...
Elliott Sales de Andrade
qulogic at pidgin.im
Tue Aug 28 03:43:24 EDT 2012
Changeset: d9ff435d843d9292d61af121027ac083234c4e77
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2012-08-28 03:36 -0400
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/d9ff435d843d
Description:
Remove extra width sizing in the minidialog for GTK3.
I never knew why this width was applied to so many widgets, though. Someone
should try removing all this stuff on GTK2 too.
Fixes #15292.
diffstat:
pidgin/minidialog.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (59 lines):
diff --git a/pidgin/minidialog.c b/pidgin/minidialog.c
--- a/pidgin/minidialog.c
+++ b/pidgin/minidialog.c
@@ -455,6 +455,7 @@ pidgin_mini_dialog_class_init(PidginMini
g_object_class_install_property (object_class, PROP_ENABLE_DESCRIPTION_MARKUP, param_spec);
}
+#if !GTK_CHECK_VERSION(3,0,0)
/* 16 is the width of the icon, due to PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL */
#define BLIST_WIDTH_OTHER_THAN_LABEL \
((PIDGIN_HIG_BOX_SPACE * 3) + 16)
@@ -476,13 +477,16 @@ blist_width_changed_cb(const char *name,
gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
}
+#endif
static void
pidgin_mini_dialog_init(PidginMiniDialog *self)
{
GtkBox *self_box = GTK_BOX(self);
+#if !GTK_CHECK_VERSION(3,0,0)
guint blist_width = purple_prefs_get_int(BLIST_WIDTH_PREF);
guint label_width = blist_width - BLIST_WIDTH_OTHER_THAN_LABEL;
+#endif
PidginMiniDialogPrivate *priv = g_new0(PidginMiniDialogPrivate, 1);
self->priv = priv;
@@ -495,7 +499,9 @@ pidgin_mini_dialog_init(PidginMiniDialog
gtk_misc_set_alignment(GTK_MISC(priv->icon), 0, 0);
priv->title = GTK_LABEL(gtk_label_new(NULL));
+#if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
+#endif
gtk_label_set_line_wrap(priv->title, TRUE);
gtk_label_set_selectable(priv->title, TRUE);
gtk_misc_set_alignment(GTK_MISC(priv->title), 0, 0);
@@ -504,7 +510,9 @@ pidgin_mini_dialog_init(PidginMiniDialog
gtk_box_pack_start(priv->title_box, GTK_WIDGET(priv->title), TRUE, TRUE, 0);
priv->desc = GTK_LABEL(gtk_label_new(NULL));
+#if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
+#endif
gtk_label_set_line_wrap(priv->desc, TRUE);
gtk_misc_set_alignment(GTK_MISC(priv->desc), 0, 0);
gtk_label_set_selectable(priv->desc, TRUE);
@@ -513,8 +521,10 @@ pidgin_mini_dialog_init(PidginMiniDialog
*/
g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
+#if !GTK_CHECK_VERSION(3,0,0)
purple_prefs_connect_callback(self, BLIST_WIDTH_PREF,
blist_width_changed_cb, self);
+#endif
self->contents = GTK_BOX(gtk_vbox_new(FALSE, 0));
More information about the Commits
mailing list