--- a/pidgin/gtkconv.c Wed Jul 06 22:04:06 2011 +0000
+++ b/pidgin/gtkconv.c Thu Jul 07 04:47:10 2011 +0000
@@ -7883,6 +7883,8 @@
purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/send_underline", FALSE);
purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/spellcheck", TRUE);
purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", TRUE);
+ purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/resize_custom_smileys", TRUE); + purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/custom_smileys_size", 96); purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", 2);
purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps", TRUE);
--- a/pidgin/gtkimhtml.c Wed Jul 06 22:04:06 2011 +0000
+++ b/pidgin/gtkimhtml.c Thu Jul 07 04:47:10 2011 +0000
@@ -5691,18 +5691,19 @@
gtk_custom_smiley_size_prepared(GdkPixbufLoader *loader, gint width, gint height, gpointer data)
-#define CUSTOM_SMILEY_SIZE 96 /* XXX: Should this be a theme setting? */
- if (width <= CUSTOM_SMILEY_SIZE && height <= CUSTOM_SMILEY_SIZE)
- height = height * CUSTOM_SMILEY_SIZE / width;
- width = CUSTOM_SMILEY_SIZE;
- width = width * CUSTOM_SMILEY_SIZE / height;
- height = CUSTOM_SMILEY_SIZE;
+ if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/resize_custom_smileys")) { + int custom_smileys_size = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/custom_smileys_size"); + if (width <= custom_smileys_size && height <= custom_smileys_size) + height = height * custom_smileys_size / width; + width = custom_smileys_size; + width = width * custom_smileys_size / height; + height = custom_smileys_size;
gdk_pixbuf_loader_set_size(loader, width, height);
--- a/pidgin/gtkprefs.c Wed Jul 06 22:04:06 2011 +0000
+++ b/pidgin/gtkprefs.c Thu Jul 07 04:47:10 2011 +0000
@@ -1448,6 +1448,9 @@
+ GtkWidget *spin_button; ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE);
gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER);
@@ -1480,6 +1483,24 @@
pidgin_prefs_checkbox(_("F_lash window when IMs are received"), PIDGIN_PREFS_ROOT "/win32/blink_im", vbox);
+ hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + checkbox = pidgin_prefs_checkbox(_("Resize incoming custom smileys"), + PIDGIN_PREFS_ROOT "/conversations/resize_custom_smileys", hbox); + spin_button = pidgin_prefs_labeled_spin_button(hbox, + PIDGIN_PREFS_ROOT "/conversations/custom_smileys_size", + if (!purple_prefs_get_bool( + PIDGIN_PREFS_ROOT "/conversations/resize_custom_smileys")) + gtk_widget_set_sensitive(GTK_WIDGET(spin_button), FALSE); + g_signal_connect(G_OBJECT(checkbox), "clicked", + G_CALLBACK(pidgin_toggle_sensitive), spin_button); + pidgin_add_widget_to_vbox(GTK_BOX(vbox), NULL, NULL, hbox, TRUE, NULL); pidgin_prefs_labeled_spin_button(vbox,
_("Minimum input area height in lines:"),