[evolution-patches] calendar/gui/dialogs: Use the right icons on windows (Fixes: #57472)



Hi Guys,

This patch for calendar fixes the following bug

#57472 - Calendar Properties Dialog: wrong icons (envelope) in the
(window list)

It also fixes the ones on Tasks dialogs.

I think I've got all of them, let me know if I missed anyway.

Also, there might be a better way to do this, like somehow grabbing the
parent icon of evolution at the time or something, but this seems sane
at least.

Cheers,
Trent

-- 
Trent Lloyd <lathiat bur st>
Bur.st Networking Inc.
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2308
diff -u -r1.2308 ChangeLog
--- a/calendar/ChangeLog	7 May 2004 04:35:36 -0000	1.2308
+++ b/calendar/ChangeLog	7 May 2004 16:10:54 -0000
@@ -1,3 +1,20 @@
+2004-05-06  Trent Lloyd  <lathiat bur st>
+
+	Fixes: #57472
+
+	* gui/dialogs/alarm-options.c:
+	* gui/dialogs/calendar-setup.c:
+	* gui/dialogs/cancel-comp.c:
+	* gui/dialogs/changed-comp.c:
+	* gui/dialogs/delete-comp.c:
+	* gui/dialogs/delete-error.c:
+	* gui/dialogs/save-comp.c:
+	* gui/dialogs/select-source-dialog.c:
+	* gui/dialogs/send-comp.c
+	* gui/dialogs/url-editor-dialog.c:
+	- Add include of e-icon-factory.h
+	- Set icon on window to be calendar/tasks icon rather than mail icon 
+
 2004-05-06  Larry Ewing  <lewing ximian com>
 
 	* gui/dialogs/calendar-setup.c (source_to_dialog): use random
Index: calendar/gui/dialogs/alarm-options.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/alarm-options.c,v
retrieving revision 1.24
diff -u -r1.24 alarm-options.c
--- a/calendar/gui/dialogs/alarm-options.c	9 Apr 2004 17:30:39 -0000	1.24
+++ b/calendar/gui/dialogs/alarm-options.c	7 May 2004 16:10:58 -0000
@@ -42,6 +42,7 @@
 #include <addressbook/util/e-destination.h>
 #include "Evolution-Addressbook-SelectNames.h"
 #include "e-util/e-dialog-widgets.h"
+#include "e-util/e-icon-factory.h"
 #include "alarm-options.h"
 
 
@@ -798,6 +799,8 @@
 
 	alarm_to_dialog (&dialog, alarm);
 
+	gtk_window_set_icon (GTK_WINDOW (dialog.toplevel), e_icon_factory_get_icon ("stock_calendar", 32));
+
 	response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
 	gtk_widget_hide (dialog.toplevel);
 
Index: calendar/gui/dialogs/calendar-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.c,v
retrieving revision 1.19
diff -u -r1.19 calendar-setup.c
--- a/calendar/gui/dialogs/calendar-setup.c	7 May 2004 04:35:36 -0000	1.19
+++ b/calendar/gui/dialogs/calendar-setup.c	7 May 2004 16:11:02 -0000
@@ -39,6 +39,7 @@
 #include <libecal/e-cal.h>
 #include <e-util/e-dialog-utils.h>
 #include <e-util/e-url.h>
+#include <e-util/e-icon-factory.h>
 #include "calendar-setup.h"
 
 #define GLADE_FILE_NAME "calendar-setup.glade"
@@ -749,6 +750,8 @@
 
 	gtk_window_set_type_hint (GTK_WINDOW (source_dialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_window_set_modal (GTK_WINDOW (source_dialog->window), TRUE);
+	gtk_window_set_icon (GTK_WINDOW (source_dialog->window),
+				  e_icon_factory_get_icon("stock_calendar", 32));
 
 	gtk_widget_show_all (source_dialog->window);
 	return TRUE;
@@ -814,6 +817,8 @@
 
 	gtk_window_set_type_hint (GTK_WINDOW (source_dialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_window_set_modal (GTK_WINDOW (source_dialog->window), TRUE);
+	gtk_window_set_icon (GTK_WINDOW (source_dialog->window),
+				  e_icon_factory_get_icon ("stock_calendar", 32));
 
 	gtk_widget_show_all (source_dialog->window);
 
@@ -912,6 +917,8 @@
 
 	gtk_window_set_type_hint (GTK_WINDOW (source_dialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_window_set_modal (GTK_WINDOW (source_dialog->window), TRUE);
+	gtk_window_set_icon (GTK_WINDOW (source_dialog->window),
+				  e_icon_factory_get_icon ("stock_todo", 32));
 
 	gtk_widget_show_all (source_dialog->window);
 	return TRUE;
@@ -977,6 +984,8 @@
 
 	gtk_window_set_type_hint (GTK_WINDOW (source_dialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_window_set_modal (GTK_WINDOW (source_dialog->window), TRUE);
+	gtk_window_set_icon (GTK_WINDOW (source_dialog->window),
+				  e_icon_factory_get_icon("stock_todo", 32));
 
 	gtk_widget_show_all (source_dialog->window);
 
Index: calendar/gui/dialogs/cancel-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cancel-comp.c,v
retrieving revision 1.11
diff -u -r1.11 cancel-comp.c
--- a/calendar/gui/dialogs/cancel-comp.c	12 Jan 2004 21:19:09 -0000	1.11
+++ b/calendar/gui/dialogs/cancel-comp.c	7 May 2004 16:11:03 -0000
@@ -26,6 +26,7 @@
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomeui/gnome-uidefs.h>
+#include <e-util/e-icon-factory.h>
 #include "cancel-comp.h"
 
 
@@ -89,6 +90,8 @@
 					 GTK_MESSAGE_QUESTION,
 					 GTK_BUTTONS_YES_NO, str);
 
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_calendar", 32));
+
 	response = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 
Index: calendar/gui/dialogs/changed-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/changed-comp.c,v
retrieving revision 1.8
diff -u -r1.8 changed-comp.c
--- a/calendar/gui/dialogs/changed-comp.c	12 Jan 2004 21:19:09 -0000	1.8
+++ b/calendar/gui/dialogs/changed-comp.c	7 May 2004 16:11:03 -0000
@@ -26,6 +26,7 @@
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomeui/gnome-uidefs.h>
+#include <e-util/e-icon-factory.h>
 #include "changed-comp.h"
 
 
@@ -105,6 +106,8 @@
 					 GTK_MESSAGE_QUESTION,
 					 GTK_BUTTONS_YES_NO, str);
 
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32));
+
 	response = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 
Index: calendar/gui/dialogs/delete-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/delete-comp.c,v
retrieving revision 1.23
diff -u -r1.23 delete-comp.c
--- a/calendar/gui/dialogs/delete-comp.c	24 Mar 2004 00:17:59 -0000	1.23
+++ b/calendar/gui/dialogs/delete-comp.c	7 May 2004 16:11:04 -0000
@@ -26,6 +26,7 @@
 #include <gtk/gtkstock.h>
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
+#include <e-util/e-icon-factory.h>
 #include "../calendar-config.h"
 #include "delete-comp.h"
 
@@ -158,6 +159,8 @@
 	dialog = gtk_message_dialog_new ((GtkWindow *)gtk_widget_get_toplevel (widget),
 					 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", str);
 	gtk_dialog_add_buttons ((GtkDialog *) dialog, GTK_STOCK_NO, GTK_RESPONSE_CANCEL, GTK_STOCK_YES, GTK_RESPONSE_OK, NULL);
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32));
+
 	g_free (str);
 	ret = gtk_dialog_run ((GtkDialog *) dialog) == GTK_RESPONSE_OK;
 	gtk_widget_destroy (dialog);
Index: calendar/gui/dialogs/delete-error.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/delete-error.c,v
retrieving revision 1.6
diff -u -r1.6 delete-error.c
--- a/calendar/gui/dialogs/delete-error.c	12 Jan 2004 21:19:09 -0000	1.6
+++ b/calendar/gui/dialogs/delete-error.c	7 May 2004 16:11:05 -0000
@@ -26,6 +26,7 @@
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomeui/gnome-uidefs.h>
+#include <e-util/e-icon-factory.h>
 #include "delete-error.h"
 
 
@@ -104,6 +105,9 @@
 	dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
 					 GTK_MESSAGE_ERROR,
 					 GTK_BUTTONS_OK, str);
+
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32));
+	
 	gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 }
