[glabels] Theme friendly, glabels specific, action icons.



commit 065ffb88346791da881cfed8a06343c6b6e4b50c
Author: Jim Evins <evins snaught com>
Date:   Sun Sep 5 20:40:45 2010 -0400

    Theme friendly, glabels specific, action icons.

 configure.ac                                       |    2 -
 data/icons/16x16/Makefile.am                       |   31 +++-
 .../icons/16x16/actions/glabels-align-bottom.png   |  Bin 204 -> 204 bytes
 .../icons/16x16/actions/glabels-align-hcenter.png  |  Bin 212 -> 212 bytes
 .../icons/16x16/actions/glabels-align-left.png     |  Bin 207 -> 207 bytes
 .../icons/16x16/actions/glabels-align-right.png    |  Bin 219 -> 219 bytes
 .../icons/16x16/actions/glabels-align-top.png      |  Bin 209 -> 209 bytes
 .../icons/16x16/actions/glabels-align-vcenter.png  |  Bin 230 -> 230 bytes
 .../icons/16x16/actions/glabels-arrow.png          |  Bin 234 -> 234 bytes
 .../icons/16x16/actions/glabels-barcode.png        |  Bin 293 -> 293 bytes
 .../icons/16x16/actions/glabels-box.png            |  Bin 199 -> 199 bytes
 .../icons/16x16/actions/glabels-bucket-fill.png    |  Bin 521 -> 521 bytes
 .../icons/16x16/actions/glabels-center-horiz.png   |  Bin 202 -> 202 bytes
 .../icons/16x16/actions/glabels-center-vert.png    |  Bin 206 -> 206 bytes
 .../icons/16x16/actions/glabels-ellipse.png        |  Bin 376 -> 376 bytes
 .../icons/16x16/actions/glabels-flip-horiz.png     |  Bin 183 -> 183 bytes
 .../icons/16x16/actions/glabels-flip-vert.png      |  Bin 194 -> 194 bytes
 .../icons/16x16/actions/glabels-image.png          |  Bin 485 -> 485 bytes
 .../icons/16x16/actions/glabels-line.png           |  Bin 252 -> 252 bytes
 .../icons/16x16/actions/glabels-merge.png          |  Bin 459 -> 459 bytes
 .../16x16/actions/glabels-object-properties.png    |  Bin 395 -> 395 bytes
 .../icons/16x16/actions/glabels-order-bottom.png   |  Bin 200 -> 200 bytes
 .../icons/16x16/actions/glabels-order-top.png      |  Bin 194 -> 194 bytes
 .../icons/16x16/actions/glabels-pencil.png         |  Bin 489 -> 489 bytes
 .../icons/16x16/actions/glabels-rotate-left.png    |  Bin 243 -> 243 bytes
 .../icons/16x16/actions/glabels-rotate-right.png   |  Bin 241 -> 241 bytes
 .../icons/16x16/actions/glabels-text.png           |  Bin 160 -> 160 bytes
 data/icons/24x24/Makefile.am                       |   21 ++-
 .../icons/24x24/actions/glabels-arrow.png          |  Bin 367 -> 367 bytes
 .../icons/24x24/actions/glabels-barcode.png        |  Bin 241 -> 241 bytes
 .../icons/24x24/actions/glabels-box.png            |  Bin 320 -> 320 bytes
 .../icons/24x24/actions/glabels-bucket-fill.png    |  Bin 589 -> 589 bytes
 .../icons/24x24/actions/glabels-ellipse.png        |  Bin 744 -> 744 bytes
 .../icons/24x24/actions/glabels-hchain-broken.png  |  Bin 325 -> 325 bytes
 .../icons/24x24/actions/glabels-hchain.png         |  Bin 302 -> 302 bytes
 .../icons/24x24/actions/glabels-image.png          |  Bin 704 -> 704 bytes
 .../icons/24x24/actions/glabels-line.png           |  Bin 325 -> 325 bytes
 .../icons/24x24/actions/glabels-merge.png          |  Bin 758 -> 758 bytes
 .../24x24/actions/glabels-object-properties.png    |  Bin 484 -> 484 bytes
 .../icons/24x24/actions/glabels-pencil.png         |  Bin 618 -> 618 bytes
 .../icons/24x24/actions/glabels-text.png           |  Bin 285 -> 285 bytes
 .../icons/24x24/actions/glabels-vchain-broken.png  |  Bin 333 -> 333 bytes
 .../icons/24x24/actions/glabels-vchain.png         |  Bin 326 -> 326 bytes
 po/POTFILES.in                                     |    2 -
 src/Makefile.am                                    |    4 +-
 src/color-combo-button.c                           |   16 +-
 src/color-combo-button.h                           |    2 +-
 src/glabels.c                                      |    6 +-
 src/object-editor.c                                |   31 ++--
 src/stock-pixmaps/Makefile.am                      |   95 --------
 src/stock.c                                        |  225 --------------------
 src/stock.h                                        |   75 -------
 src/ui-property-bar.c                              |   14 +-
 src/ui-sidebar.c                                   |    1 -
 src/ui.c                                           |   45 ++--
 src/wdgt-chain-button.c                            |   18 +-
 56 files changed, 114 insertions(+), 474 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a889716..1e06468 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,6 @@ AC_PROG_INSTALL
 GNOME_COMPILE_WARNINGS
 
 AC_PATH_PROG(GLIB_GENMARSHAL,         glib-genmarshal)
