From: Jim Evins Date: Mon, 25 Nov 2002 02:13:33 +0000 (+0000) Subject: Menu icons for alignment commands. X-Git-Tag: glabels-2_3_0~706 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ed794d648593c56391e2c39ba3d45a891f0db23;p=glabels Menu icons for alignment commands. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@181 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/stock-pixmaps/Makefile.am b/glabels2/src/stock-pixmaps/Makefile.am index 8a845090..e589578f 100644 --- a/glabels2/src/stock-pixmaps/Makefile.am +++ b/glabels2/src/stock-pixmaps/Makefile.am @@ -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 index 00000000..b6e7f7d5 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 index 00000000..4004927f 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 index 00000000..851421e6 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 index 00000000..095f1104 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 index 00000000..d81f35ca 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 index 00000000..2f07cea6 Binary files /dev/null and b/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png differ diff --git a/glabels2/src/stock.c b/glabels2/src/stock.c index c333780f..28ab8a22 100644 --- a/glabels2/src/stock.c +++ b/glabels2/src/stock.c @@ -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); diff --git a/glabels2/src/stock.h b/glabels2/src/stock.h index c24f577d..a83d09cf 100644 --- a/glabels2/src/stock.h +++ b/glabels2/src/stock.h @@ -25,14 +25,20 @@ /* 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);