Index: calendar/gui/dialogs/save-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/save-comp.c,v
retrieving revision 1.12
diff -u -r1.12 save-comp.c
--- a/calendar/gui/dialogs/save-comp.c	12 Jan 2004 21:19:09 -0000	1.12
+++ b/calendar/gui/dialogs/save-comp.c	7 May 2004 16:11:06 -0000
@@ -27,6 +27,7 @@
 #include <libgnome/gnome-i18n.h>
 #include <gtk/gtkmessagedialog.h>
 #include <gtk/gtkstock.h>
+#include <e-util/e-icon-factory.h>
 #include "save-comp.h"
 
 
@@ -59,6 +60,7 @@
 				GTK_STOCK_SAVE, GTK_RESPONSE_YES,
 				NULL);
 
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_calendar", 32));
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Save Event"));
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 
Index: calendar/gui/dialogs/select-source-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/select-source-dialog.c,v
retrieving revision 1.4
diff -u -r1.4 select-source-dialog.c
--- a/calendar/gui/dialogs/select-source-dialog.c	3 May 2004 22:02:16 -0000	1.4
+++ b/calendar/gui/dialogs/select-source-dialog.c	7 May 2004 16:11:07 -0000
@@ -20,10 +20,13 @@
 
 #include <bonobo/bonobo-i18n.h>
 #include <gtk/gtkbox.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkhbox.h>
 #include <gtk/gtkdialog.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkstock.h>