-AC_PATH_PROG(GDK_PIXBUF_CSOURCE,      gdk-pixbuf-csource)
 AC_PATH_PROG(UPDATE_MIME_DATABASE,    update-mime-database)
 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database)
 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE,   gtk-update-icon-cache)
@@ -274,7 +273,6 @@ libglabels/Makefile
 libglabels/${LIBGLABELS_BRANCH}.pc
 src/Makefile
 src/pixmaps/Makefile
-src/stock-pixmaps/Makefile
 data/Makefile
 data/desktop/Makefile
 data/icons/Makefile
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index de73342..6b40ab3 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1,11 +1,40 @@
 
 size = 16x16
 appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+actioniconsdir = $(datadir)/$(GLABELS_BRANCH)/icons/hicolor/$(size)/actions
 
 appicons_DATA = \
 	apps/glabels-3.0.png
 
+actionicons_DATA = \
+	actions/glabels-align-bottom.png	\
+	actions/glabels-align-hcenter.png	\
+	actions/glabels-align-left.png		\
+	actions/glabels-align-right.png		\
+	actions/glabels-align-top.png		\
+	actions/glabels-align-vcenter.png	\
+	actions/glabels-arrow.png		\
+	actions/glabels-barcode.png		\
+	actions/glabels-box.png			\
+	actions/glabels-bucket-fill.png		\
+	actions/glabels-center-horiz.png	\
+	actions/glabels-center-vert.png		\
+	actions/glabels-ellipse.png		\
+	actions/glabels-flip-horiz.png		\
+	actions/glabels-flip-vert.png		\
+	actions/glabels-image.png		\
+	actions/glabels-line.png		\
+	actions/glabels-merge.png		\
+	actions/glabels-object-properties.png	\
+	actions/glabels-order-bottom.png	\
+	actions/glabels-order-top.png		\
+	actions/glabels-pencil.png		\
+	actions/glabels-rotate-left.png		\
+	actions/glabels-rotate-right.png	\
+	actions/glabels-text.png
+
 noinst_DATA =
 
-EXTRA_DIST = $(appicons_DATA) \
+EXTRA_DIST = $(appicons_DATA)			\
+	     $(actionicons_DATA)		\
 	     $(noinst_DATA)
