From 065ffb88346791da881cfed8a06343c6b6e4b50c Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 5 Sep 2010 20:40:45 -0400 Subject: [PATCH] Theme friendly, glabels specific, action icons. --- configure.ac | 2 - data/icons/16x16/Makefile.am | 31 ++- .../16x16/actions/glabels-align-bottom.png | Bin .../16x16/actions/glabels-align-hcenter.png | Bin .../16x16/actions/glabels-align-left.png | Bin .../16x16/actions/glabels-align-right.png | Bin .../icons/16x16/actions/glabels-align-top.png | Bin .../16x16/actions/glabels-align-vcenter.png | Bin .../icons/16x16/actions/glabels-arrow.png | Bin .../icons/16x16/actions/glabels-barcode.png | Bin .../icons/16x16/actions/glabels-box.png | Bin .../16x16/actions/glabels-bucket-fill.png | Bin .../16x16/actions/glabels-center-horiz.png | Bin .../16x16/actions/glabels-center-vert.png | Bin .../icons/16x16/actions/glabels-ellipse.png | Bin .../16x16/actions/glabels-flip-horiz.png | Bin .../icons/16x16/actions/glabels-flip-vert.png | Bin .../icons/16x16/actions/glabels-image.png | Bin .../icons/16x16/actions/glabels-line.png | Bin .../icons/16x16/actions/glabels-merge.png | Bin .../actions/glabels-object-properties.png | Bin .../16x16/actions/glabels-order-bottom.png | Bin .../icons/16x16/actions/glabels-order-top.png | Bin .../icons/16x16/actions/glabels-pencil.png | Bin .../16x16/actions/glabels-rotate-left.png | Bin .../16x16/actions/glabels-rotate-right.png | Bin .../icons/16x16/actions/glabels-text.png | Bin data/icons/24x24/Makefile.am | 21 +- .../icons/24x24/actions/glabels-arrow.png | Bin .../icons/24x24/actions/glabels-barcode.png | Bin .../icons/24x24/actions/glabels-box.png | Bin .../24x24/actions/glabels-bucket-fill.png | Bin .../icons/24x24/actions/glabels-ellipse.png | Bin .../24x24/actions/glabels-hchain-broken.png | Bin .../icons/24x24/actions/glabels-hchain.png | Bin .../icons/24x24/actions/glabels-image.png | Bin .../icons/24x24/actions/glabels-line.png | Bin .../icons/24x24/actions/glabels-merge.png | Bin .../actions/glabels-object-properties.png | Bin .../icons/24x24/actions/glabels-pencil.png | Bin .../icons/24x24/actions/glabels-text.png | Bin .../24x24/actions/glabels-vchain-broken.png | Bin .../icons/24x24/actions/glabels-vchain.png | Bin 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(-) rename src/stock-pixmaps/stock_align_bottom_16.png => data/icons/16x16/actions/glabels-align-bottom.png (100%) rename src/stock-pixmaps/stock_align_hcenter_16.png => data/icons/16x16/actions/glabels-align-hcenter.png (100%) rename src/stock-pixmaps/stock_align_left_16.png => data/icons/16x16/actions/glabels-align-left.png (100%) rename src/stock-pixmaps/stock_align_right_16.png => data/icons/16x16/actions/glabels-align-right.png (100%) rename src/stock-pixmaps/stock_align_top_16.png => data/icons/16x16/actions/glabels-align-top.png (100%) rename src/stock-pixmaps/stock_align_vcenter_16.png => data/icons/16x16/actions/glabels-align-vcenter.png (100%) rename src/stock-pixmaps/stock_arrow_16.png => data/icons/16x16/actions/glabels-arrow.png (100%) rename src/stock-pixmaps/stock_barcode_16.png => data/icons/16x16/actions/glabels-barcode.png (100%) rename src/stock-pixmaps/stock_box_16.png => data/icons/16x16/actions/glabels-box.png (100%) rename src/stock-pixmaps/stock_bucket_fill_16.png => data/icons/16x16/actions/glabels-bucket-fill.png (100%) rename src/stock-pixmaps/stock_center_horiz_16.png => data/icons/16x16/actions/glabels-center-horiz.png (100%) rename src/stock-pixmaps/stock_center_vert_16.png => data/icons/16x16/actions/glabels-center-vert.png (100%) rename src/stock-pixmaps/stock_ellipse_16.png => data/icons/16x16/actions/glabels-ellipse.png (100%) rename src/stock-pixmaps/stock_flip_horiz_16.png => data/icons/16x16/actions/glabels-flip-horiz.png (100%) rename src/stock-pixmaps/stock_flip_vert_16.png => data/icons/16x16/actions/glabels-flip-vert.png (100%) rename src/stock-pixmaps/stock_image_16.png => data/icons/16x16/actions/glabels-image.png (100%) rename src/stock-pixmaps/stock_line_16.png => data/icons/16x16/actions/glabels-line.png (100%) rename src/stock-pixmaps/stock_merge_16.png => data/icons/16x16/actions/glabels-merge.png (100%) rename src/stock-pixmaps/stock_properties_16.png => data/icons/16x16/actions/glabels-object-properties.png (100%) rename src/stock-pixmaps/stock_order_bottom_16.png => data/icons/16x16/actions/glabels-order-bottom.png (100%) rename src/stock-pixmaps/stock_order_top_16.png => data/icons/16x16/actions/glabels-order-top.png (100%) rename src/stock-pixmaps/stock_pencil_16.png => data/icons/16x16/actions/glabels-pencil.png (100%) rename src/stock-pixmaps/stock_rotate_left_16.png => data/icons/16x16/actions/glabels-rotate-left.png (100%) rename src/stock-pixmaps/stock_rotate_right_16.png => data/icons/16x16/actions/glabels-rotate-right.png (100%) rename src/stock-pixmaps/stock_text_16.png => data/icons/16x16/actions/glabels-text.png (100%) rename src/stock-pixmaps/stock_arrow_24.png => data/icons/24x24/actions/glabels-arrow.png (100%) rename src/stock-pixmaps/stock_barcode_24.png => data/icons/24x24/actions/glabels-barcode.png (100%) rename src/stock-pixmaps/stock_box_24.png => data/icons/24x24/actions/glabels-box.png (100%) rename src/stock-pixmaps/stock_bucket_fill_24.png => data/icons/24x24/actions/glabels-bucket-fill.png (100%) rename src/stock-pixmaps/stock_ellipse_24.png => data/icons/24x24/actions/glabels-ellipse.png (100%) rename src/stock-pixmaps/stock_hchain_broken_24.png => data/icons/24x24/actions/glabels-hchain-broken.png (100%) rename src/stock-pixmaps/stock_hchain_24.png => data/icons/24x24/actions/glabels-hchain.png (100%) rename src/stock-pixmaps/stock_image_24.png => data/icons/24x24/actions/glabels-image.png (100%) rename src/stock-pixmaps/stock_line_24.png => data/icons/24x24/actions/glabels-line.png (100%) rename src/stock-pixmaps/stock_merge_24.png => data/icons/24x24/actions/glabels-merge.png (100%) rename src/stock-pixmaps/stock_properties_24.png => data/icons/24x24/actions/glabels-object-properties.png (100%) rename src/stock-pixmaps/stock_pencil_24.png => data/icons/24x24/actions/glabels-pencil.png (100%) rename src/stock-pixmaps/stock_text_24.png => data/icons/24x24/actions/glabels-text.png (100%) rename src/stock-pixmaps/stock_vchain_broken_24.png => data/icons/24x24/actions/glabels-vchain-broken.png (100%) rename src/stock-pixmaps/stock_vchain_24.png => data/icons/24x24/actions/glabels-vchain.png (100%) delete mode 100644 src/stock-pixmaps/Makefile.am delete mode 100644 src/stock.c delete mode 100644 src/stock.h diff --git a/configure.ac b/configure.ac index a889716e..1e064687 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 de73342e..6b40ab3b 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 baf6b8ef..4dd62a04 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 2b7e3400..816c0055 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 53084844..aac2b7ef 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 80ec08fd..04186f61 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 f5878476..6b85a219 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 e43f9768..c8ffe177 100644 --- a/src/glabels.c +++ b/src/glabels.c @@ -25,7 +25,6 @@ #include #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 6c60b107..c0290e56 100644 --- a/src/object-editor.c +++ b/src/object-editor.c @@ -27,7 +27,6 @@ #include #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 ("%s", _("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 ("%s", 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 ("%s", _("Object properties")); diff --git a/src/stock-pixmaps/Makefile.am b/src/stock-pixmaps/Makefile.am deleted file mode 100644 index 00625378..00000000 --- a/src/stock-pixmaps/Makefile.am +++ /dev/null @@ -1,95 +0,0 @@ - -IMAGES = \ - stock_arrow_24.png \ - stock_arrow_16.png \ - stock_barcode_24.png \ - stock_barcode_16.png \ - stock_box_24.png \ - stock_box_16.png \ - stock_ellipse_24.png \ - stock_ellipse_16.png \ - stock_image_24.png \ - stock_image_16.png \ - stock_line_24.png \ - stock_line_16.png \ - stock_merge_24.png \ - stock_merge_16.png \ - stock_properties_24.png \ - stock_properties_16.png \ - stock_text_24.png \ - stock_text_16.png \ - stock_order_top_16.png \ - stock_order_bottom_16.png \ - stock_rotate_left_16.png \ - stock_rotate_right_16.png \ - stock_flip_horiz_16.png \ - stock_flip_vert_16.png \ - stock_align_left_16.png \ - stock_align_right_16.png \ - stock_align_hcenter_16.png \ - stock_align_top_16.png \ - stock_align_bottom_16.png \ - stock_align_vcenter_16.png \ - stock_center_horiz_16.png \ - stock_center_vert_16.png \ - stock_bucket_fill_16.png \ - stock_bucket_fill_24.png \ - stock_pencil_16.png \ - stock_pencil_24.png \ - stock_hchain_24.png \ - stock_hchain_broken_24.png \ - stock_vchain_24.png \ - stock_vchain_broken_24.png - -VARIABLES1 = \ - stock_arrow_24 $(srcdir)/stock_arrow_24.png \ - stock_arrow_16 $(srcdir)/stock_arrow_16.png \ - stock_barcode_24 $(srcdir)/stock_barcode_24.png \ - stock_barcode_16 $(srcdir)/stock_barcode_16.png \ - stock_box_24 $(srcdir)/stock_box_24.png \ - stock_box_16 $(srcdir)/stock_box_16.png \ - stock_ellipse_24 $(srcdir)/stock_ellipse_24.png \ - stock_ellipse_16 $(srcdir)/stock_ellipse_16.png \ - stock_image_24 $(srcdir)/stock_image_24.png \ - stock_image_16 $(srcdir)/stock_image_16.png \ - stock_line_24 $(srcdir)/stock_line_24.png \ - stock_line_16 $(srcdir)/stock_line_16.png \ - stock_merge_24 $(srcdir)/stock_merge_24.png \ - stock_merge_16 $(srcdir)/stock_merge_16.png \ - stock_properties_24 $(srcdir)/stock_properties_24.png \ - stock_properties_16 $(srcdir)/stock_properties_16.png \ - stock_text_24 $(srcdir)/stock_text_24.png \ - stock_text_16 $(srcdir)/stock_text_16.png \ - stock_order_top_16 $(srcdir)/stock_order_top_16.png \ - stock_order_bottom_16 $(srcdir)/stock_order_bottom_16.png \ - stock_rotate_left_16 $(srcdir)/stock_rotate_left_16.png \ - stock_rotate_right_16 $(srcdir)/stock_rotate_right_16.png \ - stock_flip_horiz_16 $(srcdir)/stock_flip_horiz_16.png \ - stock_flip_vert_16 $(srcdir)/stock_flip_vert_16.png \ - stock_align_left_16 $(srcdir)/stock_align_left_16.png \ - stock_align_right_16 $(srcdir)/stock_align_right_16.png \ - stock_align_hcenter_16 $(srcdir)/stock_align_hcenter_16.png \ - stock_align_top_16 $(srcdir)/stock_align_top_16.png \ - stock_align_bottom_16 $(srcdir)/stock_align_bottom_16.png \ - stock_align_vcenter_16 $(srcdir)/stock_align_vcenter_16.png \ - stock_center_horiz_16 $(srcdir)/stock_center_horiz_16.png \ - stock_center_vert_16 $(srcdir)/stock_center_vert_16.png \ - stock_bucket_fill_16 $(srcdir)/stock_bucket_fill_16.png \ - stock_bucket_fill_24 $(srcdir)/stock_bucket_fill_24.png \ - stock_pencil_16 $(srcdir)/stock_pencil_16.png \ - stock_pencil_24 $(srcdir)/stock_pencil_24.png \ - stock_hchain_24 $(srcdir)/stock_hchain_24.png \ - stock_hchain_broken_24 $(srcdir)/stock_hchain_broken_24.png \ - stock_vchain_24 $(srcdir)/stock_vchain_24.png \ - stock_vchain_broken_24 $(srcdir)/stock_vchain_broken_24.png - - -noinst_DATA = stockpixbufs.h -CLEANFILES = $(noinst_DATA) - -stockpixbufs.h: $(IMAGES) - $(AM_V_GEN) $(GDK_PIXBUF_CSOURCE) \ - --raw --build-list $(VARIABLES1) > $(srcdir)/stockpixbufs.h || \ - ( rm -f $(srcdir)/stockpixbufs.h && false ) - -EXTRA_DIST = $(IMAGES) stockpixbufs.h diff --git a/src/stock.c b/src/stock.c deleted file mode 100644 index 7f312109..00000000 --- a/src/stock.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * stock.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * gLabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gLabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gLabels. If not, see . - */ - -#include - -#include "stock.h" - -#include -#include -#include - -#include "stock-pixmaps/stockpixbufs.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void add_icons (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24, - const guchar *inline_16); - -static void add_button_icon (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24); - - -/****************************************************************************/ -/* Initialize our stock icons. */ -/****************************************************************************/ -void -gl_stock_init (void) -{ - GtkIconFactory *factory; - - static GtkStockItem items[] = { - { GL_STOCK_ARROW, N_("_Select Mode"), 0, 0, NULL }, - { GL_STOCK_TEXT, N_("_Text"), 0, 0, NULL }, - { GL_STOCK_LINE, N_("_Line"), 0, 0, NULL }, - { GL_STOCK_BOX, N_("_Box"), 0, 0, NULL }, - { GL_STOCK_ELLIPSE, N_("_Ellipse"), 0, 0, NULL }, - { GL_STOCK_IMAGE, N_("_Image"), 0, 0, NULL }, - { GL_STOCK_BARCODE, N_("Bar_code"), 0, 0, NULL }, - { GL_STOCK_MERGE, N_("_Merge Properties"), 0, 0, NULL }, - { GL_STOCK_PROPERTIES, N_("Object _Properties"), 0, 0, NULL }, - { GL_STOCK_ORDER_TOP, N_("Bring to _Front"), 0, 0, NULL }, - { GL_STOCK_ORDER_BOTTOM, N_("Send to _Back"), 0, 0, NULL }, - { GL_STOCK_ROTATE_LEFT, N_("Rotate _Left"), 0, 0, NULL }, - { GL_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), 0, 0, NULL }, - { GL_STOCK_FLIP_HORIZ, N_("Flip _Horizontally"), 0, 0, NULL }, - { GL_STOCK_FLIP_VERT, N_("Flip _Vertically"), 0, 0, NULL }, - { GL_STOCK_ALIGN_LEFT, N_("_Lefts"), 0, 0, NULL }, - { GL_STOCK_ALIGN_RIGHT, N_("_Rights"), 0, 0, NULL }, - { GL_STOCK_ALIGN_HCENTER, N_("_Centers"), 0, 0, NULL }, - { GL_STOCK_ALIGN_TOP, N_("_Tops"), 0, 0, NULL }, - { GL_STOCK_ALIGN_BOTTOM, N_("Bottoms"), 0, 0, NULL }, - { GL_STOCK_ALIGN_VCENTER, N_("Centers"), 0, 0, NULL }, - { GL_STOCK_CENTER_HORIZ, N_("Label Ce_nter"), 0, 0, NULL }, - { GL_STOCK_CENTER_VERT, N_("Label Ce_nter"), 0, 0, NULL }, - { GL_STOCK_BUCKET_FILL, N_("Fill color"), 0, 0, NULL }, - { GL_STOCK_PENCIL, N_("Line color"), 0, 0, NULL }, - { GL_STOCK_HCHAIN, N_("Linked"), 0, 0, NULL }, - { GL_STOCK_HCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, - { GL_STOCK_VCHAIN, N_("Linked"), 0, 0, NULL }, - { GL_STOCK_VCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, - }; - - gtk_stock_add (items, G_N_ELEMENTS (items)); - - factory = gtk_icon_factory_new (); - gtk_icon_factory_add_default (factory); - - add_icons (factory, GL_STOCK_ARROW, stock_arrow_24, stock_arrow_16); - add_icons (factory, GL_STOCK_TEXT, stock_text_24, stock_text_16); - add_icons (factory, GL_STOCK_LINE, stock_line_24, stock_line_16); - add_icons (factory, GL_STOCK_BOX, stock_box_24, stock_box_16); - add_icons (factory, GL_STOCK_ELLIPSE, stock_ellipse_24, stock_ellipse_16); - add_icons (factory, GL_STOCK_IMAGE, stock_image_24, stock_image_16); - add_icons (factory, GL_STOCK_BARCODE, stock_barcode_24, stock_barcode_16); - add_icons (factory, GL_STOCK_MERGE, stock_merge_24, stock_merge_16); - - add_icons (factory, GL_STOCK_PROPERTIES, - stock_properties_24, - stock_properties_16); - - add_icons (factory, GL_STOCK_ORDER_TOP, NULL, stock_order_top_16); - add_icons (factory, GL_STOCK_ORDER_BOTTOM, NULL, stock_order_bottom_16); - add_icons (factory, GL_STOCK_ROTATE_LEFT, NULL, stock_rotate_left_16); - add_icons (factory, GL_STOCK_ROTATE_RIGHT, NULL, stock_rotate_right_16); - add_icons (factory, GL_STOCK_FLIP_HORIZ, NULL, stock_flip_horiz_16); - add_icons (factory, GL_STOCK_FLIP_VERT, NULL, stock_flip_vert_16); - add_icons (factory, GL_STOCK_ALIGN_LEFT, NULL, stock_align_left_16); - add_icons (factory, GL_STOCK_ALIGN_RIGHT, NULL, stock_align_right_16); - add_icons (factory, GL_STOCK_ALIGN_HCENTER, NULL, stock_align_hcenter_16); - add_icons (factory, GL_STOCK_ALIGN_TOP, NULL, stock_align_top_16); - add_icons (factory, GL_STOCK_ALIGN_BOTTOM, NULL, stock_align_bottom_16); - add_icons (factory, GL_STOCK_ALIGN_VCENTER, NULL, stock_align_vcenter_16); - add_icons (factory, GL_STOCK_CENTER_HORIZ, NULL, stock_center_horiz_16); - add_icons (factory, GL_STOCK_CENTER_VERT, NULL, stock_center_vert_16); - - add_icons (factory, GL_STOCK_BUCKET_FILL, stock_bucket_fill_24, stock_bucket_fill_16); - add_icons (factory, GL_STOCK_PENCIL, stock_pencil_24, stock_pencil_16); - - add_button_icon (factory, GL_STOCK_HCHAIN, stock_hchain_24); - add_button_icon (factory, GL_STOCK_HCHAIN_BROKEN, stock_hchain_broken_24); - add_button_icon (factory, GL_STOCK_VCHAIN, stock_vchain_24); - add_button_icon (factory, GL_STOCK_VCHAIN_BROKEN, stock_vchain_broken_24); - - g_object_unref (G_OBJECT(factory)); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Unpack and associate given icons with stock_id. */ -/*--------------------------------------------------------------------------*/ -static void -add_icons (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24, - const guchar *inline_16) -{ - GdkPixbuf *pixbuf; - GtkIconSet *icon_set; - GtkIconSource *icon_source; - - if ( inline_24 != NULL ) { - /* Create icon set with default image */ - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); - icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - } else { - /* Create an empty icon set */ - icon_set = gtk_icon_set_new (); - } - - if ( inline_16 != NULL ) { - /* Add 16x16 icon for menus to icon set */ - icon_source = gtk_icon_source_new (); - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_16, - FALSE, NULL); - gtk_icon_source_set_pixbuf (icon_source, pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - gtk_icon_source_set_size_wildcarded (icon_source, FALSE); - gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_MENU); - gtk_icon_set_add_source (icon_set, icon_source); - gtk_icon_source_free (icon_source); - } - - /* Now associate icon set with stock id */ - gtk_icon_factory_add (factory, stock_id, icon_set); - gtk_icon_set_unref (icon_set); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Unpack and associate given button icon with stock_id. */ -/*--------------------------------------------------------------------------*/ -static void -add_button_icon (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24) -{ - GtkIconSet *icon_set; - GdkPixbuf *pixbuf; - GtkIconSource *icon_source; - - icon_set = gtk_icon_set_new (); - - icon_source = gtk_icon_source_new (); - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); - gtk_icon_source_set_pixbuf (icon_source, pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - gtk_icon_source_set_size_wildcarded (icon_source, FALSE); - gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_BUTTON); - gtk_icon_set_add_source (icon_set, icon_source); - gtk_icon_source_free (icon_source); - - /* Now associate icon set with stock id */ - gtk_icon_factory_add (factory, stock_id, icon_set); - gtk_icon_set_unref (icon_set); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/src/stock.h b/src/stock.h deleted file mode 100644 index 54eb8c8a..00000000 --- a/src/stock.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * stock.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * gLabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gLabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gLabels. If not, see . - */ - -#ifndef __STOCK_H__ -#define __STOCK_H__ - -#include - -G_BEGIN_DECLS - -/* Stock names */ - -#define GL_STOCK_ARROW "gl_stock_arrow" -#define GL_STOCK_TEXT "gl_stock_text" -#define GL_STOCK_LINE "gl_stock_line" -#define GL_STOCK_BOX "gl_stock_box" -#define GL_STOCK_ELLIPSE "gl_stock_ellipse" -#define GL_STOCK_IMAGE "gl_stock_image" -#define GL_STOCK_BARCODE "gl_stock_barcode" -#define GL_STOCK_MERGE "gl_stock_merge" -#define GL_STOCK_PROPERTIES "gl_stock_properties" -#define GL_STOCK_ORDER_TOP "gl_stock_order_top" -#define GL_STOCK_ORDER_BOTTOM "gl_stock_order_bottom" -#define GL_STOCK_ROTATE_LEFT "gl_stock_rotate_left" -#define GL_STOCK_ROTATE_RIGHT "gl_stock_rotate_right" -#define GL_STOCK_FLIP_HORIZ "gl_stock_flip_horiz" -#define GL_STOCK_FLIP_VERT "gl_stock_flip_vert" -#define GL_STOCK_ALIGN_LEFT "gl_stock_align_left" -#define GL_STOCK_ALIGN_RIGHT "gl_stock_align_right" -#define GL_STOCK_ALIGN_HCENTER "gl_stock_align_hcenter" -#define GL_STOCK_ALIGN_TOP "gl_stock_align_top" -#define GL_STOCK_ALIGN_BOTTOM "gl_stock_align_bottom" -#define GL_STOCK_ALIGN_VCENTER "gl_stock_align_vcenter" -#define GL_STOCK_CENTER_HORIZ "gl_stock_center_horiz" -#define GL_STOCK_CENTER_VERT "gl_stock_center_vert" -#define GL_STOCK_BUCKET_FILL "gl_stock_bucket_fill" -#define GL_STOCK_PENCIL "gl_stock_pencil" -#define GL_STOCK_HCHAIN "gl_stock_hchain" -#define GL_STOCK_HCHAIN_BROKEN "gl_stock_hchain_broken" -#define GL_STOCK_VCHAIN "gl_stock_vchain" -#define GL_STOCK_VCHAIN_BROKEN "gl_stock_vchain_broken" - -void gl_stock_init (void); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/src/ui-property-bar.c b/src/ui-property-bar.c index c2e82dff..927dae2f 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 60a17755..d23d5a1e 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 b369f9d1..b9dacd9f 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 5963fea9..c9f7ad23 100644 --- a/src/wdgt-chain-button.c +++ b/src/wdgt-chain-button.c @@ -31,8 +31,6 @@ #include -#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); } } -- 2.39.5