changeset 584:56f7cb624e9e

[gaim-migrate @ 594] removed some unused variables, and added a pretty icon the pref dialog's 'close' button committer: Tailor Script <tailor@pidgin.im>
author Todd Kulesza <fflewddur>
date Wed, 02 Aug 2000 14:23:01 +0000
parents ecb5371e3e24
children 294d7192b38b
files src/dialogs.c src/prefs.c
diffstat 2 files changed, 33 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Wed Aug 02 05:44:09 2000 +0000
+++ b/src/dialogs.c	Wed Aug 02 14:23:01 2000 +0000
@@ -3605,11 +3605,7 @@
 void show_smiley_dialog(struct conversation *c, GtkWidget *widget)
 {
 	GtkWidget *dialog;
-	GtkWidget *cancel_button, *cancel_label;
-	GtkWidget *vbox, *smiley_box_1, *smiley_box_2, *smiley_box_3, *smiley_box_4, *cancel_button_box;
-	GdkPixmap *cancel_i;
-	GtkWidget *cancel_p;
-	GdkBitmap *mask;
+	GtkWidget *vbox, *smiley_box_1, *smiley_box_2, *smiley_box_3, *smiley_box_4;
 	GtkWidget *win;
 	GtkWidget *bbox;
 
@@ -3663,13 +3659,10 @@
 	gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
 
 	/* show everything */
-	if (display_options & OPT_DISP_COOL_LOOK)
-		gtk_button_set_relief(GTK_BUTTON(cancel_button), GTK_RELIEF_NONE);
-		
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Smile!"));
+	gtk_widget_show_all(dialog);
 
 	c->smiley_dialog = dialog;
-	gtk_widget_show_all(dialog);
-	
+		
 	return;
 }
--- a/src/prefs.c	Wed Aug 02 05:44:09 2000 +0000
+++ b/src/prefs.c	Wed Aug 02 14:23:01 2000 +0000
@@ -35,6 +35,7 @@
 #include "gaim.h"
 #include "proxy.h"
 #include "gnome_applet_mgr.h"
+#include "pixmaps/close.xpm"
 
 struct prefs_data *pd = NULL;
 struct debug_window *dw = NULL;
@@ -343,6 +344,9 @@
 	GtkWidget *away_page;
 	GtkWidget *select_font;
 	GtkWidget *font_face_for_text;
+	GtkWidget *button_box, *icon_i, *close_label;
+	GdkBitmap *mask;
+	GdkPixmap *icon;
 	
 	GtkWidget *list_item;
 
@@ -813,10 +817,34 @@
 	gtk_widget_show(chat_page);
 	
 	bbox = gtk_hbox_new(FALSE, 5);
-	close = gtk_button_new_with_label(_("Close"));
+
+	/* Build close button */
+
+	close = gtk_button_new();
+
+	button_box = gtk_hbox_new(FALSE, 5);
+	icon = gdk_pixmap_create_from_xpm_d ( pd->window->window, &mask, NULL, close_xpm);
+
+	icon_i = gtk_pixmap_new(icon, mask);
+	
+	close_label = gtk_label_new(_("Close"));
+
+	gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
+	gtk_box_pack_end(GTK_BOX(button_box), close_label, FALSE, FALSE, 2);
+
+	gtk_widget_show(close_label);
+	gtk_widget_show(icon_i);
+
+	gtk_widget_show(button_box);
+
+	gtk_container_add(GTK_CONTAINER(close), button_box);
+	
+	/* End of close button */
+
+
 	if (display_options & OPT_DISP_COOL_LOOK)
 		gtk_button_set_relief(GTK_BUTTON(close), GTK_RELIEF_NONE);
-	
+			
 	/* Pack the button(s) in the button box */
 	gtk_box_pack_end(GTK_BOX(bbox), close, FALSE, FALSE, 5);
 	gtk_box_pack_start(GTK_BOX(vbox),bbox, FALSE, FALSE, 5);