diff --git a/src/stock-pixmaps/stock_align_bottom_16.png b/data/icons/16x16/actions/glabels-align-bottom.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_bottom_16.png
rename to data/icons/16x16/actions/glabels-align-bottom.png
diff --git a/src/stock-pixmaps/stock_align_hcenter_16.png b/data/icons/16x16/actions/glabels-align-hcenter.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_hcenter_16.png
rename to data/icons/16x16/actions/glabels-align-hcenter.png
diff --git a/src/stock-pixmaps/stock_align_left_16.png b/data/icons/16x16/actions/glabels-align-left.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_left_16.png
rename to data/icons/16x16/actions/glabels-align-left.png
diff --git a/src/stock-pixmaps/stock_align_right_16.png b/data/icons/16x16/actions/glabels-align-right.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_right_16.png
rename to data/icons/16x16/actions/glabels-align-right.png
diff --git a/src/stock-pixmaps/stock_align_top_16.png b/data/icons/16x16/actions/glabels-align-top.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_top_16.png
rename to data/icons/16x16/actions/glabels-align-top.png
diff --git a/src/stock-pixmaps/stock_align_vcenter_16.png b/data/icons/16x16/actions/glabels-align-vcenter.png
similarity index 100%
rename from src/stock-pixmaps/stock_align_vcenter_16.png
rename to data/icons/16x16/actions/glabels-align-vcenter.png
diff --git a/src/stock-pixmaps/stock_arrow_16.png b/data/icons/16x16/actions/glabels-arrow.png
similarity index 100%
rename from src/stock-pixmaps/stock_arrow_16.png
rename to data/icons/16x16/actions/glabels-arrow.png
diff --git a/src/stock-pixmaps/stock_barcode_16.png b/data/icons/16x16/actions/glabels-barcode.png
similarity index 100%
rename from src/stock-pixmaps/stock_barcode_16.png
rename to data/icons/16x16/actions/glabels-barcode.png
diff --git a/src/stock-pixmaps/stock_box_16.png b/data/icons/16x16/actions/glabels-box.png
similarity index 100%
rename from src/stock-pixmaps/stock_box_16.png
rename to data/icons/16x16/actions/glabels-box.png
diff --git a/src/stock-pixmaps/stock_bucket_fill_16.png b/data/icons/16x16/actions/glabels-bucket-fill.png
similarity index 100%
rename from src/stock-pixmaps/stock_bucket_fill_16.png
rename to data/icons/16x16/actions/glabels-bucket-fill.png
diff --git a/src/stock-pixmaps/stock_center_horiz_16.png b/data/icons/16x16/actions/glabels-center-horiz.png
similarity index 100%
rename from src/stock-pixmaps/stock_center_horiz_16.png
rename to data/icons/16x16/actions/glabels-center-horiz.png
diff --git a/src/stock-pixmaps/stock_center_vert_16.png b/data/icons/16x16/actions/glabels-center-vert.png
similarity index 100%
rename from src/stock-pixmaps/stock_center_vert_16.png
rename to data/icons/16x16/actions/glabels-center-vert.png
diff --git a/src/stock-pixmaps/stock_ellipse_16.png b/data/icons/16x16/actions/glabels-ellipse.png
similarity index 100%
rename from src/stock-pixmaps/stock_ellipse_16.png
rename to data/icons/16x16/actions/glabels-ellipse.png
diff --git a/src/stock-pixmaps/stock_flip_horiz_16.png b/data/icons/16x16/actions/glabels-flip-horiz.png
similarity index 100%
rename from src/stock-pixmaps/stock_flip_horiz_16.png
rename to data/icons/16x16/actions/glabels-flip-horiz.png
diff --git a/src/stock-pixmaps/stock_flip_vert_16.png b/data/icons/16x16/actions/glabels-flip-vert.png
similarity index 100%
rename from src/stock-pixmaps/stock_flip_vert_16.png
rename to data/icons/16x16/actions/glabels-flip-vert.png
diff --git a/src/stock-pixmaps/stock_image_16.png b/data/icons/16x16/actions/glabels-image.png
similarity index 100%
rename from src/stock-pixmaps/stock_image_16.png
rename to data/icons/16x16/actions/glabels-image.png
diff --git a/src/stock-pixmaps/stock_line_16.png b/data/icons/16x16/actions/glabels-line.png
similarity index 100%
rename from src/stock-pixmaps/stock_line_16.png
rename to data/icons/16x16/actions/glabels-line.png
diff --git a/src/stock-pixmaps/stock_merge_16.png b/data/icons/16x16/actions/glabels-merge.png
similarity index 100%
rename from src/stock-pixmaps/stock_merge_16.png
rename to data/icons/16x16/actions/glabels-merge.png
diff --git a/src/stock-pixmaps/stock_properties_16.png b/data/icons/16x16/actions/glabels-object-properties.png
similarity index 100%
rename from src/stock-pixmaps/stock_properties_16.png
rename to data/icons/16x16/actions/glabels-object-properties.png
diff --git a/src/stock-pixmaps/stock_order_bottom_16.png b/data/icons/16x16/actions/glabels-order-bottom.png
similarity index 100%
rename from src/stock-pixmaps/stock_order_bottom_16.png
rename to data/icons/16x16/actions/glabels-order-bottom.png
diff --git a/src/stock-pixmaps/stock_order_top_16.png b/data/icons/16x16/actions/glabels-order-top.png
similarity index 100%
rename from src/stock-pixmaps/stock_order_top_16.png
rename to data/icons/16x16/actions/glabels-order-top.png
diff --git a/src/stock-pixmaps/stock_pencil_16.png b/data/icons/16x16/actions/glabels-pencil.png
similarity index 100%
rename from src/stock-pixmaps/stock_pencil_16.png
rename to data/icons/16x16/actions/glabels-pencil.png
diff --git a/src/stock-pixmaps/stock_rotate_left_16.png b/data/icons/16x16/actions/glabels-rotate-left.png
similarity index 100%
rename from src/stock-pixmaps/stock_rotate_left_16.png
rename to data/icons/16x16/actions/glabels-rotate-left.png
diff --git a/src/stock-pixmaps/stock_rotate_right_16.png b/data/icons/16x16/actions/glabels-rotate-right.png
similarity index 100%
rename from src/stock-pixmaps/stock_rotate_right_16.png
rename to data/icons/16x16/actions/glabels-rotate-right.png
diff --git a/src/stock-pixmaps/stock_text_16.png b/data/icons/16x16/actions/glabels-text.png
similarity index 100%
rename from src/stock-pixmaps/stock_text_16.png
rename to data/icons/16x16/actions/glabels-text.png
diff --git a/data/icons/24x24/Makefile.am b/data/icons/24x24/Makefile.am
index baf6b8e..4dd62a0 100644
--- a/data/icons/24x24/Makefile.am
+++ b/data/icons/24x24/Makefile.am
@@ -1,11 +1,30 @@
 
 size = 24x24
 appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+actioniconsdir = $(datadir)/$(GLABELS_BRANCH)/icons/hicolor/$(size)/actions
 
 appicons_DATA = \
 	apps/glabels-3.0.png
 
