add mini-icons to windows
authorPaul Mangan <paul@claws-mail.org>
Wed, 29 Aug 2001 11:00:44 +0000 (11:00 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 29 Aug 2001 11:00:44 +0000 (11:00 +0000)
ChangeLog.claws
src/compose.c
src/gtkutils.c
src/gtkutils.h
src/mainwindow.c
src/pixmaps/sylpheed.xpm [new file with mode: 0644]

index c5bd17420cc6f111db0a30b9caa86604629d26cd..b6cafdedf9ed227202ec1522cbd9c4a18fb41716 100644 (file)
@@ -6,6 +6,10 @@
        * sync with sylpheed 0.5.3cvs10
                src/stringtable.[ch]: New Files
 
+       * src/compose.c, src/gtkutils.c, src/gtkutils.h, src/mainwindow.c
+       * src/pixmaps/sylpheed.xpm
+               add mini-icons to windows (by Alfons)
+
 2001-08-27 [paul]
 
        * src/mainwindow.c
index 324f9e4fc2319f7b6b048a478f5e8cd938eb4a21..158ee5972ba089074fe4bd02d35e1c40ed56caec 100644 (file)
@@ -2901,6 +2901,8 @@ static Compose *compose_create(PrefsAccount *account)
                           GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
        gtk_widget_realize(window);
 
+       gtkut_widget_set_composer_icon(window);
+
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_container_add(GTK_CONTAINER(window), vbox);
 
index e65adbabdb05ab13c9d80f2c03c1ff434758232d..bf5df7aef5d8f27b3dfb942bbeea15697d5878ce 100644 (file)
@@ -331,3 +331,33 @@ void gtkut_widget_init(void)
        gtkut_clist_bindings_add(clist);
        gtk_widget_unref(clist);
 }
+
+void gtkut_widget_set_app_icon(GtkWidget *widget)
+{
+#include "pixmaps/sylpheed.xpm"        
+       static GdkPixmap *sylpheedxpm;
+       static GdkBitmap *sylpheedxpmmask;
+       
+       g_return_if_fail(widget != NULL);
+       g_return_if_fail(widget->window != NULL);
+       if (!sylpheedxpm) {
+               PIXMAP_CREATE(widget, sylpheedxpm, sylpheedxpmmask, sylpheed_xpm);
+       }               
+       gdk_window_set_icon(widget->window, NULL, sylpheedxpm, sylpheedxpmmask);
+}
+
+void gtkut_widget_set_composer_icon(GtkWidget *widget)
+{
+#include "pixmaps/stock_mail_compose.xpm"
+       static GdkPixmap *xpm;
+       static GdkBitmap *bmp;
+
+       g_return_if_fail(widget != NULL);
+       g_return_if_fail(widget->window != NULL);
+       if (!xpm) {
+               PIXMAP_CREATE(widget, xpm, bmp, stock_mail_compose_xpm);
+       }
+       gdk_window_set_icon(widget->window, NULL, xpm, bmp);    
+}
+
+
index 96706261d81b5dd4b686a3ea12b27c7fc4cd3aff..492f6f2c7ed32d5fef8e6b87e2e42e3301a6042a 100644 (file)
@@ -98,4 +98,7 @@ void gtkut_widget_get_uposition               (GtkWidget      *widget,
 
 void gtkut_widget_init                 (void);
 
+void gtk_widget_set_app_icon           (GtkWidget      *widget);
+void gtk_widget_set_composer_icon      (GtkWidget      *widget);
+
 #endif /* __GTKUTILS_H__ */
index 45a8ce8d28ccd1260319a071db6ae706409825f2..9af3ed60546ab7f08e98710fff27deb641849c05 100644 (file)
@@ -639,8 +639,11 @@ MainWindow *main_window_create(SeparateType type)
                           GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
                           GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+
        gtk_widget_realize(window);
 
+       gtkut_widget_set_app_icon(window);
+
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_widget_show(vbox);
        gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -831,6 +834,7 @@ MainWindow *main_window_create(SeparateType type)
                                 prefs_common.mainwin_y);
        gtk_widget_set_usize(window, prefs_common.mainwin_width,
                             prefs_common.mainwin_height);
