]> git.sur5r.net Git - glabels/commitdiff
Menu icons for alignment commands.
authorJim Evins <evins@snaught.com>
Mon, 25 Nov 2002 02:13:33 +0000 (02:13 +0000)
committerJim Evins <evins@snaught.com>
Mon, 25 Nov 2002 02:13:33 +0000 (02:13 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@181 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/stock-pixmaps/Makefile.am
glabels2/src/stock-pixmaps/stock_align_bottom_16.png [new file with mode: 0644]
glabels2/src/stock-pixmaps/stock_align_hcenter_16.png [new file with mode: 0644]
glabels2/src/stock-pixmaps/stock_align_left_16.png [new file with mode: 0644]
glabels2/src/stock-pixmaps/stock_align_right_16.png [new file with mode: 0644]
glabels2/src/stock-pixmaps/stock_align_top_16.png [new file with mode: 0644]
glabels2/src/stock-pixmaps/stock_align_vcenter_16.png [new file with mode: 0644]
glabels2/src/stock.c
glabels2/src/stock.h

index 8a845090d8aa9a40e5c11b8ed876abf73c33aced..e589578fb3117bdb3924e6cab3f4ffb0e24db82b 100644 (file)
@@ -15,7 +15,13 @@ IMAGES =                             \
        stock_merge_24.png              \
        stock_merge_16.png              \
        stock_text_24.png               \
-       stock_text_16.png
+       stock_text_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
 
 VARIABLES1 = \
                stock_arrow_24          $(srcdir)/stock_arrow_24.png    \
@@ -33,7 +39,13 @@ VARIABLES1 = \
                stock_merge_24          $(srcdir)/stock_merge_24.png    \
                stock_merge_16          $(srcdir)/stock_merge_16.png    \
                stock_text_24           $(srcdir)/stock_text_24.png     \
-               stock_text_16           $(srcdir)/stock_text_16.png
+               stock_text_16           $(srcdir)/stock_text_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
 
 noinst_DATA = stockpixbufs.h
 CLEANFILES = $(noinst_DATA)
diff --git a/glabels2/src/stock-pixmaps/stock_align_bottom_16.png b/glabels2/src/stock-pixmaps/stock_align_bottom_16.png
new file mode 100644 (file)
index 0000000..b6e7f7d
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_bottom_16.png differ
diff --git a/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png b/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png
new file mode 100644 (file)
index 0000000..4004927
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png differ
diff --git a/glabels2/src/stock-pixmaps/stock_align_left_16.png b/glabels2/src/stock-pixmaps/stock_align_left_16.png
new file mode 100644 (file)
index 0000000..851421e
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_left_16.png differ
diff --git a/glabels2/src/stock-pixmaps/stock_align_right_16.png b/glabels2/src/stock-pixmaps/stock_align_right_16.png
new file mode 100644 (file)
index 0000000..095f110
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_right_16.png differ
diff --git a/glabels2/src/stock-pixmaps/stock_align_top_16.png b/glabels2/src/stock-pixmaps/stock_align_top_16.png
new file mode 100644 (file)
index 0000000..d81f35c
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_top_16.png differ
diff --git a/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png b/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png
new file mode 100644 (file)
index 0000000..2f07cea
Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png differ
index c333780f874a4b7331f61a79eab03a991457e2ac..28ab8a2228c36287b23257127f74a94647098cef 100644 (file)
@@ -58,14 +58,20 @@ gl_stock_init (void)
        GtkIconFactory *factory;
 
        static GtkStockItem items[] = {
-               { GL_STOCK_ARROW,   "Arrow",   0, 0, NULL },
-               { GL_STOCK_TEXT,    "Text",    0, 0, NULL },
-               { GL_STOCK_LINE,    "Line",    0, 0, NULL },
-               { GL_STOCK_BOX,     "Box",     0, 0, NULL },
-               { GL_STOCK_ELLIPSE, "Ellipse", 0, 0, NULL },
-               { GL_STOCK_IMAGE,   "Image",   0, 0, NULL },
-               { GL_STOCK_BARCODE, "Barcode", 0, 0, NULL },
-               { GL_STOCK_MERGE,   "Merge",   0, 0, NULL },
+               { GL_STOCK_ARROW,         "Arrow",          0, 0, NULL },
+               { GL_STOCK_TEXT,          "Text",           0, 0, NULL },
+               { GL_STOCK_LINE,          "Line",           0, 0, NULL },
+               { GL_STOCK_BOX,           "Box",            0, 0, NULL },
+               { GL_STOCK_ELLIPSE,       "Ellipse",        0, 0, NULL },
+               { GL_STOCK_IMAGE,         "Image",          0, 0, NULL },
+               { GL_STOCK_BARCODE,       "Barcode",        0, 0, NULL },
+               { GL_STOCK_MERGE,         "Merge",          0, 0, NULL },
+               { GL_STOCK_ALIGN_LEFT,    "AlignLeft",      0, 0, NULL },
+               { GL_STOCK_ALIGN_RIGHT,   "AlignRight",     0, 0, NULL },
+               { GL_STOCK_ALIGN_HCENTER, "AlignHCenter",   0, 0, NULL },
+               { GL_STOCK_ALIGN_TOP,     "AlignTop",       0, 0, NULL },
+               { GL_STOCK_ALIGN_BOTTOM,  "AlignBottom",    0, 0, NULL },
+               { GL_STOCK_ALIGN_VCENTER, "AlignVCenter",   0, 0, NULL },
        };
 
        gtk_stock_add (items, G_N_ELEMENTS (items));
@@ -73,14 +79,20 @@ gl_stock_init (void)
        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_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_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);
 
        g_object_unref (G_OBJECT(factory));
 }
@@ -97,13 +109,18 @@ static add_icons (GtkIconFactory *factory,
        GtkIconSet     *icon_set;
        GtkIconSource  *icon_source;
 
-       /* 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));
+       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 ();
+       }
 
-       /* Add 16x16 icon for menus to icon set */
        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);
index c24f577d0ef6de96fa1fb8b3c1188c614b9a3eac..a83d09cf4e78e25bf278ad08d0285e44c1d0f345 100644 (file)
 
 /* 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_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_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"
 
 void gl_stock_init (void);