+actionicons_DATA = \
+	actions/glabels-arrow.png		\
+	actions/glabels-barcode.png		\
+	actions/glabels-box.png			\
+	actions/glabels-bucket-fill.png		\
+	actions/glabels-ellipse.png		\
+	actions/glabels-hchain-broken.png	\
+	actions/glabels-hchain.png		\
+	actions/glabels-image.png		\
+	actions/glabels-line.png		\
+	actions/glabels-merge.png		\
+	actions/glabels-pencil.png		\
+	actions/glabels-object-properties.png	\
+	actions/glabels-text.png		\
+	actions/glabels-vchain-broken.png	\
+	actions/glabels-vchain.png
+
 noinst_DATA =
 
-EXTRA_DIST = $(appicons_DATA) \
+EXTRA_DIST = $(appicons_DATA)			\
+	     $(actionicons_DATA)		\
 	     $(noinst_DATA)
diff --git a/src/stock-pixmaps/stock_arrow_24.png b/data/icons/24x24/actions/glabels-arrow.png
similarity index 100%
rename from src/stock-pixmaps/stock_arrow_24.png
rename to data/icons/24x24/actions/glabels-arrow.png
diff --git a/src/stock-pixmaps/stock_barcode_24.png b/data/icons/24x24/actions/glabels-barcode.png
similarity index 100%
rename from src/stock-pixmaps/stock_barcode_24.png
rename to data/icons/24x24/actions/glabels-barcode.png
diff --git a/src/stock-pixmaps/stock_box_24.png b/data/icons/24x24/actions/glabels-box.png
similarity index 100%
rename from src/stock-pixmaps/stock_box_24.png
rename to data/icons/24x24/actions/glabels-box.png
diff --git a/src/stock-pixmaps/stock_bucket_fill_24.png b/data/icons/24x24/actions/glabels-bucket-fill.png
similarity index 100%
rename from src/stock-pixmaps/stock_bucket_fill_24.png
rename to data/icons/24x24/actions/glabels-bucket-fill.png
diff --git a/src/stock-pixmaps/stock_ellipse_24.png b/data/icons/24x24/actions/glabels-ellipse.png
similarity index 100%
rename from src/stock-pixmaps/stock_ellipse_24.png
rename to data/icons/24x24/actions/glabels-ellipse.png
diff --git a/src/stock-pixmaps/stock_hchain_broken_24.png b/data/icons/24x24/actions/glabels-hchain-broken.png
similarity index 100%
rename from src/stock-pixmaps/stock_hchain_broken_24.png
rename to data/icons/24x24/actions/glabels-hchain-broken.png
diff --git a/src/stock-pixmaps/stock_hchain_24.png b/data/icons/24x24/actions/glabels-hchain.png
similarity index 100%
rename from src/stock-pixmaps/stock_hchain_24.png
rename to data/icons/24x24/actions/glabels-hchain.png
diff --git a/src/stock-pixmaps/stock_image_24.png b/data/icons/24x24/actions/glabels-image.png
similarity index 100%
rename from src/stock-pixmaps/stock_image_24.png
rename to data/icons/24x24/actions/glabels-image.png
diff --git a/src/stock-pixmaps/stock_line_24.png b/data/icons/24x24/actions/glabels-line.png
similarity index 100%
rename from src/stock-pixmaps/stock_line_24.png
rename to data/icons/24x24/actions/glabels-line.png
diff --git a/src/stock-pixmaps/stock_merge_24.png b/data/icons/24x24/actions/glabels-merge.png
similarity index 100%
rename from src/stock-pixmaps/stock_merge_24.png
rename to data/icons/24x24/actions/glabels-merge.png
diff --git a/src/stock-pixmaps/stock_properties_24.png b/data/icons/24x24/actions/glabels-object-properties.png
similarity index 100%
rename from src/stock-pixmaps/stock_properties_24.png
rename to data/icons/24x24/actions/glabels-object-properties.png
diff --git a/src/stock-pixmaps/stock_pencil_24.png b/data/icons/24x24/actions/glabels-pencil.png
similarity index 100%
rename from src/stock-pixmaps/stock_pencil_24.png
rename to data/icons/24x24/actions/glabels-pencil.png
diff --git a/src/stock-pixmaps/stock_text_24.png b/data/icons/24x24/actions/glabels-text.png
similarity index 100%
rename from src/stock-pixmaps/stock_text_24.png
rename to data/icons/24x24/actions/glabels-text.png
diff --git a/src/stock-pixmaps/stock_vchain_broken_24.png b/data/icons/24x24/actions/glabels-vchain-broken.png
similarity index 100%
rename from src/stock-pixmaps/stock_vchain_broken_24.png
rename to data/icons/24x24/actions/glabels-vchain-broken.png
diff --git a/src/stock-pixmaps/stock_vchain_24.png b/data/icons/24x24/actions/glabels-vchain.png
similarity index 100%
rename from src/stock-pixmaps/stock_vchain_24.png
rename to data/icons/24x24/actions/glabels-vchain.png
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2b7e340..816c005 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -138,8 +138,6 @@ src/message-bar.c
 src/message-bar.h
 src/recent.c
 src/recent.h
-src/stock.c
-src/stock.h
 src/str-util.c
 src/str-util.h
 src/svg-cache.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 5308484..aac2b7e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS= ../libglabels pixmaps stock-pixmaps
