changeset 714:d7557252bfb1

[gaim-migrate @ 724] Just a sick idea committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 17 Aug 2000 23:23:24 +0000
parents 3a0e15e75c23
children 58106806ac2b
files pixmaps/add_small.xpm src/buddy.c
diffstat 2 files changed, 143 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/add_small.xpm	Thu Aug 17 23:23:24 2000 +0000
@@ -0,0 +1,96 @@
+/* XPM */
+static char * add_small_xpm[] = {
+"18 18 75 1",
+" 	c None",
+".	c #171F22",
+"+	c #1A2327",
+"@	c #172023",
+"#	c #0C1012",
+"$	c #648692",
+"%	c #648895",
+"&	c #5E808D",
+"*	c #52707B",
+"=	c #454D50",
+"-	c #000000",
+";	c #4A636D",
+">	c #688A98",
+",	c #5E818E",
+"'	c #46606A",
+")	c #5B5B5A",
+"!	c #1A2225",
+"~	c #6B8E9C",
+"{	c #618492",
+"]	c #2E2E2D",
+"^	c #B4B4B3",
+"/	c #1B2529",
+"(	c #5E7B87",
+"_	c #3B5058",
+":	c #727271",
+"<	c #A6A8A4",
+"[	c #262625",
+"}	c #34454B",
+"|	c #688C99",
+"1	c #182023",
+"2	c #B3B3B2",
+"3	c #666764",
+"4	c #161E21",
+"5	c #638491",
+"6	c #628491",
+"7	c #2F4047",
+"8	c #888888",
+"9	c #9FA09D",
+"0	c #3A3C38",
+"a	c #473639",
+"b	c #304249",
+"c	c #304148",
+"d	c #506364",
+"e	c #587177",
+"f	c #5C7D8A",
+"g	c #9F9F9E",
+"h	c #757673",
+"i	c #AA8484",
+"j	c #AFAAA7",
+"k	c #B5B4B1",
+"l	c #B8B8B3",
+"m	c #797D7B",
+"n	c #293134",
+"o	c #12181A",
+"p	c #ADAEAB",
+"q	c #212221",
+"r	c #876464",
+"s	c #CED3D2",
+"t	c #EAE9E4",
+"u	c #F1F0EC",
+"v	c #E5E4E1",
+"w	c #BABAB8",
+"x	c #7E807C",
+"y	c #0F0707",
+"z	c #39464B",
+"A	c #6B6B67",
+"B	c #969E9F",
+"C	c #D4D8D4",
+"D	c #E0E0DB",
+"E	c #A2A59E",
+"F	c #262725",
+"G	c #181E21",
+"H	c #2E302F",
+"I	c #484F50",
+"J	c #475557",
+"                  ",
+"                  ",
+"                  ",
+"       .+@@@@#    ",
+"      .$%&&&*=    ",
+"     -;>,&&&')    ",
+"     !~{&&&&]^    ",
+"    /({&&&&_:<[   ",
+"    }|&&&&&123    ",
+"   456&&&&7890    ",
+"   abcdef*=gh-    ",
+"  -ijklmno)pq     ",
+"  -rjstuuvwx-     ",
+"   y-zABCDEF      ",
+"       GHIJ       ",
+"          -       ",
+"                  ",
+"                  "};
--- a/src/buddy.c	Thu Aug 17 17:06:45 2000 +0000
+++ b/src/buddy.c	Thu Aug 17 23:23:24 2000 +0000
@@ -65,6 +65,8 @@
 #include "pixmaps/daemon-permadd.xpm"
 #include "pixmaps/daemon-permdel.xpm"
 
+#include "pixmaps/add_small.xpm"
+
 static GtkTooltips *tips;
 static GtkWidget *editpane;
 static GtkWidget *buddypane;
@@ -1708,6 +1710,49 @@
 	return menuitem;
 }
 
+GtkWidget *gaim_new_item_with_pixmap(GtkWidget *menu, const char *str, char **xpm, GtkSignalFunc sf)
+{
+	GtkWidget *menuitem;
+	GtkWidget *hbox;
+	GtkWidget *label;
+	GtkWidget *pixmap;
+	GdkPixmap *pm;
+	GdkBitmap *mask;
+
+	menuitem = gtk_menu_item_new();
+	gtk_widget_show(menuitem);
+
+	/* Create our container */
+	hbox = gtk_hbox_new(FALSE, 5);
+
+	/* Create our label and pack it */
+	label = gtk_label_new(str);
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+
+
+	/* Create our pixmap and pack it */
+	pm = gdk_pixmap_create_from_xpm_d(menu->parent->window, &mask, NULL, xpm);
+
+	pixmap = gtk_pixmap_new(pm, mask);
+	gtk_widget_show(pixmap);
+
+	gtk_box_pack_end(GTK_BOX(hbox), pixmap, FALSE, FALSE, 5);
+
+	
+	/* And finally, pack our box within our menu item */
+
+	gtk_container_add(GTK_CONTAINER(menuitem), hbox);
+	gtk_widget_show(hbox);
+	
+        if (menu)
+		gtk_menu_append(GTK_MENU(menu), menuitem);
+
+	if (sf)
+		gtk_signal_connect(GTK_OBJECT(menuitem), "activate", sf, NULL);
+	return menuitem;
+}
+
 
 
 void build_imchat_box(gboolean on)
@@ -1797,7 +1842,8 @@
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu);
 	gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem);
 
-	gaim_new_item(menu, _("Add A Buddy"), GTK_SIGNAL_FUNC(add_buddy_callback));
+	// gaim_new_item(menu, _("Add A Buddy"), GTK_SIGNAL_FUNC(add_buddy_callback));
+	gaim_new_item_with_pixmap(menu, _("Add A Buddy"), add_small_xpm, GTK_SIGNAL_FUNC(add_buddy_callback));
 	gaim_new_item(menu, _("Join A Chat"), GTK_SIGNAL_FUNC(chat_callback));
         gaim_seperator(menu);
         gaim_new_item(menu, _("Import Buddy List"), GTK_SIGNAL_FUNC(import_callback));