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)
libglabels/${LIBGLABELS_BRANCH}.pc
src/Makefile
src/pixmaps/Makefile
-src/stock-pixmaps/Makefile
data/Makefile
data/desktop/Makefile
data/icons/Makefile
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)
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)
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
-SUBDIRS= ../libglabels pixmaps stock-pixmaps
+SUBDIRS= ../libglabels pixmaps
bin_PROGRAMS = glabels-3 glabels-3-batch
critical-error-handler.h \
window.c \
window.h \
- stock.c \
- stock.h \
ui.h \
ui.c \
ui-util.h \
/** 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);
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);
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);
#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"
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 ();
#include <math.h>
#include "prefs.h"
-#include "stock.h"
#include "color-combo.h"
#include "color.h"
#include "wdgt-chain-button.h"
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"));
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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);
{
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"));
+++ /dev/null
-
-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
+++ /dev/null
-/*
- * stock.c
- * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#include <config.h>
-
-#include "stock.h"
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#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
- */
+++ /dev/null
-/*
- * stock.h
- * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __STOCK_H__
-#define __STOCK_H__
-
-#include <glib.h>
-
-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
- */
#include "builder-util.h"
#include "font-combo.h"
#include "color-combo-button.h"
-#include "stock-pixmaps/stockpixbufs.h"
#include "prefs.h"
#include "color.h"
"adjustment1", "adjustment2",
NULL };
GError *error = NULL;
- GdkPixbuf *pixbuf = NULL;
gl_debug (DEBUG_PROPERTY_BAR, "START");
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);
#include "ui-util.h"
#include "object-editor.h"
-#include "stock.h"
#include "debug.h"
#include "ui-commands.h"
#include "file.h"
#include "prefs.h"
-#include "stock.h"
#include "window.h"
#include "recent.h"
/* 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"),
#include <gtk/gtk.h>
-#include "stock.h"
-
enum
{
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"
};
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);
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);
}
}