+SUBDIRS= ../libglabels pixmaps
 
 bin_PROGRAMS = glabels-3 glabels-3-batch
 
@@ -53,8 +53,6 @@ glabels_3_SOURCES = 			\
 	critical-error-handler.h	\
 	window.c			\
 	window.h			\
-	stock.c				\
-	stock.h				\
 	ui.h				\
 	ui.c				\
 	ui-util.h			\
diff --git a/src/color-combo-button.c b/src/color-combo-button.c
index 80ec08f..04186f6 100644
--- a/src/color-combo-button.c
+++ b/src/color-combo-button.c
@@ -182,14 +182,14 @@ gl_color_combo_button_finalize (GObject *object)
 /** New Object Generator.                                                    */
 /*****************************************************************************/
 GtkWidget *
-gl_color_combo_button_new (GdkPixbuf    *icon,
+gl_color_combo_button_new (const gchar  *icon_name,
                            const gchar  *default_label,
                            guint         default_color,
                            guint         color)
 {
         glColorComboButton *this;
-        GdkPixbuf          *pixbuf;
         GtkWidget          *wimage;
+        GdkPixbuf          *pixbuf1, *pixbuf2;
 
         this = g_object_new (TYPE_GL_COLOR_COMBO_BUTTON, NULL);
 
@@ -201,11 +201,15 @@ gl_color_combo_button_new (GdkPixbuf    *icon,
         this->priv->default_color = default_color;
         this->priv->color = color;
 
-        if (icon)
+        if (icon_name)
         {
-                pixbuf = gdk_pixbuf_new_subpixbuf (icon, 0, 0, IMAGE_W, IMAGE_H-SWATCH_H);
-                wimage = gtk_image_new_from_pixbuf (pixbuf);
-                g_object_unref (G_OBJECT (pixbuf));
+                pixbuf1 = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+                                                    icon_name, IMAGE_W, 0, NULL);
+                pixbuf2 = gdk_pixbuf_new_subpixbuf (pixbuf1, 0, 0, IMAGE_W, IMAGE_H-SWATCH_H);
+
+                wimage = gtk_image_new_from_pixbuf (pixbuf2);
+                g_object_unref (G_OBJECT (pixbuf1));
+                g_object_unref (G_OBJECT (pixbuf2));
                 gtk_box_pack_start (GTK_BOX (this->priv->button_vbox), wimage, FALSE, FALSE, 0);
 
                 this->priv->swatch = gl_color_swatch_new (IMAGE_W, SWATCH_H, color);
diff --git a/src/color-combo-button.h b/src/color-combo-button.h
index f587847..6b85a21 100644
--- a/src/color-combo-button.h
+++ b/src/color-combo-button.h
@@ -62,7 +62,7 @@ struct _glColorComboButtonClass {
 
 GType            gl_color_combo_button_get_type       (void) G_GNUC_CONST;
 
-GtkWidget       *gl_color_combo_button_new            (GdkPixbuf          *icon,
+GtkWidget       *gl_color_combo_button_new            (const gchar        *icon_name,
                                                        const gchar        *default_label,
                                                        guint               default_color,
                                                        guint               color);
diff --git a/src/glabels.c b/src/glabels.c
index e43f976..c8ffe17 100644
--- a/src/glabels.c
+++ b/src/glabels.c
@@ -25,7 +25,6 @@
 #include <libglabels.h>
 #include "warning-handler.h"
 #include "critical-error-handler.h"
-#include "stock.h"
 #include "merge-init.h"
 #include "recent.h"
 #include "mini-preview-pixbuf-cache.h"
@@ -96,12 +95,15 @@ main (int argc, char **argv)
 	gl_critical_error_handler_init();
 	gl_warning_handler_init();
 
+	/* Add glabels specific icons to search path */
+        gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                                           GLABELS_DATA_DIR G_DIR_SEPARATOR_S "icons");
+
 	/* Set default icon */
         gtk_window_set_default_icon_name (GLABELS_ICON_NAME);
 	
 	/* Initialize subsystems */
 	gl_debug_init ();
-	gl_stock_init ();
 	lgl_db_init ();
 	gl_prefs_init ();
 	gl_mini_preview_pixbuf_cache_init ();
diff --git a/src/object-editor.c b/src/object-editor.c
index 6c60b10..c0290e5 100644
--- a/src/object-editor.c
+++ b/src/object-editor.c
@@ -27,7 +27,6 @@
 #include <math.h>
 
 #include "prefs.h"
-#include "stock.h"
 #include "color-combo.h"
 #include "color.h"
 #include "wdgt-chain-button.h"
@@ -151,9 +150,9 @@ gl_object_editor_init (glObjectEditor *editor)
 
 	gtk_widget_show_all (GTK_WIDGET(editor));
 
-        gtk_image_set_from_stock (GTK_IMAGE(editor->priv->title_image),
-                                  GL_STOCK_PROPERTIES,
-                                  GTK_ICON_SIZE_LARGE_TOOLBAR);
+        gtk_image_set_from_icon_name (GTK_IMAGE(editor->priv->title_image),
+                                      "glabels-object-properties",
+                                      GTK_ICON_SIZE_LARGE_TOOLBAR);
 
         s = g_strdup_printf ("<span weight=\"bold\">%s</span>",
                              _("Object properties"));
@@ -304,7 +303,7 @@ set_object (glObjectEditor  *editor,
 
                 if (GL_IS_LABEL_BOX (object))
                 {
-                        image = GL_STOCK_BOX;
+                        image = "glabels-box";
                         title = _("Box object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -323,7 +322,7 @@ set_object (glObjectEditor  *editor,
                 }
                 else if (GL_IS_LABEL_ELLIPSE (object))
                 {
-                        image = GL_STOCK_ELLIPSE;
+                        image = "glabels-ellipse";
                         title = _("Ellipse object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -342,7 +341,7 @@ set_object (glObjectEditor  *editor,
                 }
                 else if (GL_IS_LABEL_LINE (object))
                 {
-                        image = GL_STOCK_LINE;
+                        image = "glabels-line";
                         title = _("Line object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -359,7 +358,7 @@ set_object (glObjectEditor  *editor,
                 }
                 else if (GL_IS_LABEL_IMAGE (object))
                 {
-                        image = GL_STOCK_IMAGE;
+                        image = "glabels-image";
                         title = _("Image object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -376,7 +375,7 @@ set_object (glObjectEditor  *editor,
                 }
                 else if (GL_IS_LABEL_TEXT (object))
                 {
-                        image = GL_STOCK_TEXT;
+                        image = "glabels-text";
                         title = _("Text object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -398,7 +397,7 @@ set_object (glObjectEditor  *editor,
                 }
                 else if (GL_IS_LABEL_BARCODE (object))
                 {
-                        image = GL_STOCK_BARCODE;
+                        image = "glabels-barcode";
                         title = _("Barcode object properties");
 
                         gtk_widget_show_all (editor->priv->pos_page_vbox);
@@ -420,9 +419,9 @@ set_object (glObjectEditor  *editor,
                         gl_label_barcode_style_free (bc_style);
                 }
 
-                gtk_image_set_from_stock (GTK_IMAGE(editor->priv->title_image),
-                                          image,
-					  GTK_ICON_SIZE_LARGE_TOOLBAR);
+                gtk_image_set_from_icon_name (GTK_IMAGE(editor->priv->title_image),
+                                              image,
+                                              GTK_ICON_SIZE_LARGE_TOOLBAR);
 
 		s = g_strdup_printf ("<span weight=\"bold\">%s</span>",
 				     title);
@@ -457,9 +456,9 @@ set_object (glObjectEditor  *editor,
         {
                 editor->priv->object = NULL;
 
-                gtk_image_set_from_stock (GTK_IMAGE(editor->priv->title_image),
-					  GL_STOCK_PROPERTIES,
-					  GTK_ICON_SIZE_LARGE_TOOLBAR);
+                gtk_image_set_from_icon_name (GTK_IMAGE(editor->priv->title_image),
+                                              "glabels-object-properties",
+                                              GTK_ICON_SIZE_LARGE_TOOLBAR);
 
 		s = g_strdup_printf ("<span weight=\"bold\">%s</span>",
 				     _("Object properties"));
diff --git a/src/ui-property-bar.c b/src/ui-property-bar.c
index c2e82df..927dae2 100644
--- a/src/ui-property-bar.c
+++ b/src/ui-property-bar.c
@@ -29,7 +29,6 @@
 #include "builder-util.h"
 #include "font-combo.h"
 #include "color-combo-button.h"
-#include "stock-pixmaps/stockpixbufs.h"
 #include "prefs.h"
 #include "color.h"
 
@@ -236,7 +235,6 @@ gl_ui_property_bar_construct (glUIPropertyBar   *this)
                                         "adjustment1", "adjustment2",
                                         NULL };
         GError        *error = NULL;
-	GdkPixbuf     *pixbuf = NULL;
 
 	gl_debug (DEBUG_PROPERTY_BAR, "START");
 
@@ -274,39 +272,33 @@ gl_ui_property_bar_construct (glUIPropertyBar   *this)
         gtk_container_add (GTK_CONTAINER (this->priv->font_family_eventbox),
                            this->priv->font_family_combo);
 
-        pixbuf = gdk_pixbuf_new_from_inline (-1, stock_text_24, FALSE, NULL);
         this->priv->text_color_button =
-                gl_color_combo_button_new (pixbuf,
+                gl_color_combo_button_new ("glabels-text",
                                            _("Default"),
                                            GL_COLOR_TEXT_DEFAULT,
                                            gl_prefs_model_get_default_text_color (gl_prefs));
         gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button),
                                           GTK_RELIEF_NONE);
-	g_object_unref (G_OBJECT (pixbuf));
         gtk_container_add (GTK_CONTAINER (this->priv->text_color_eventbox),
                            this->priv->text_color_button);
 
-        pixbuf = gdk_pixbuf_new_from_inline (-1, stock_bucket_fill_24, FALSE, NULL);
         this->priv->fill_color_button =
-                gl_color_combo_button_new (pixbuf,
+                gl_color_combo_button_new ("glabels-bucket-fill",
                                            _("No Fill"),
                                            GL_COLOR_NO_FILL,
                                            gl_prefs_model_get_default_fill_color (gl_prefs));
         gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->fill_color_button),
                                           GTK_RELIEF_NONE);
-	g_object_unref (G_OBJECT (pixbuf));
         gtk_container_add (GTK_CONTAINER (this->priv->fill_color_eventbox),
                            this->priv->fill_color_button);
 
-        pixbuf = gdk_pixbuf_new_from_inline (-1, stock_pencil_24, FALSE, NULL);
         this->priv->line_color_button =
-                gl_color_combo_button_new (pixbuf,
+                gl_color_combo_button_new ("glabels-pencil",
                                            _("No Line"),
                                            GL_COLOR_NO_LINE,
                                            gl_prefs_model_get_default_line_color (gl_prefs));
 	gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->line_color_button),
                                           GTK_RELIEF_NONE);
-	g_object_unref (G_OBJECT (pixbuf));
         gtk_container_add (GTK_CONTAINER (this->priv->line_color_eventbox),
                            this->priv->line_color_button);
 
diff --git a/src/ui-sidebar.c b/src/ui-sidebar.c
index 60a1775..d23d5a1 100644
--- a/src/ui-sidebar.c
+++ b/src/ui-sidebar.c
@@ -26,7 +26,6 @@
 
 #include "ui-util.h"
 #include "object-editor.h"
-#include "stock.h"
 
 #include "debug.h"
 
diff --git a/src/ui.c b/src/ui.c
index b369f9d..b9dacd9 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -31,7 +31,6 @@
 #include "ui-commands.h"
 #include "file.h"
 #include "prefs.h"
-#include "stock.h"
 #include "window.h"
 #include "recent.h" 
 
@@ -271,154 +270,154 @@ static GtkActionEntry entries[] = {
 
 	/* Objects action entries. */
 	{ "ObjectsArrowMode",
-	  GL_STOCK_ARROW,
+	  "glabels-arrow",
 	  N_("Select Mode"),
 	  NULL,
 	  N_("Select, move and modify objects"),
 	  G_CALLBACK (gl_ui_cmd_objects_arrow_mode) },
 
 	{ "ObjectsCreateText",
-	  GL_STOCK_TEXT,
+	  "glabels-text",
 	  N_("Text"),
 	  NULL,
 	  N_("Create text object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_text) },
 
 	{ "ObjectsCreateBox",
-	  GL_STOCK_BOX,
+	  "glabels-box",
 	  N_("Box"),
 	  NULL,
 	  N_("Create box/rectangle object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_box) },
 
 	{ "ObjectsCreateLine",
-	  GL_STOCK_LINE,
+	  "glabels-line",
 	  N_("Line"),
 	  NULL,
 	  N_("Create line object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_line) },
 
 	{ "ObjectsCreateEllipse",
-	  GL_STOCK_ELLIPSE,
+	  "glabels-ellipse",
 	  N_("Ellipse"),
 	  NULL,
 	  N_("Create ellipse/circle object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_ellipse) },
 
 	{ "ObjectsCreateImage",
-	  GL_STOCK_IMAGE,
+	  "glabels-image",
 	  N_("Image"),
 	  NULL,
 	  N_("Create image object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_image) },
 
 	{ "ObjectsCreateBarcode",
-	  GL_STOCK_BARCODE,
+	  "glabels-barcode",
 	  N_("Barcode"),
 	  NULL,
 	  N_("Create barcode object"),
 	  G_CALLBACK (gl_ui_cmd_objects_create_barcode) },
 	
 	{ "ObjectsRaise",
-	  GL_STOCK_ORDER_TOP,
+	  "glabels-order-top",
 	  N_("Bring to front"),
 	  NULL,
 	  N_("Raise object to top"),
 	  G_CALLBACK (gl_ui_cmd_objects_raise) },
 
 	{ "ObjectsLower",
-	  GL_STOCK_ORDER_BOTTOM,
+	  "glabels-order-bottom",
 	  N_("Send to back"),
 	  NULL,
 	  N_("Lower object to bottom"),
 	  G_CALLBACK (gl_ui_cmd_objects_lower) },
 
 	{ "ObjectsRotateLeft",
-	  GL_STOCK_ROTATE_LEFT,
+	  "glabels-rotate-left",
 	  N_("Rotate left"),
 	  NULL,
 	  N_("Rotate object 90 degrees counter-clockwise"),
 	  G_CALLBACK (gl_ui_cmd_objects_rotate_left) },
 
 	{ "ObjectsRotateRight",
-	  GL_STOCK_ROTATE_RIGHT,
+	  "glabels-rotate-right",
 	  N_("Rotate right"),
 	  NULL,
 	  N_("Rotate object 90 degrees clockwise"),
 	  G_CALLBACK (gl_ui_cmd_objects_rotate_right) },
 
 	{ "ObjectsFlipHorizontal",
-	  GL_STOCK_FLIP_HORIZ,
+	  "glabels-flip-horiz",
 	  N_("Flip horizontally"),
 	  NULL,
 	  N_("Flip object horizontally"),
 	  G_CALLBACK (gl_ui_cmd_objects_flip_horiz) },
 
 	{ "ObjectsFlipVertical",
-	  GL_STOCK_FLIP_VERT,
+	  "glabels-flip-vert",
 	  N_("Flip vertically"),
 	  NULL,
 	  N_("Flip object vertically"),
 	  G_CALLBACK (gl_ui_cmd_objects_flip_vert) },
 
 	{ "ObjectsAlignLeft",
-	  GL_STOCK_ALIGN_LEFT,
+	  "glabels-align-left",
 	  N_("Align left"),
 	  NULL,
 	  N_("Align objects to left edges"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_left) },
 
 	{ "ObjectsAlignRight",
-	  GL_STOCK_ALIGN_RIGHT,
+	  "glabels-align-right",
 	  N_("Align right"),
 	  NULL,
 	  N_("Align objects to right edges"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_right) },
 
 	{ "ObjectsAlignHCenter",
-	  GL_STOCK_ALIGN_HCENTER,
+	  "glabels-align-hcenter",
 	  N_("Align horizontal center"),
 	  NULL,
 	  N_("Align objects to horizontal centers"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_hcenter) },
 
 	{ "ObjectsAlignTop",
-	  GL_STOCK_ALIGN_TOP,
+	  "glabels-align-top",
 	  N_("Align tops"),
 	  NULL,
 	  N_("Align objects to top edges"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_top) },
 
 	{ "ObjectsAlignBottom",
-	  GL_STOCK_ALIGN_BOTTOM,
+	  "glabels-align-bottom",
 	  N_("Align bottoms"),
 	  NULL,
 	  N_("Align objects to bottom edges"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_bottom) },
 
 	{ "ObjectsAlignVCenter",
-	  GL_STOCK_ALIGN_VCENTER,
+	  "glabels-align-vcenter",
 	  N_("Align vertical center"),
 	  NULL,
 	  N_("Align objects to vertical centers"),
 	  G_CALLBACK (gl_ui_cmd_objects_align_vcenter) },
 
 	{ "ObjectsCenterHorizontal",
-	  GL_STOCK_CENTER_HORIZ,
+	  "glabels-center-horiz",
 	  N_("Center horizontally"),
 	  NULL,
 	  N_("Center objects to horizontal label center"),
 	  G_CALLBACK (gl_ui_cmd_objects_center_horiz) },
 
 	{ "ObjectsCenterVertical",
-	  GL_STOCK_CENTER_VERT,
+	  "glabels-center-vert",
 	  N_("Center vertically"),
 	  NULL,
 	  N_("Center objects to vertical label center"),
 	  G_CALLBACK (gl_ui_cmd_objects_center_vert) },
 
 	{ "ObjectsMergeProperties",
-	  GL_STOCK_MERGE,
+	  "glabels-merge",
 	  N_("Merge properties"),
 	  NULL,
 	  N_("Edit merge properties"),
diff --git a/src/wdgt-chain-button.c b/src/wdgt-chain-button.c
index 5963fea..c9f7ad2 100644
--- a/src/wdgt-chain-button.c
+++ b/src/wdgt-chain-button.c
@@ -31,8 +31,6 @@
 
 #include <gtk/gtk.h>
 
-#include "stock.h"
-
 
 enum
 {
@@ -50,10 +48,10 @@ static gboolean  gl_wdgt_chain_button_draw_lines       (GtkWidget          *widg
 
 static const gchar *gl_wdgt_chain_stock_items[] =
 {
-  GL_STOCK_HCHAIN,
-  GL_STOCK_HCHAIN_BROKEN,
-  GL_STOCK_VCHAIN,
-  GL_STOCK_VCHAIN_BROKEN
+  "glabels-hchain",
+  "glabels-hchain-broken",
+  "glabels-vchain",
+  "glabels-vchain-broken"
 };
 
 
@@ -136,7 +134,7 @@ gl_wdgt_chain_button_new (glWdgtChainPosition position)
 
   button->position = position;
 
-  gtk_image_set_from_stock
+  gtk_image_set_from_icon_name
     (GTK_IMAGE (button->image),
      gl_wdgt_chain_stock_items[((position & GL_WDGT_CHAIN_LEFT) << 1) + ! button->active],
      GTK_ICON_SIZE_BUTTON);
@@ -191,9 +189,9 @@ gl_wdgt_chain_button_set_active (glWdgtChainButton  *button,
 
       num = ((button->position & GL_WDGT_CHAIN_LEFT) << 1) + (active ? 0 : 1);
 
-      gtk_image_set_from_stock (GTK_IMAGE (button->image),
-                                gl_wdgt_chain_stock_items[num],
-                                GTK_ICON_SIZE_BUTTON);
+      gtk_image_set_from_icon_name (GTK_IMAGE (button->image),
+                                    gl_wdgt_chain_stock_items[num],
+                                    GTK_ICON_SIZE_BUTTON);
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]