summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-07-03 14:53:33 -0700
committerPhilip Chimento <philip@endlessm.com>2013-07-03 14:53:33 -0700
commit5e9036f2d597b4a902be2778d02db689210c1a49 (patch)
tree2e3969f33bb3373a38c6b4b8258584fe5b9bcf27
parent14ee9d1d630986d57ec3af1441493ccdbc6f0dac (diff)
Abstract topbar icon names into constants
Have constants for the icon names instead of magic string literals in the code. [endlessm/eos-sdk#132]
-rw-r--r--endless/eostopbar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/endless/eostopbar.c b/endless/eostopbar.c
index d8516bd..0b0d7d5 100644
--- a/endless/eostopbar.c
+++ b/endless/eostopbar.c
@@ -20,6 +20,8 @@
#define _EOS_STYLE_CLASS_TOP_BAR "top-bar"
#define _EOS_TOP_BAR_HEIGHT_PX 36
#define _EOS_TOP_BAR_BUTTON_PADDING_PX 3
+#define _EOS_TOP_BAR_MINIMIZE_ICON_NAME "list-remove-symbolic"
+#define _EOS_TOP_BAR_CLOSE_ICON_NAME "window-close-symbolic"
G_DEFINE_TYPE (EosTopBar, eos_top_bar, GTK_TYPE_EVENT_BOX)
@@ -139,7 +141,7 @@ eos_top_bar_init (EosTopBar *self)
self->priv->minimize_button = gtk_button_new ();
gtk_widget_set_valign (self->priv->minimize_button, GTK_ALIGN_CENTER);
self->priv->minimize_icon =
- gtk_image_new_from_icon_name ("list-remove-symbolic",
+ gtk_image_new_from_icon_name (_EOS_TOP_BAR_MINIMIZE_ICON_NAME,
GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_button_set_image (GTK_BUTTON (self->priv->minimize_button),
self->priv->minimize_icon);
@@ -147,7 +149,7 @@ eos_top_bar_init (EosTopBar *self)
self->priv->close_button = gtk_button_new ();
gtk_widget_set_valign (self->priv->close_button, GTK_ALIGN_CENTER);
self->priv->close_icon =
- gtk_image_new_from_icon_name ("window-close-symbolic",
+ gtk_image_new_from_icon_name (_EOS_TOP_BAR_CLOSE_ICON_NAME,
GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_button_set_image (GTK_BUTTON (self->priv->close_button),
self->priv->close_icon);