pidgin: dfc2a975: Use an inline RC style to get rid of som...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Mar 20 02:51:23 EDT 2010
-----------------------------------------------------------------
Revision: dfc2a97552bcd3b5317a110f55464a2241eab965
Ancestor: 2201ce7ce7e248c26f7eac80d2097135fbfdeb1b
Author: qulogic at pidgin.im
Date: 2010-03-20T06:22:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dfc2a97552bcd3b5317a110f55464a2241eab965
Modified files:
pidgin/gtkutils.c
ChangeLog:
Use an inline RC style to get rid of some other padding to make the small
buttons even smaller, as suggested by Paradox on trac, and nicked from
nautilus.
Refs #8727.
-------------- next part --------------
============================================================
--- pidgin/gtkutils.c 0b05ff9c955d8b6250d7d30da774ed9affdfaa85
+++ pidgin/gtkutils.c a8b5ac4ca516bcc377c0a0c524a9addac9687de5
@@ -156,7 +156,6 @@ pidgin_create_small_button(GtkWidget *im
pidgin_create_small_button(GtkWidget *image)
{
GtkWidget *button;
- GtkRcStyle *rcstyle;
button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
@@ -164,11 +163,8 @@ pidgin_create_small_button(GtkWidget *im
/* don't allow focus on the close button */
gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
- /* make it as small as possible */
- rcstyle = gtk_rc_style_new();
- rcstyle->xthickness = rcstyle->ythickness = 0;
- gtk_widget_modify_style(button, rcstyle);
- gtk_rc_style_unref(rcstyle);
+ /* set style to make it as small as possible */
+ gtk_widget_set_name(button, "pidgin-small-close-button");
gtk_widget_show(image);
@@ -3473,6 +3469,16 @@ void pidgin_utils_init(void)
if (purple_running_gnome())
register_gnome_url_handlers();
+ /* Used to make small buttons */
+ gtk_rc_parse_string("style \"pidgin-small-close-button\"\n"
+ "{\n"
+ "GtkWidget::focus-padding = 0\n"
+ "GtkWidget::focus-line-width = 0\n"
+ "xthickness = 0\n"
+ "ythickness = 0\n"
+ "}\n"
+ "widget \"*.pidgin-small-close-button\" style \"pidgin-small-close-button\"");
+
#ifdef _WIN32
winpidgin_register_win32_url_handlers();
#endif
More information about the Commits
mailing list