+                            
        gtk_widget_show(mainwin->window);
 
        /* initialize views */
@@ -840,6 +844,7 @@ MainWindow *main_window_create(SeparateType type)
        header_window_init(mainwin->headerwin);
        log_window_init(mainwin->logwin);
 
+
        mainwin->lock_count = 0;
        mainwin->cursor_count = 0;
 
diff --git a/src/pixmaps/sylpheed.xpm b/src/pixmaps/sylpheed.xpm
new file mode 100644 (file)
index 0000000..f1f227b
--- /dev/null
@@ -0,0 +1,118 @@
+/* XPM */
+static char * sylpheed_xpm[] = {
+"50 50 65 1",
+"      c None",
+".     c #0E0E0E",
+"+     c #A09E9C",
+"@     c #525050",
+"#     c #676666",
+"$     c #D9A75E",
+"%     c #B07448",
+"&     c #F0C26B",
+"*     c #888888",
+"=     c #1B1A1A",
+"-     c #C0BFBF",
+";     c #C6C6C6",
+">     c #A66C47",
+",     c #272626",
+"'     c #FAD587",
+")     c #6F6E6E",
+"!     c #383636",
+"~     c #C7A389",
+"{     c #B6B6B6",
+"]     c #8C5C40",
+"^     c #C18C58",
+"/     c #FEDD8D",
+"(     c #7D7C7C",
+"_     c #424040",
+":     c #979695",
+"<     c #9D6443",
+"[     c #7F5A43",
+"}     c #FACC6A",
+"|     c #9D725A",
+"1     c #FEE09A",
+"2     c #605E5D",
+"3     c #E0B576",
+"4     c #8D634C",
+"5     c #AFAEAD",
+"6     c #4A4848",
+"7     c #EAC68F",
+"8     c #6A5449",
+"9     c #BE977F",
+"0     c #E9B961",
+"a     c #C3AFA3",
+"b     c #595857",
+"c     c #927464",
+"d     c #B6A49A",
+"e     c #FDD780",
+"f     c #F6DCAC",
+"g     c #D4B59C",
+"h     c #A7A6A6",
+"i     c #DBC3AE",
+"j     c #CA9963",
+"k     c #A87D65",
+"l     c #7A655B",
+"m     c #FEE7B1",
+"n     c #89715B",
+"o     c #8B817B",
+"p     c #9C8C82",
+"q     c #8F8E8E",
+"r     c #A8968A",
+"s     c #FED36C",
+"t     c #E5B25C",
+"u     c #604A3F",
+"v     c #EDD1A6",
+"w     c #828282",
+"x     c #B57E53",
+"y     c #757474",
+"z     c #FED57A",
+"yyyyy))))))#######22222bbbbbb@b@@@@@6@66666_6_____",
+"ybbbbbbbb@@bbb@@@@b@@@@b@@@@@@@@@@66@66@666666666!",
+"yb;;;;;--;--{-{{{{5{55h5hhh+++++:+::::qqqqq*q**w6_",
+"yb;;;;-;-{-{{{{{{555555h5h+h+++:+::::q:qqqq***ww6!",
+")2;;;-----{-{{{5{555aggigghh+++:+::::qqqq******w6!",
+")b;-;---{-{{{{5{a{aigivfvgga+++::::qqqqq****www(6!",
+")b;-;---{{{{{{{{giiiifmmmvggd+::::q:qqqq****www(6!",
+")@;---{-{-{{a{giiivmmmmmmmvggd+:::qqqq****www(w(6!",
+")b;---{{{{{-iiiifmmmmmmmmmfva~+:q:qqqq****www(w(6!",
+")@--{{-{{{{givmmmmmmmmmmmmmf7gd:qqqq****ww*(w(((_!",
+")@---{{{{5{ivmmmmmmmmmmmmmm1f7~+qqqq****www(w(((_!",
+"#b-{{{{{{{{ai;mmmmmfvmmm11/eee7+qqq****www(w((yy_!",
+"#@--{{{{55{aiivmmmmfgif11/esss7r*****w*wow((((((_,",
+"#b{{{{5{555hg;fmmmmfg9~7ess}}0^ny*****ww((((yyyy6!",
+"#b{{{{{5555haivmmmm79x%^&}s}0^<82ywwwoww(((((yyy_,",
+"#@{{{5555h5h5ivmm1f&x<]>^&}0^<[u@2)(w(((((yyyyyy6,",
+"#b{{{5555hhh5gvmmm'0x[[<x00^<<[uu8#)(((((((yyyy)6,",
+"#@{55555h5hhd-vmm1/0%]]%t}$x%xx%>4]ly((((yyyyy)y6,",
+"2@{{555hhhhhhgvmmm1&x<%$sz}}000t$j^xpo((((yyy))#6,",
+"#@55h5h5hhhhdgvmmm1&%%j}e//esss}}s&3~^*yyyyy))))_,",
+"2@555hhhhh+hagvmmmf&^j&sz/1/essssze/7~9(yyy)))#)6,",
+"2b55h55h+hhdgavm1m1&t&}se/m1/esss////7~ky))))#)#_,",
+"b@5hhhhhh++dagvmm11e}s}ss/1m/esze/////3joy)))###_,",
+"2@h5hhhh++hggvmm1m1sss&t$077&&&szeee/e'~k)))#)##_,",
+"b@5hhh+h+++agvfm1m1es&jx%^99^^^$&szszzz$x))#####_,",
+"2@hhh+h++:+d~gi7111s&^><ck^xjj%>^0}ss}s$xl2)####!,",
+"b@hh+h++++:++9dai7/&j<<[l|x$&}$x>^&ss}s0%[2###2#_,",
+"b@h+h+++++:::+r~~g'&^><[[>j&}}}j%%t}}s}t%8@b2##2_=",
+"b@h+++++:+:::rd~77's0$^%<>^&ss}j><$}ss}0>u6@b222_=",
+"@@+h+:+:::::d~gvf/zs}}}tj>>j&s0x<>$}}sst%u_@b222_=",
+"@@+++:++:::r~g'111ees}s}}t^^$39nc%$}ssst%6__@b22_=",
+"b@++++::::r~if11m1//sss}}s}3j^pcc%tsesst>___@bbb_=",
+"@@++:::::q+g'm11'''1/esssze/7j^k|x0zzzsj]___6bbb_=",
+"@@+:::::qrd71f7ga$a3}eessee'f39kx$}see0xu___6@bb_=",
+"@@:+::::q:afvg~~99999$&ssszzee3$t&sss0^l____6@b@!=",
+"6@::::qqqq~7~~9rp*oc|%^t}ssszz'szss}$^%86!__6@@b_=",
+"6@::q::qq:d~9rp*()288]<x$}ss}ssees0j^cl@____6@@@!=",
+"@@:::qqqq*pqq*ooy#@__u[<%$}}s}ss}$9k|)b6____6@b@_.",
+"6@:qqqqqq***ow(y#@666@8]>%$}s}}$^%%nl2@6_!__6@@@_.",
+"@6q:qqq****www()b@@b22#2l>x$}t^><[2bb@6___666@@@!=",
+"6@qqqq******ww(#bb#)y)y)#ll44[8u6__6@6____6@@@6@!.",
+"66:qq*q**wwww((y##)yyy)))##2@6__________66@6@@@6_.",
+"66qqq****ww(w(y(yyyyyyy))###b@___!______@@@@6666_.",
+"66q****oww(w(((y(yy)y)))))##2b@_______@6@@@@@@66!.",
+"6@q*****ww(w(((y(yy)y))#)###22b66__66@@@@@6@6666!.",
+"_6****wwwww(((y()yy))#))####2#bb6666@@b@@@@66666!.",
+"_@***wwww(((((yyy)y))##)####22bbb@@b@@@@@66@66_6!.",
+"_6*ww*w((((yyyyyy)))))#####2222bbbbbb@@@@@66666_!.",
+"_66666666666666_6_6__6____________!_!_!!!_!!!!!!!.",
+"____!!!!!!!!!,,!,!,,,,,,,,,,============.........."};