aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-05-26 05:20:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-26 05:20:47 +0800
commit918e4a2d3a71f458e6dad275d0e046cbe90a67d6 (patch)
treea24cc503a06945e6f96258f11cd5a17744f00a5e
parentebb89b17ef6820efce8134cd0dacf9ea03f1b6f5 (diff)
downloadgsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar.gz
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar.bz2
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar.lz
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar.xz
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.tar.zst
gsoc2013-evolution-918e4a2d3a71f458e6dad275d0e046cbe90a67d6.zip
Use gtk_window_set_icon_list() here instead of gtk_window_set_icon().
2004-05-25 Jeffrey Stedfast <fejj@novell.com> * gui/dialogs/url-editor-dialog.c (init_widgets): Use gtk_window_set_icon_list() here instead of gtk_window_set_icon(). * gui/dialogs/select-source-dialog.c (select_source_dialog): Use gtk_window_set_icon_list() here instead of gtk_window_set_icon(). * gui/dialogs/calendar-setup.c (source_to_dialog): Huh?? Why are integer colours in an array of char*? Fixed to be an array of guint32. * gui/dialogs/changed-comp.c (changed_component_dialog): Use gtk_window_set_icon_list() here instead of gtk_window_set_icon(). * gui/dialogs/calendar-setup.c (calendar_setup_new_calendar): Don't bother calling tk_window_set_icon() if we are gonna call gtk_window_set_icon_list a few lines later. (calendar_setup_edit_calendar): Same. instead. (calendar_setup_new_task_list): Same. (calendar_setup_edit_task_list): Same. * gui/dialogs/alarm-options.c (alarm_options_dialog_run): Use gtk_window_set_icon_list() instead of gtk_window_set_icon() so gtk can do the Right Thing (tm). svn path=/trunk/; revision=26086
-rw-r--r--calendar/ChangeLog27
-rw-r--r--calendar/gui/dialogs/alarm-options.c12
-rw-r--r--calendar/gui/dialogs/calendar-setup.c36
-rw-r--r--calendar/gui/dialogs/changed-comp.c14
-rw-r--r--calendar/gui/dialogs/delete-error.c14
-rw-r--r--calendar/gui/dialogs/select-source-dialog.c13
-rw-r--r--calendar/gui/dialogs/url-editor-dialog.c12
7 files changed, 98 insertions, 30 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f4fe0fec20..2e95abd666 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,32 @@
2004-05-25 Jeffrey Stedfast <fejj@novell.com>
+ * gui/dialogs/url-editor-dialog.c (init_widgets): Use
+ gtk_window_set_icon_list() here instead of gtk_window_set_icon().
+
+ * gui/dialogs/select-source-dialog.c (select_source_dialog): Use
+ gtk_window_set_icon_list() here instead of gtk_window_set_icon().
+
+ * gui/dialogs/calendar-setup.c (source_to_dialog): Huh?? Why are
+ integer colours in an array of char*? Fixed to be an array of
+ guint32.
+
+ * gui/dialogs/changed-comp.c (changed_component_dialog): Use
+ gtk_window_set_icon_list() here instead of gtk_window_set_icon().
+
+ * gui/dialogs/calendar-setup.c (calendar_setup_new_calendar):
+ Don't bother calling tk_window_set_icon() if we are gonna call
+ gtk_window_set_icon_list a few lines later.
+ (calendar_setup_edit_calendar): Same.
+ instead.
+ (calendar_setup_new_task_list): Same.
+ (calendar_setup_edit_task_list): Same.
+
+ * gui/dialogs/alarm-options.c (alarm_options_dialog_run): Use
+ gtk_window_set_icon_list() instead of gtk_window_set_icon() so gtk
+ can do the Right Thing (tm).
+
+2004-05-25 Jeffrey Stedfast <fejj@novell.com>
+
* Makefile.am: Make calendar-errors.xml.h and install the xml
file.
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
index 106cc019bf..7022325ae3 100644
--- a/calendar/gui/dialogs/alarm-options.c
+++ b/calendar/gui/dialogs/alarm-options.c
@@ -774,7 +774,8 @@ alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean
{
Dialog dialog;
int response_id;
-
+ GList *icon_list;
+
g_return_val_if_fail (alarm != NULL, FALSE);
dialog.repeat = repeat;
@@ -798,8 +799,13 @@ alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean
init_widgets (&dialog);
alarm_to_dialog (&dialog, alarm);
-
- gtk_window_set_icon (GTK_WINDOW (dialog.toplevel), e_icon_factory_get_icon ("stock_calendar", 32));
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog.toplevel), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
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 5d9b5fb6c5..2f35688bd5 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -533,7 +533,7 @@ source_to_dialog (SourceDialog *source_dialog)
g_signal_handlers_unblock_matched (source_dialog->refresh_spin, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, source_dialog);
if (source_dialog->source_color) {
- static char *assigned_colors[] = {
+ static guint32 assigned_colors[] = {
0xBECEDD, /* 190 206 221 Blue */
0xE2F0EF, /* 226 240 239 Light Blue */
0xC6E2B7, /* 198 226 183 Green */
@@ -739,9 +739,7 @@ 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) {
gtk_window_set_icon_list (GTK_WINDOW (source_dialog->window), icon_list);
@@ -770,7 +768,8 @@ gboolean
calendar_setup_edit_calendar (GtkWindow *parent, ESource *source)
{
SourceDialog *source_dialog = g_new0 (SourceDialog, 1);
-
+ GList *icon_list;
+
g_return_val_if_fail (source != NULL, FALSE);
source_dialog->gui_xml = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, "calendar-editor-window", NULL);
@@ -813,9 +812,14 @@ 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));
-
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (source_dialog->window), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
gtk_widget_show_all (source_dialog->window);
if (!source_is_remote (source_dialog->source))
@@ -911,8 +915,6 @@ 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) {
@@ -942,7 +944,8 @@ gboolean
calendar_setup_edit_task_list (GtkWindow *parent, ESource *source)
{
SourceDialog *source_dialog = g_new0 (SourceDialog, 1);
-
+ GList *icon_list;
+
g_return_val_if_fail (source != NULL, FALSE);
source_dialog->gui_xml = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, "task-list-editor-window", NULL);
@@ -985,9 +988,14 @@ 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));
-
+
+ icon_list = e_icon_factory_get_icon_list ("stock_task");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (source_dialog->window), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
gtk_widget_show_all (source_dialog->window);
if (!source_is_remote (source_dialog->source))
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index 512c52aba3..a76b123b36 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -50,7 +50,8 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet
ECalComponentVType vtype;
char *str;
gint response;
-
+ GList *icon_list;
+
vtype = e_cal_component_get_vtype (comp);
if (deleted) {
@@ -105,9 +106,14 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet
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));
-
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index b97876408b..5932abeab8 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -40,9 +40,10 @@
void
delete_error_dialog (GError *error, ECalComponentVType vtype)
{
+ GList *icon_list = NULL;
GtkWidget *dialog;
const char *str;
-
+
if (!error)
return;
@@ -106,9 +107,16 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
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));
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
else if (vtype == E_CAL_COMPONENT_TODO)
- gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon ("stock_todo", 32));
+ icon_list = e_icon_factory_get_icon_list ("stock_todo");
+
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index 5687b4565d..0b8f93e7e4 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -55,6 +55,7 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type)
const char *gconf_key;
char *label_text;
GConfClient *conf_client;
+ GList *icon_list = NULL;
if (obj_type == E_CAL_SOURCE_TYPE_EVENT)
gconf_key = "/apps/evolution/calendar/sources";
@@ -125,10 +126,16 @@ 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));
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
else if (obj_type == E_CAL_SOURCE_TYPE_TODO)
- gtk_window_set_icon (GTK_WINDOW (dialog), e_icon_factory_get_icon("stock_todo", 32));
-
+ icon_list = e_icon_factory_get_icon_list ("stock_todo");
+
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) {
if (selected_source)
g_object_unref (selected_source);
diff --git a/calendar/gui/dialogs/url-editor-dialog.c b/calendar/gui/dialogs/url-editor-dialog.c
index 0dacd3ebe9..f937170f95 100644
--- a/calendar/gui/dialogs/url-editor-dialog.c
+++ b/calendar/gui/dialogs/url-editor-dialog.c
@@ -218,6 +218,7 @@ init_widgets (UrlDialogData *url_dlg_data)
GtkWidget *selector;
ESourceList *source_list;
GConfClient *gconf_client;
+ GList *icon_list;
GSList *p;
g_signal_connect (url_dlg_data->url_entry, "changed",
@@ -286,9 +287,14 @@ 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));
-
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (url_dlg_data->url_dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
gtk_widget_show (url_dlg_data->scrolled_window);
}