From f0374055952ee8530779273c56cdaf904e4624a6 Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Tue, 25 May 2004 09:09:33 +0000 Subject: Fixes: #57472 2004-05-25 Trent Lloyd 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 svn path=/trunk/; revision=26073 --- calendar/gui/dialogs/alarm-options.c | 3 +++ calendar/gui/dialogs/calendar-setup.c | 9 +++++++++ calendar/gui/dialogs/cancel-comp.c | 3 +++ calendar/gui/dialogs/changed-comp.c | 3 +++ calendar/gui/dialogs/delete-comp.c | 6 ++++++ calendar/gui/dialogs/delete-error.c | 5 +++++ calendar/gui/dialogs/save-comp.c | 2 ++ calendar/gui/dialogs/select-source-dialog.c | 8 ++++++++ calendar/gui/dialogs/send-comp.c | 5 +++++ calendar/gui/dialogs/url-editor-dialog.c | 3 +++ 10 files changed, 47 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c index 767a66dc67..106cc019bf 100644 --- a/calendar/gui/dialogs/alarm-options.c +++ b/calendar/gui/dialogs/alarm-options.c @@ -42,6 +42,7 @@ #include #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_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean 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); diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 1c3d20ebb3..5d9b5fb6c5 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "calendar-setup.h" #define GLADE_FILE_NAME "calendar-setup.glade" @@ -738,6 +739,8 @@ calendar_setup_new_calendar (GtkWindow *parent) 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)); icon_list = e_icon_factory_get_icon_list ("stock_calendar"); if (icon_list) { @@ -810,6 +813,8 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source) 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); @@ -906,6 +911,8 @@ calendar_setup_new_task_list (GtkWindow *parent) 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)); icon_list = e_icon_factory_get_icon_list ("stock_task"); if (icon_list) { @@ -978,6 +985,8 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source) 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); diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c index 27f9b9b91e..3b72e5b31e 100644 --- a/calendar/gui/dialogs/cancel-comp.c +++ b/calendar/gui/dialogs/cancel-comp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "cancel-comp.h" @@ -89,6 +90,8 @@ cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, g 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); diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c index af595fe1df..512c52aba3 100644 --- a/calendar/gui/dialogs/changed-comp.c +++ b/calendar/gui/dialogs/changed-comp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "changed-comp.h" @@ -105,6 +106,8 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet 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); diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 1c81598021..33e755193c 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "../calendar-config.h" #include "delete-comp.h" @@ -61,6 +62,7 @@ delete_component_dialog (ECalComponent *comp, { char *str; GtkWidget *dialog; + const char *stock_icon; int ret; if (comp) { @@ -91,6 +93,7 @@ delete_component_dialog (ECalComponent *comp, switch (vtype) { case E_CAL_COMPONENT_EVENT: + stock_icon = "stock_calendar"; if (tmp) str = g_strdup_printf (_("Are you sure you want to delete " "the appointment `%s'?"), tmp); @@ -100,6 +103,7 @@ delete_component_dialog (ECalComponent *comp, break; case E_CAL_COMPONENT_TODO: + stock_icon = "stock_todo"; if (tmp) str = g_strdup_printf (_("Are you sure you want to delete " "the task `%s'?"), tmp); @@ -109,6 +113,7 @@ delete_component_dialog (ECalComponent *comp, break; case E_CAL_COMPONENT_JOURNAL: + stock_icon = "stock_calendar"; if (tmp) str = g_strdup_printf (_("Are you sure you want to delete " "the journal entry `%s'?"), tmp); @@ -158,6 +163,7 @@ delete_component_dialog (ECalComponent *comp, 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_icon, 32)); g_free (str); ret = gtk_dialog_run ((GtkDialog *) dialog) == GTK_RESPONSE_OK; gtk_widget_destroy (dialog); diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c index cb076885c1..b97876408b 100644 --- a/calendar/gui/dialogs/delete-error.c +++ b/calendar/gui/dialogs/delete-error.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "delete-error.h" @@ -104,6 +105,10 @@ delete_error_dialog (GError *error, ECalComponentVType vtype) dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, str); + if (vtype == E_CAL_COMPONENT_EVENT) + gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32)); + else if (vtype == E_CAL_COMPONENT_TODO) + gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_todo", 32)); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c index 8041395fb1..e0e8ebb0be 100644 --- a/calendar/gui/dialogs/save-comp.c +++ b/calendar/gui/dialogs/save-comp.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "save-comp.h" @@ -59,6 +60,7 @@ save_component_dialog (GtkWindow *parent) 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); diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c index e9cbe3e631..5687b4565d 100644 --- a/calendar/gui/dialogs/select-source-dialog.c +++ b/calendar/gui/dialogs/select-source-dialog.c @@ -20,10 +20,13 @@ #include #include +#include +#include #include #include #include #include +#include #include "widgets/misc/e-source-selector.h" #include "select-source-dialog.h" @@ -121,6 +124,11 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type) 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); diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 65e4743c04..64343f113e 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "send-comp.h" @@ -82,6 +83,10 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, str); + if (vtype == E_CAL_COMPONENT_EVENT) + gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_calendar", 32)); + else if (vtype == E_CAL_COMPONENT_TODO) + gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_todo", 32)); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); diff --git a/calendar/gui/dialogs/url-editor-dialog.c b/calendar/gui/dialogs/url-editor-dialog.c index 5b87c58289..0dacd3ebe9 100644 --- a/calendar/gui/dialogs/url-editor-dialog.c +++ b/calendar/gui/dialogs/url-editor-dialog.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -285,6 +286,8 @@ init_widgets (UrlDialogData *url_dlg_data) 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); } -- cgit