changeset 3869:061ed70be441

[gaim-migrate @ 4021] Maybe we need some better icons to go down there? committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 03 Nov 2002 07:53:00 +0000
parents b7d5c2a2b0d9
children d1090f45cd36
files src/buddy.c
diffstat 1 files changed, 25 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Sun Nov 03 07:38:51 2002 +0000
+++ b/src/buddy.c	Sun Nov 03 07:53:00 2002 +0000
@@ -51,7 +51,6 @@
 #include "win32dep.h"
 #endif
 
-#include "pixmaps/tb_search.xpm"
 #include "pixmaps/login_icon.xpm"
 #include "pixmaps/logout_icon.xpm"
 #include "pixmaps/no_icon.xpm"
@@ -76,9 +75,7 @@
 #include "pixmaps/pounce_small.xpm"
 #include "pixmaps/about_small.xpm"
 
-#include "pixmaps/tmp_send.xpm"
 #include "pixmaps/send_small.xpm"
-#include "pixmaps/join.xpm"
 #include "pixmaps/gnome_add.xpm"
 #include "pixmaps/gnome_remove.xpm"
 #include "pixmaps/group.xpm"
@@ -376,6 +373,28 @@
 
 }
 
+/* This will remain here until we phase out the others */
+static void adjust_pic2(GtkWidget *button, const char *c, gchar *icon)
+{
+	GtkWidget *pic;
+	GtkWidget *label;
+
+	/*if the user had opted to put pictures on the buttons */
+	if (blist_options & OPT_BLIST_SHOW_BUTTON_XPM && icon) {
+		label = GTK_BIN(button)->child;
+		gtk_container_remove(GTK_CONTAINER(button), label);
+		gtk_container_add(GTK_CONTAINER(button), gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON));
+		gtk_widget_show_all(button);
+	} else {
+		label = gtk_label_new(c);
+		gtk_widget_show(label);
+		pic = GTK_BIN(button)->child;
+		gtk_container_remove(GTK_CONTAINER(button), pic);
+		gtk_container_add(GTK_CONTAINER(button), label);
+	}
+
+}
+
 
 void toggle_show_empty_groups()
 {
@@ -499,9 +518,9 @@
 
 	if (!(blist_options & OPT_BLIST_NO_BUTTONS)) {
 		adjust_pic(awaybutton, _("Away"), (gchar **)away_big_xpm);
-		adjust_pic(chatbutton, _("Chat"), (gchar **)join_xpm);
-		adjust_pic(imbutton, _("IM"), (gchar **)tmp_send_xpm);
-		adjust_pic(infobutton, _("Info"), (gchar **)tb_search_xpm);
+		adjust_pic2(chatbutton, _("Chat"), GTK_STOCK_JUMP_TO);
+		adjust_pic2(imbutton, _("IM"), GTK_STOCK_CONVERT);
+		adjust_pic2(infobutton, _("Info"), GTK_STOCK_FIND);
 	}
 	gtk_widget_hide(addbutton->parent);
 	gtk_widget_show(addbutton->parent);