+#include <e-util/e-icon-factory.h>
 #include "widgets/misc/e-source-selector.h"
 #include "select-source-dialog.h"
 
@@ -121,6 +124,11 @@
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), source_selector);
 
+	if (obj_type == E_CAL_SOURCE_TYPE_EVENT)
+		gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_calendar", 32));
+	else if (obj_type == E_CAL_SOURCE_TYPE_TODO)
+		gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_todo", 32));
+
 	if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) {
 		if (selected_source)
 			g_object_unref (selected_source);
Index: calendar/gui/dialogs/send-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/send-comp.c,v
retrieving revision 1.12
diff -u -r1.12 send-comp.c
--- a/calendar/gui/dialogs/send-comp.c	12 Jan 2004 21:19:09 -0000	1.12
+++ b/calendar/gui/dialogs/send-comp.c	7 May 2004 16:11:07 -0000
@@ -26,6 +26,7 @@
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomeui/gnome-uidefs.h>
+#include <e-util/e-icon-factory.h>
 #include "send-comp.h"
 
 
@@ -82,7 +83,9 @@
 	dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
 					 GTK_MESSAGE_QUESTION,
 					 GTK_BUTTONS_YES_NO, str);
-
+	
+	gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32));
+	
 	response = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 
Index: calendar/gui/dialogs/url-editor-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/url-editor-dialog.c,v
retrieving revision 1.2
diff -u -r1.2 url-editor-dialog.c
--- a/calendar/gui/dialogs/url-editor-dialog.c	10 Apr 2004 21:31:37 -0000	1.2
+++ b/calendar/gui/dialogs/url-editor-dialog.c	7 May 2004 16:11:09 -0000
@@ -285,7 +285,9 @@
 					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (url_dlg_data->scrolled_window),
 					     GTK_SHADOW_IN);
-
+	gtk_window_set_icon (GTK_WINDOW (url_dlg_data->url_dialog),
+			  e_icon_factory_get_icon("stock_calendar", 32));
+	
 	gtk_widget_show (url_dlg_data->scrolled_window);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]