From 9ed794d648593c56391e2c39ba3d45a891f0db23 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Mon, 25 Nov 2002 02:13:33 +0000 Subject: [PATCH] Menu icons for alignment commands. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@181 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/stock-pixmaps/Makefile.am | 16 ++++- .../stock-pixmaps/stock_align_bottom_16.png | Bin 0 -> 212 bytes .../stock-pixmaps/stock_align_hcenter_16.png | Bin 0 -> 226 bytes .../src/stock-pixmaps/stock_align_left_16.png | Bin 0 -> 218 bytes .../stock-pixmaps/stock_align_right_16.png | Bin 0 -> 232 bytes .../src/stock-pixmaps/stock_align_top_16.png | Bin 0 -> 218 bytes .../stock-pixmaps/stock_align_vcenter_16.png | Bin 0 -> 238 bytes glabels2/src/stock.c | 59 +++++++++++------- glabels2/src/stock.h | 22 ++++--- 9 files changed, 66 insertions(+), 31 deletions(-) create mode 100644 glabels2/src/stock-pixmaps/stock_align_bottom_16.png create mode 100644 glabels2/src/stock-pixmaps/stock_align_hcenter_16.png create mode 100644 glabels2/src/stock-pixmaps/stock_align_left_16.png create mode 100644 glabels2/src/stock-pixmaps/stock_align_right_16.png create mode 100644 glabels2/src/stock-pixmaps/stock_align_top_16.png create mode 100644 glabels2/src/stock-pixmaps/stock_align_vcenter_16.png 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 0000000000000000000000000000000000000000..b6e7f7d51af47f1f5e351bb6e35dfa2de83f3247 GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G_YAk0{w5<>&kwKTSA1_IDyYs2q={3>EaktF()};fq=oIiNF1OqSR`Z zoxfYynfR{HyCSyXI>Vl@$w>@$2bh+2e$tN<-?RJLfe-JZm~ZMSh$ZZpvckaOT4^B{ z|KX#WHU)M^8!bMt9azL2Z6c)YCM`Z;)%+R;28YeUSIYiJoda6N;OXk;vd$@?2>|oZ BMdAPe literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4004927f06c7d7ff9f9771e1ccca2a75ff50122e GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G_YAk0{w5<>&kwKTS7#bwfgJx5TH=Lr;B4q#hm1X1p)?(KK`G)s+~3V z+uf~f7SSH78Jqk0W^`3H<>&kwKTSA0WX8q=^{y?F0PZ!6KiaE&%3j_?DUj7gGRduMp(OVGhb>t;$7bAn8hnVcG7fY`Jtz__Y^>bP0 Hl+XkKvQkA| literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..095f11044601ee3993fba808434ac31c5425970f GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G_YAk0{w5<>&kwKTSA0KNqA|@LZDEor;B4q#hm1X1p)>_6aM$R->+w5 zV{;R8GK-mWsQJ+K^FNyor7NW{C^~Eu*Vy>So*4+Zjo4=wTFhYx=i)!I(^^k3HFs0H z9M}A;#t!WbA6_obQ%IVs@_>o0hRtBl?rRO9F&^BZbJ8>?O6Uj3bnt)x!`y{pvN3hu RbAb+E@O1TaS?83{1OSZ>MLPfh literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d81f35cacc94bac11e325acb282e5d03b1e90bca GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G_YAk0{w5<>&kwKTSA0~<=~2&F+iboPZ!6KiaE&%3j_?DUj7$(wR|79 zM5kzS(?&hNhlx8ZTG?I8-t~F&6qm<1309Y{ZG3olE1Sjq&PFGL4{RF_Nc^&l4^Zjo zm7l?wa$KD|QFVob$LdBUW`h{7-4P0A#Sge`ay)1LVqkc<>&kwKTS7!gdd9=oWk8{7PZ!6KiaE&%5*Y_N+~3(7X3hLC z)2{ruYTHh0y@y*{TSabvkUa3=T@*72G*1X)w)-j}_V6o{SwSHe|KX#WHU)Mk*%mO* zh`%`3ZA;w_?t8J>4eiWl5+ZaIx&!ZW>$FT=!1Q;H{taFQfm(xxiFOeMo&ww&=eR|f Z8T@C;MpaKb+6Z(8gQu&X%Q~loCIHXhP8k3I literal 0 HcmV?d00001 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); -- 2.39.5