aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-08-15 04:37:38 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-15 04:37:38 +0800
commit31ab3e7713d0613e6bd1cbb1610fed82cc53ddb8 (patch)
treed810a8e224fb47b35a2add66b583ef9a257d296c /widgets/misc
parent09ccc1cdd7af0a5f4dfa7ed0d10d3fc463920f79 (diff)
downloadgsoc2013-evolution-31ab3e7713d0613e6bd1cbb1610fed82cc53ddb8.tar.gz
gsoc2013-evolution-31ab3e7713d0613e6bd1cbb1610fed82cc53ddb8.tar.zst
gsoc2013-evolution-31ab3e7713d0613e6bd1cbb1610fed82cc53ddb8.zip
** Fixes bug #547411
2008-08-14 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #547411 * data/icons/hicolor_status_32x32_online.png: * data/icons/hicolor_status_32x32_online.svg: * data/icons/hicolor_status_32x32_offline.png: * data/icons/hicolor_status_32x32_offline.svg: New, Tangoized versions of the old "art" images. * art/online.png: * art/offline.png: These are now obsolete. Remove them. * widgets/misc/e-online-button.c (e_online_button_set_online): The button icons are themed now but still oblong. Load the icons by filename so GTK+ doesn't scale them. svn path=/trunk/; revision=35995
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-online-button.c20
2 files changed, 20 insertions, 8 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 15f82821c4..7f8567f96b 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,5 +1,13 @@
2008-08-14 Matthew Barnes <mbarnes@redhat.com>
+ ** Fixes part of bug #547411
+
+ * e-online-button.c (e_online_button_set_online):
+ The button icons are themed now but still oblong.
+ Load the icons by filename so GTK+ doesn't scale them.
+
+2008-08-14 Matthew Barnes <mbarnes@redhat.com>
+
* e-multi-config-dialog.c:
* e-send-options.c:
Use e_display_help() for displaying help.
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index 7391384950..346aec2857 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -22,9 +22,6 @@
#include <glib/gi18n.h>
-#define ONLINE_IMAGE "online.png"
-#define OFFLINE_IMAGE "offline.png"
-
#define E_ONLINE_BUTTON_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate))
@@ -177,18 +174,25 @@ e_online_button_set_online (EOnlineButton *button,
gboolean online)
{
GtkImage *image;
- gchar *filename;
- const gchar *image_name;
+ GtkIconInfo *icon_info;
+ GtkIconTheme *icon_theme;
+ const gchar *filename;
+ const gchar *icon_name;
g_return_if_fail (E_IS_ONLINE_BUTTON (button));
button->priv->online = online;
- image_name = online ? ONLINE_IMAGE : OFFLINE_IMAGE;
image = GTK_IMAGE (button->priv->image);
- filename = g_build_filename (EVOLUTION_IMAGES, image_name, NULL);
+ icon_name = online ? "online" : "offline";
+ icon_theme = gtk_icon_theme_get_default ();
+
+ /* Prevent GTK+ from scaling these rectangular icons. */
+ icon_info = gtk_icon_theme_lookup_icon (
+ icon_theme, icon_name, GTK_ICON_SIZE_BUTTON, 0);
+ filename = gtk_icon_info_get_filename (icon_info);
gtk_image_set_from_file (image, filename);
- g_free (filename);
+ gtk_icon_info_free (icon_info);
g_object_notify (G_OBJECT (button), "online");
}