aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog23
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.server.in.in6
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c18
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c19
-rw-r--r--calendar/gui/calendar-commands.c10
-rw-r--r--calendar/gui/calendar-component.c28
-rw-r--r--calendar/gui/dialogs/comp-editor.c41
-rw-r--r--calendar/gui/dialogs/event-editor.c2
-rw-r--r--calendar/gui/e-calendar-table.c24
-rw-r--r--calendar/gui/e-calendar-view.c35
-rw-r--r--calendar/gui/e-day-view-main-item.c37
-rw-r--r--calendar/gui/e-day-view-top-item.c18
-rw-r--r--calendar/gui/e-day-view.c25
-rw-r--r--calendar/gui/e-day-view.h12
-rw-r--r--calendar/gui/e-itip-control.c24
-rw-r--r--calendar/gui/e-timezone-entry.c22
-rw-r--r--calendar/gui/e-week-view-event-item.c27
-rw-r--r--calendar/gui/e-week-view.c18
-rw-r--r--calendar/gui/e-week-view.h9
-rw-r--r--calendar/gui/tasks-component.c25
20 files changed, 235 insertions, 188 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e281860c8d..894c08c583 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,26 @@
+2004-04-19 Michael Terry <mike@mterry.name>
+
+ * gui/GNOME_Evolution_Calendar.server.in.in:
+ * gui/calendar-commands.c:
+ * gui/calendar-component.c:
+ * gui/e-calendar-table.c:
+ * gui/e-calendar-view.c:
+ * gui/e-day-view-main-item.c:
+ * gui/e-day-view-top-item.c:
+ * gui/e-day-view.c:
+ * gui/e-day-view.h:
+ * gui/e-itip-control.c:
+ * gui/e-timezone-entry.c:
+ * gui/e-week-view-event-item.c:
+ * gui/e-week-view.c:
+ * gui/e-week-view.h:
+ * gui/tasks-component.c:
+ * gui/alarm-notify/alarm-notify-dialog.c:
+ * gui/alarm-notify/alarm-queue.c:
+ * gui/dialogs/comp-editor.c:
+ * gui/dialogs/event-editor.c: Update the calendar to use the icon theme
+ through the EIconFactory object in e-util
+
2004-04-19 JP Rosevear <jpr@ximian.com>
* gui/gnome-cal.c (set_view): take a range_selected boolean for
diff --git a/calendar/gui/GNOME_Evolution_Calendar.server.in.in b/calendar/gui/GNOME_Evolution_Calendar.server.in.in
index cee3a6a103..437751b21f 100644
--- a/calendar/gui/GNOME_Evolution_Calendar.server.in.in
+++ b/calendar/gui/GNOME_Evolution_Calendar.server.in.in
@@ -44,7 +44,7 @@
<oaf_attribute name="name" type="string" _value="Evolution's Calendar component"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Calendars"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-calendar.png"/>
+ <oaf_attribute name="evolution:button_icon" type="string" value="stock_calendar"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
@@ -79,7 +79,7 @@
<oaf_attribute name="name" type="string" _value="Evolution's Tasks component"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-tasks.png"/>
+ <oaf_attribute name="evolution:button_icon" type="string" value="stock_todo"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
@@ -129,7 +129,7 @@
_value="Configure your timezone, Calendar and Task List here "/>
<oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="evolution-calendar.png"/>
+ value="stock_calendar-and-tasks"/>
<oaf_attribute name="evolution2:config_item:type" type="stringv">
<item value="calendar"/>
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index c315781e6f..da523e72f3 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -31,7 +31,6 @@
#if 0
# include <libgnomeui/gnome-winhints.h>
#endif
-#include <libgnomeui/gnome-window-icon.h>
#include <glade/glade.h>
#include <e-util/e-time-utils.h>
#include <gtkhtml/gtkhtml.h>
@@ -40,6 +39,7 @@
#include "alarm-notify-dialog.h"
#include "config-data.h"
#include "util.h"
+#include <e-util/e-icon-factory.h>
GtkWidget *make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shadow);
@@ -223,9 +223,14 @@ write_html_heading (GtkHTMLStream *stream, const char *message,
char *buf;
char *start, *end;
char *bg_path = "file://" EVOLUTION_IMAGESDIR "/bcg.png";
- char *image_path = "file://" EVOLUTION_IMAGESDIR "/alarm.png";
+ gchar *image_path;
+ gchar *icon_path;
icaltimezone *current_zone;
+ icon_path = e_icon_factory_get_icon_filename ("stock_alarm", 48);
+ image_path = g_strdup_printf ("file://%s", icon_path);
+ g_free (icon_path);
+
/* Stringize the times */
current_zone = config_data_get_timezone ();
@@ -273,6 +278,7 @@ write_html_heading (GtkHTMLStream *stream, const char *message,
g_free (start);
g_free (end);
+ g_free (image_path);
}
/**
@@ -299,6 +305,7 @@ alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
GtkHTMLStream *stream;
icaltimezone *current_zone;
char *buf, *title;
+ GList *icon_list;
g_return_val_if_fail (trigger != -1, NULL);
@@ -377,7 +384,12 @@ alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
if (!GTK_WIDGET_REALIZED (an->dialog))
gtk_widget_realize (an->dialog);
- gtk_window_set_icon_from_file (GTK_WINDOW (an->dialog), EVOLUTION_IMAGESDIR "/alarm.png", NULL);
+ icon_list = e_icon_factory_get_icon_list ("stock_alarm");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (an->dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
gtk_widget_show (an->dialog);
return an;
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index cfbd124c64..83e676d12c 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -42,6 +42,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-uidefs.h>
#include <e-util/eggtrayicon.h>
+#include <e-util/e-icon-factory.h>
#include <libecal/e-cal-time-util.h>
#include "evolution-calendar.h"
#include "alarm.h"
@@ -888,14 +889,15 @@ static gboolean
tray_icon_blink_cb (gpointer data)
{
TrayIconData *tray_data = data;
-
- /* FIXME: Use stock image equivalents when they become available */
+ GdkPixbuf *pixbuf;
tray_data->blink_state = tray_data->blink_state == TRUE ? FALSE : TRUE;
- gtk_image_set_from_file (GTK_IMAGE (tray_data->image),
- tray_data->blink_state == TRUE ?
- EVOLUTION_IMAGESDIR "/appointment-reminder-excl.png" :
- EVOLUTION_IMAGESDIR "/appointment-reminder.png");
+ pixbuf = e_icon_factory_get_icon (tray_data->blink_state == TRUE ?
+ "stock_appointment-reminder-excl" :
+ "stock_appointment-reminder",
+ 24);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (tray_data->image), pixbuf);
+ gdk_pixbuf_unref (pixbuf);
return TRUE;
}
@@ -916,6 +918,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
ECalComponentText text;
char *str, *start_str, *end_str, *alarm_str;
icaltimezone *current_zone;
+ GdkPixbuf *pixbuf;
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
@@ -946,7 +949,9 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
/* FIXME: Use stock image equivalent when it becomes available */
tray_icon = egg_tray_icon_new (qa->instance->auid);
- image = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/appointment-reminder.png");
+ pixbuf = e_icon_factory_get_icon ("stock_appointment-reminder", 24);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
ebox = gtk_event_box_new ();
gtk_widget_show (image);
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 0b9d2a34c0..3b5242ebc7 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -715,11 +715,11 @@ static BonoboUIVerb verbs [] = {
static EPixmap pixmaps [] =
{
- E_PIXMAP ("/Toolbar/DayView", "buttons/dayview.xpm"),
- E_PIXMAP ("/Toolbar/WorkWeekView", "buttons/workweekview.xpm"),
- E_PIXMAP ("/Toolbar/WeekView", "buttons/weekview.xpm"),
- E_PIXMAP ("/Toolbar/MonthView", "buttons/monthview.xpm"),
- E_PIXMAP ("/Toolbar/ListView", "buttons/listview.xpm"),
+ E_PIXMAP ("/Toolbar/DayView", "stock_calendar-view-day", 24),
+ E_PIXMAP ("/Toolbar/WorkWeekView", "stock_calendar-view-work-week", 24),
+ E_PIXMAP ("/Toolbar/WeekView", "stock_calendar-view-week", 24),
+ E_PIXMAP ("/Toolbar/MonthView", "stock_calendar-view-month", 24),
+ E_PIXMAP ("/Toolbar/ListView", "stock_calendar-view-list", 24),
E_PIXMAP_END
};
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 9b66753dc3..e68a2f043d 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -49,6 +49,7 @@
#include "dialogs/event-editor.h"
#include "widgets/misc/e-source-selector.h"
#include "widgets/misc/e-info-label.h"
+#include "e-util/e-icon-factory.h"
/* IDs for user creatable items */
#define CREATE_EVENT_ID "event"
@@ -306,19 +307,18 @@ update_primary_task_selection (CalendarComponent *calendar_component)
/* Callbacks. */
static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
+add_popup_menu_item (GtkMenu *menu, const char *label, const char *icon_name,
GCallback callback, gpointer user_data, gboolean sensitive)
{
GtkWidget *item, *image;
+ GdkPixbuf *pixbuf;
- if (pixmap) {
+ if (icon_name) {
item = gtk_image_menu_item_new_with_label (label);
/* load the image */
- if (g_file_test (pixmap, G_FILE_TEST_EXISTS))
- image = gtk_image_new_from_file (pixmap);
- else
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
+ pixbuf = e_icon_factory_get_icon (icon_name, 16);
+ image = gtk_image_new_from_pixbuf (pixbuf);
if (image) {
gtk_widget_show (image);
@@ -431,11 +431,11 @@ fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, CalendarComponent
sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (comp->priv->source_selector)) ?
TRUE : FALSE;
- add_popup_menu_item (menu, _("New Calendar"), EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png",
+ add_popup_menu_item (menu, _("New Calendar"), "stock_calendar",
G_CALLBACK (new_calendar_cb), comp, TRUE);
- add_popup_menu_item (menu, _("Copy"), EVOLUTION_IMAGESDIR "/folder-copy-16.png",
+ add_popup_menu_item (menu, _("Copy"), "stock_folder-copy",
G_CALLBACK (copy_calendar_cb), comp, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_calendar_cb), comp, sensitive);
+ add_popup_menu_item (menu, _("Delete"), "stock_delete", G_CALLBACK (delete_calendar_cb), comp, sensitive);
add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_calendar_cb), comp, sensitive);
}
@@ -829,7 +829,7 @@ impl_createControls (PortableServer_Servant servant,
GTK_SHADOW_IN);
gtk_widget_show (selector_scrolled_window);
- info = e_info_label_new("evolution-calendar-mini.png");
+ info = e_info_label_new("stock_calendar");
e_info_label_set_info((EInfoLabel *)info, _("Calendars"), "");
gtk_widget_show (info);
@@ -916,7 +916,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[0].menuDescription = _("_Appointment");
list->_buffer[0].tooltip = _("Create a new appointment");
list->_buffer[0].menuShortcut = 'a';
- list->_buffer[0].iconName = "new_appointment.xpm";
+ list->_buffer[0].iconName = "stock_new-appointment";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = CREATE_MEETING_ID;
@@ -924,7 +924,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[1].menuDescription = _("M_eeting");
list->_buffer[1].tooltip = _("Create a new meeting request");
list->_buffer[1].menuShortcut = 'e';
- list->_buffer[1].iconName = "meeting-request-16.png";
+ list->_buffer[1].iconName = "stock_new-meeting";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[2].id = CREATE_ALLDAY_EVENT_ID;
@@ -932,7 +932,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[2].menuDescription = _("All _Day Appointment");
list->_buffer[2].tooltip = _("Create a new all-day appointment");
list->_buffer[2].menuShortcut = 'd';
- list->_buffer[2].iconName = "new_all_day_event.png";
+ list->_buffer[2].iconName = "stock_new-24h-appointment";
list->_buffer[2].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[3].id = CREATE_CALENDAR_ID;
@@ -940,7 +940,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[3].menuDescription = _("C_alendar");
list->_buffer[3].tooltip = _("Create a new calendar");
list->_buffer[3].menuShortcut = 'a';
- list->_buffer[3].iconName = "evolution-calendar-mini.png";
+ list->_buffer[3].iconName = "stock_calendar";
list->_buffer[3].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 976cae4493..0e93f7b68a 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -33,11 +33,11 @@
#include <libgnomeui/gnome-uidefs.h>
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-messagebox.h>
#include <bonobo/bonobo-ui-container.h>
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
+#include <e-util/e-icon-factory.h>
#include <evolution-shell-component-utils.h>
#include "../print.h"
#include "../comp-util.h"
@@ -122,18 +122,18 @@ static gint delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
static EPixmap pixmaps [] =
{
- E_PIXMAP ("/menu/File/FileSave", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAndClose", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAs", "save-as-16.png"),
+ E_PIXMAP ("/menu/File/FileSave", "stock_save", 16),
+ E_PIXMAP ("/menu/File/FileSaveAndClose", "stock_save", 16),
+ E_PIXMAP ("/menu/File/FileSaveAs", "stock_save_as", 16),
- E_PIXMAP ("/menu/File/FileDelete", "evolution-trash-mini.png"),
+ E_PIXMAP ("/menu/File/FileDelete", "stock_delete", 16),
- E_PIXMAP ("/menu/File/FilePrint", "print.xpm"),
- E_PIXMAP ("/menu/File/FilePrintPreview", "print-preview.xpm"),
+ E_PIXMAP ("/menu/File/FilePrint", "stock_print", 16),
+ E_PIXMAP ("/menu/File/FilePrintPreview", "stock_print-preview", 16),
- E_PIXMAP ("/Toolbar/FileSaveAndClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/FilePrint", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/FileDelete", "buttons/delete-message.png"),
+ E_PIXMAP ("/Toolbar/FileSaveAndClose", "stock_save", 24),
+ E_PIXMAP ("/Toolbar/FilePrint", "stock_print", 24),
+ E_PIXMAP ("/Toolbar/FileDelete", "stock_delete", 24),
E_PIXMAP_END
};
@@ -971,18 +971,18 @@ make_icon_from_comp (ECalComponent *comp)
ECalComponentVType type;
if (!comp)
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
+ return "stock_calendar";
type = e_cal_component_get_vtype (comp);
switch (type) {
case E_CAL_COMPONENT_EVENT:
- return EVOLUTION_IMAGESDIR "/buttons/new_appointment.png";
+ return "stock_new-appointment";
break;
case E_CAL_COMPONENT_TODO:
- return EVOLUTION_IMAGESDIR "/buttons/new_task.png";
+ return "stock_task";
break;
default:
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
+ return "stock_calendar";
}
}
@@ -1015,11 +1015,18 @@ static void
set_icon_from_comp (CompEditor *editor)
{
CompEditorPrivate *priv;
- const char *file;
+ const char *icon_name;
+ GList *icon_list;
priv = editor->priv;
- file = make_icon_from_comp (priv->comp);
- gnome_window_icon_set_from_file (GTK_WINDOW (editor), file);
+ icon_name = make_icon_from_comp (priv->comp);
+
+ icon_list = e_icon_factory_get_icon_list (icon_name);
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (editor), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
}
static void
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index ac117a0039..8064455ccd 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -69,7 +69,7 @@ static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path,
static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
static EPixmap pixmaps [] = {
- E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "schedule-meeting-24.png"),
+ E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "stock_people", 24),
E_PIXMAP_END
};
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index b792f4a35d..78817553af 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -51,14 +51,7 @@
#include "e-cell-date-edit-text.h"
#include "e-comp-editor-registry.h"
#include "print.h"
-
-/* Pixmaps. */
-#include "art/task.xpm"
-#include "art/task-recurring.xpm"
-#include "art/task-assigned.xpm"
-#include "art/task-assigned-to.xpm"
-
-#include "art/check-filled.xpm"
+#include <e-util/e-icon-factory.h>
extern ECompEditorRegistry *comp_editor_registry;
@@ -114,8 +107,8 @@ static void open_task (ECalendarTable *cal_table, ECalModelComponent *comp_data,
/* The icons to represent the task. */
#define E_CALENDAR_MODEL_NUM_ICONS 4
-static char** icon_xpm_data[E_CALENDAR_MODEL_NUM_ICONS] = {
- task_xpm, task_recurring_xpm, task_assigned_xpm, task_assigned_to_xpm
+static const char* icon_names[E_CALENDAR_MODEL_NUM_ICONS] = {
+ "stock_task", "stock_task-recurring", "stock_task-assigned", "stock_task-assigned-to"
};
static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { 0 };
@@ -487,8 +480,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
if (!icon_pixbufs[0])
for (i = 0; i < E_CALENDAR_MODEL_NUM_ICONS; i++) {
- icon_pixbufs[i] = gdk_pixbuf_new_from_xpm_data (
- (const char **) icon_xpm_data[i]);
+ icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], 16);
}
cell = e_cell_toggle_new (0, E_CALENDAR_MODEL_NUM_ICONS, icon_pixbufs);
@@ -498,7 +490,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
e_table_extras_add_cell(extras, "icon", cell);
e_table_extras_add_pixbuf(extras, "icon", icon_pixbufs[0]);
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) check_filled_xpm);
+ pixbuf = e_icon_factory_get_icon ("stock_check-filled", 16);
e_table_extras_add_pixbuf(extras, "complete", pixbuf);
gdk_pixbuf_unref(pixbuf);
@@ -1374,7 +1366,7 @@ static char *test[] = {
#endif
/* Displays messages on the status bar */
-#define EVOLUTION_TASKS_PROGRESS_IMAGE "evolution-tasks-mini.png"
+#define EVOLUTION_TASKS_PROGRESS_IMAGE "stock_todo"
static GdkPixbuf *progress_icon = NULL;
void
@@ -1391,9 +1383,9 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes
}
} else if (cal_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_table);
-
+
if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL);
+ progress_icon = e_icon_factory_get_icon (EVOLUTION_TASKS_PROGRESS_IMAGE, 16);
cal_table->activity_id = e_activity_handler_operation_started (activity_handler, client_id,
progress_icon, message, TRUE);
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 07ab175fe2..4c51a2b0a0 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -56,7 +56,7 @@
#include "ea-calendar.h"
/* Used for the status bar messages */
-#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
+#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "stock_calendar"
static GdkPixbuf *progress_icon = NULL;
struct _ECalendarViewPrivate {
@@ -544,7 +544,7 @@ e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *messag
char *client_id = g_strdup_printf ("%p", cal_view);
if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
+ progress_icon = e_icon_factory_get_icon (EVOLUTION_CALENDAR_PROGRESS_IMAGE, 16);
cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
@@ -1316,7 +1316,8 @@ setup_popup_icons (EPopupMenu *context_menu)
for (i = 0; context_menu[i].name; i++) {
GtkWidget *pixmap_widget = NULL;
-
+ GdkPixbuf *pixbuf;
+
if (!strcmp (context_menu[i].name, _("_Copy")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("C_ut")))
@@ -1329,14 +1330,26 @@ setup_popup_icons (EPopupMenu *context_menu)
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("_Go to Date...")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("New _Appointment...")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_appointment.xpm");
- else if (!strcmp (context_menu[i].name, _("New All Day _Event")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_all_day_event.png");
- else if (!strcmp (context_menu[i].name, _("New Meeting")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/meeting-request-16.png");
- else if (!strcmp (context_menu[i].name, _("New Task")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_task-16.png");
+ else if (!strcmp (context_menu[i].name, _("New _Appointment..."))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-appointment", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New All Day _Event"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-24h-appointment", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New Meeting"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-meeting", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New Task"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_task", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
else if (!strcmp (context_menu[i].name, _("_Open")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("_Paste")))
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 2b7787ded4..a63a4da13c 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -644,15 +644,16 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->reminder_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -663,16 +664,16 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->recurrence_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
-
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -683,15 +684,16 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->timezone_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -703,15 +705,16 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->meeting_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->meeting_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index d2f60d7e7d..fc8d3930c3 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -528,24 +528,26 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
+ E_DAY_VIEW_ICON_Y_PAD - y;
if (icon_x <= max_icon_x && e_cal_component_has_recurrences (comp)) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->recurrence_icon,
0, 0, icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
+ E_DAY_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x -= icon_x_inc;
}
if (icon_x <= max_icon_x && e_cal_component_has_alarms (comp)) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->reminder_icon,
0, 0, icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
+ E_DAY_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x -= icon_x_inc;
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index bc256e288b..4aa223228c 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -73,12 +73,7 @@
#include "e-day-view-layout.h"
#include "e-day-view-main-item.h"
#include "misc.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.xpm"
-#include "art/schedule-meeting-16.xpm"
+#include <e-util/e-icon-factory.h>
/* The minimum amount of space wanted on each side of the date string. */
#define E_DAY_VIEW_DATE_X_PAD 4
@@ -1222,13 +1217,13 @@ e_day_view_realize (GtkWidget *widget)
if (nfailed)
g_warning ("Failed to allocate all colors");
+ gdk_gc_set_colormap (day_view->main_gc, colormap);
/* Create the pixmaps. */
- day_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->reminder_mask, NULL, bell_xpm);
- day_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->recurrence_mask, NULL, recur_xpm);
- day_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->timezone_mask, NULL, timezone_16_xpm);
- day_view->meeting_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->meeting_mask, NULL, schedule_meeting_16_xpm);
-
+ day_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_DAY_VIEW_ICON_WIDTH);
+ day_view->recurrence_icon = e_icon_factory_get_icon ("stock_refresh", E_DAY_VIEW_ICON_WIDTH);
+ day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_DAY_VIEW_ICON_WIDTH);
+ day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_DAY_VIEW_ICON_WIDTH);
/* Set the canvas item colors. */
@@ -1290,10 +1285,14 @@ e_day_view_unrealize (GtkWidget *widget)
colormap = gtk_widget_get_colormap (widget);
gdk_colormap_free_colors (colormap, day_view->colors, E_DAY_VIEW_COLOR_LAST);
- gdk_pixmap_unref (day_view->reminder_icon);
+ g_object_unref (day_view->reminder_icon);
day_view->reminder_icon = NULL;
- gdk_pixmap_unref (day_view->recurrence_icon);
+ g_object_unref (day_view->recurrence_icon);
day_view->recurrence_icon = NULL;
+ g_object_unref (day_view->timezone_icon);
+ day_view->timezone_icon = NULL;
+ g_object_unref (day_view->meeting_icon);
+ day_view->meeting_icon = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget);
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
index c1a9290206..b37960f6db 100644
--- a/calendar/gui/e-day-view.h
+++ b/calendar/gui/e-day-view.h
@@ -324,14 +324,10 @@ struct _EDayView
GdkGC *main_gc;
/* The icons. */
- GdkPixmap *reminder_icon;
- GdkBitmap *reminder_mask;
- GdkPixmap *recurrence_icon;
- GdkBitmap *recurrence_mask;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
- GdkPixmap *meeting_icon;
- GdkBitmap *meeting_mask;
+ GdkPixbuf *reminder_icon;
+ GdkPixbuf *recurrence_icon;
+ GdkPixbuf *timezone_icon;
+ GdkPixbuf *meeting_icon;
/* Colors for drawing. */
GdkColor colors[E_DAY_VIEW_COLOR_LAST];
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 30a357a158..06111d3118 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -55,6 +55,7 @@
#include "itip-utils.h"
#include "e-itip-control.h"
#include "common/authentication.h"
+#include <e-util/e-icon-factory.h>
struct _EItipControlPrivate {
GtkWidget *html;
@@ -759,6 +760,7 @@ write_error_html (EItipControl *itip, const gchar *itip_err)
{
EItipControlPrivate *priv;
GtkHTMLStream *html_stream;
+ gchar *filename;
priv = itip->priv;
@@ -776,7 +778,9 @@ write_error_html (EItipControl *itip, const gchar *itip_err)
/* The column for the image */
gtk_html_stream_printf (html_stream, "<tr><td width=48 align=\"center\" valign=\"top\" rowspan=\"8\">");
/* The image */
- gtk_html_stream_printf (html_stream, "<img src=\"/meeting-request.png\"></td>");
+ filename = e_icon_factory_get_icon_filename ("stock_new-meeting", 48);
+ gtk_html_stream_printf (html_stream, "<img src=\"%s\"></td>", filename);
+ g_free (filename);
gtk_html_stream_printf (html_stream, "<td align=\"left\" valign=\"top\">");
@@ -809,6 +813,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
const char *string;
gchar *html;
const gchar *const_html;
+ gchar *filename;
priv = itip->priv;
@@ -832,8 +837,9 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
/* The image */
- const_html = "<img src=\"/meeting-request.png\"></td>";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
+ filename = e_icon_factory_get_icon_filename ("stock_new-meeting", 48);
+ gtk_html_stream_printf (html_stream, "<img src=\"%s\"></td>", filename);
+ g_free (filename);
const_html = "<td align=\"left\" valign=\"top\">";
gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
@@ -1988,13 +1994,10 @@ static void
url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
{ unsigned char buffer[4096];
int len, fd;
- char *path;
-
- path = g_strdup_printf ("%s/%s", EVOLUTION_IMAGESDIR, url);
- if ((fd = open (path, O_RDONLY)) == -1) {
+ if ((fd = open (url, O_RDONLY)) == -1) {
g_warning ("%s", g_strerror (errno));
- goto cleanup;
+ return;
}
while ((len = read (fd, buffer, 4096)) > 0) {
@@ -2005,14 +2008,11 @@ url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpoint
/* check to see if we stopped because of an error */
gtk_html_end (html, handle, GTK_HTML_STREAM_ERROR);
g_warning ("%s", g_strerror (errno));
- goto cleanup;
+ return;
}
/* done with no errors */
gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
close (fd);
-
- cleanup:
- g_free (path);
}
static gboolean
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index 7c361a9cf4..78f1c8dd3e 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -37,9 +37,7 @@
#include <gal/util/e-util.h>
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
#include "e-timezone-entry.h"
-
-/* The timezone icon for the button. */
-#include "art/timezone-16.xpm"
+#include <e-util/e-icon-factory.h>
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
@@ -115,10 +113,8 @@ static void
e_timezone_entry_init (ETimezoneEntry *tentry)
{
ETimezoneEntryPrivate *priv;
- GdkColormap *colormap;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
- GtkWidget *pixmap;
+ GtkWidget *gtk_image;
+ GdkPixbuf *gdk_pixbuf;
tentry->priv = priv = g_new0 (ETimezoneEntryPrivate, 1);
@@ -137,12 +133,12 @@ e_timezone_entry_init (ETimezoneEntry *tentry)
gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 6);
gtk_widget_show (priv->button);
- colormap = gtk_widget_get_colormap (priv->button);
- timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &timezone_mask, NULL, timezone_16_xpm);
-
- pixmap = gtk_pixmap_new (timezone_icon, timezone_mask);
- gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
- gtk_widget_show (pixmap);
+ gdk_pixbuf = e_icon_factory_get_icon ("stock_timezone", 16);
+ gtk_image = gtk_image_new_from_pixbuf (gdk_pixbuf);
+ gtk_container_add (GTK_CONTAINER (priv->button), gtk_image);
+ gtk_widget_show (gtk_image);
+
+ g_object_unref (gdk_pixbuf);
}
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 85e1cf775a..0bc43e12ef 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -642,35 +642,38 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
icon_x -= icon_x_inc * num_icons;
if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->reminder_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->recurrence_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
if (draw_timezone_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->timezone_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index bc61ff6bb8..5feb39bfbb 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -70,11 +70,9 @@
#include "e-week-view-main-item.h"
#include "e-week-view-titles-item.h"
#include "misc.h"
+#include <e-util/e-icon-factory.h>
/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.xpm"
#include "art/jump.xpm"
#define E_WEEK_VIEW_SMALL_FONT_PTSIZE 7
@@ -91,7 +89,6 @@
we get from the server. */
#define E_WEEK_VIEW_LAYOUT_TIMEOUT 100
-
typedef struct {
EWeekView *week_view;
ECalModelComponent *comp_data;
@@ -828,11 +825,12 @@ e_week_view_realize (GtkWidget *widget)
if (nfailed)
g_warning ("Failed to allocate all colors");
+ gdk_gc_set_colormap (week_view->main_gc, colormap);
/* Create the pixmaps. */
- week_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->reminder_mask, NULL, bell_xpm);
- week_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->recurrence_mask, NULL, recur_xpm);
- week_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->timezone_mask, NULL, timezone_16_xpm);
+ week_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_WEEK_VIEW_ICON_WIDTH);
+ week_view->recurrence_icon = e_icon_factory_get_icon ("stock_refresh", E_WEEK_VIEW_ICON_WIDTH);
+ week_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_WEEK_VIEW_ICON_WIDTH);
}
@@ -850,10 +848,12 @@ e_week_view_unrealize (GtkWidget *widget)
colormap = gtk_widget_get_colormap (widget);
gdk_colormap_free_colors (colormap, week_view->colors, E_WEEK_VIEW_COLOR_LAST);
- gdk_pixmap_unref (week_view->reminder_icon);
+ g_object_unref (week_view->reminder_icon);
week_view->reminder_icon = NULL;
- gdk_pixmap_unref (week_view->recurrence_icon);
+ g_object_unref (week_view->recurrence_icon);
week_view->recurrence_icon = NULL;
+ g_object_unref (week_view->timezone_icon);
+ week_view->timezone_icon = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget);
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index 9db268b30b..00e10d84f6 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -278,12 +278,9 @@ struct _EWeekView
GdkGC *main_gc;
/* The icons. */
- GdkPixmap *reminder_icon;
- GdkBitmap *reminder_mask;
- GdkPixmap *recurrence_icon;
- GdkBitmap *recurrence_mask;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
+ GdkPixbuf *reminder_icon;
+ GdkPixbuf *recurrence_icon;
+ GdkPixbuf *timezone_icon;
/* Colors for drawing. */
GdkColor colors[E_WEEK_VIEW_COLOR_LAST];
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index b577bae97c..0adf321dc2 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -46,7 +46,7 @@
#include "dialogs/task-editor.h"
#include "widgets/misc/e-source-selector.h"
#include "widgets/misc/e-info-label.h"
-
+#include "e-util/e-icon-factory.h"
#define CREATE_TASK_ID "task"
#define CREATE_TASK_LIST_ID "task-list"
@@ -234,19 +234,18 @@ update_primary_selection (TasksComponent *component)
/* Callbacks. */
static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
+add_popup_menu_item (GtkMenu *menu, const char *label, const char *icon_name,
GCallback callback, gpointer user_data, gboolean sensitive)
{
GtkWidget *item, *image;
+ GdkPixbuf *pixbuf;
- if (pixmap) {
+ if (icon_name) {
item = gtk_image_menu_item_new_with_label (label);
/* load the image */
- if (g_file_test (pixmap, G_FILE_TEST_EXISTS))
- image = gtk_image_new_from_file (pixmap);
- else
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
+ pixbuf = e_icon_factory_get_icon (icon_name, 16);
+ image = gtk_image_new_from_pixbuf (pixbuf);
if (image) {
gtk_widget_show (image);
@@ -361,11 +360,11 @@ fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, TasksComponent *co
sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component->priv->source_selector)) ?
TRUE : FALSE;
- add_popup_menu_item (menu, _("New Task List"), EVOLUTION_IMAGESDIR "/evolution-tasks-mini.png",
+ add_popup_menu_item (menu, _("New Task List"), "stock_todo",
G_CALLBACK (new_task_list_cb), component, TRUE);
- add_popup_menu_item (menu, _("Copy"), EVOLUTION_IMAGESDIR "/folder-copy-16.png",
+ add_popup_menu_item (menu, _("Copy"), "stock_folder-copy",
G_CALLBACK (copy_task_list_cb), component, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_task_list_cb),
+ add_popup_menu_item (menu, _("Delete"), "stock_delete", G_CALLBACK (delete_task_list_cb),
component, sensitive);
add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_task_list_cb),
component, sensitive);
@@ -496,7 +495,7 @@ impl_createControls (PortableServer_Servant servant,
GTK_SHADOW_IN);
gtk_widget_show (selector_scrolled_window);
- info = e_info_label_new("evolution-tasks-mini.png");
+ info = e_info_label_new("stock_task");
e_info_label_set_info((EInfoLabel *)info, _("Tasks"), "");
gtk_widget_show (info);
@@ -571,7 +570,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[0].menuDescription = _("_Task");
list->_buffer[0].tooltip = _("Create a new task");
list->_buffer[0].menuShortcut = 't';
- list->_buffer[0].iconName = "new_task-16.png";
+ list->_buffer[0].iconName = "stock_task";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = CREATE_TASK_LIST_ID;
@@ -579,7 +578,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[1].menuDescription = _("_Tasks Group");
list->_buffer[1].tooltip = _("Create a new tasks group");
list->_buffer[1].menuShortcut = 'n';
- list->_buffer[1].iconName = "evolution-tasks-mini.png";
+ list->_buffer[1].iconName = "stock_todo";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;