aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-05 11:52:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-07 12:18:52 +0800
commit28b84ecaf9111f2a59e1380089dad6a92ddc848d (patch)
treec925a0966e291917ce69a596c9613ac7cee33be8 /calendar
parent5f1c9ff19d80bb50cd00114b8fb633d8eba3365f (diff)
downloadgsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.gz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.bz2
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.lz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.xz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.zst
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.zip
Teach ETable to prefer themed icon names over pixbufs.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-memo-table.c14
-rw-r--r--calendar/gui/e-task-table.c21
2 files changed, 8 insertions, 27 deletions
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index ee67baa9ae..62c0b99e6e 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -87,12 +87,10 @@ static gpointer parent_class;
static guint signals[LAST_SIGNAL];
/* The icons to represent the task. */
-#define NUM_ICONS 2
-static const gchar *icon_names[NUM_ICONS] = {
+static const gchar *icon_names[] = {
"stock_notes",
"stock_insert-note"
};
-static GdkPixbuf *icon_pixbufs[NUM_ICONS] = { NULL };
static void
memo_table_emit_open_component (EMemoTable *memo_table,
@@ -347,7 +345,6 @@ memo_table_constructed (GObject *object)
ECalModel *model;
ECell *cell, *popup_cell;
ETableExtras *extras;
- gint i;
AtkObject *a11y;
gchar *etspecfile;
@@ -400,14 +397,9 @@ memo_table_constructed (GObject *object)
/* Create pixmaps */
- if (!icon_pixbufs[0])
- for (i = 0; i < NUM_ICONS; i++) {
- icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], GTK_ICON_SIZE_MENU);
- }
-
- cell = e_cell_toggle_new (0, NUM_ICONS, icon_pixbufs);
+ cell = e_cell_toggle_new (icon_names, G_N_ELEMENTS (icon_names));
e_table_extras_add_cell (extras, "icon", cell);
- e_table_extras_add_pixbuf (extras, "icon", icon_pixbufs[0]);
+ e_table_extras_add_icon_name (extras, "icon", "stock_notes");
/* set proper format component for a default 'date' cell renderer */
cell = e_table_extras_get_cell (extras, "date");
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index c4d364a930..5136a56b2d 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -91,14 +91,12 @@ static gpointer parent_class;
static guint signals[LAST_SIGNAL];
/* The icons to represent the task. */
-#define NUM_ICONS 4
-static const gchar *icon_names[NUM_ICONS] = {
+static const gchar *icon_names[] = {
"stock_task",
"stock_task-recurring",
"stock_task-assigned",
"stock_task-assigned-to"
};
-static GdkPixbuf *icon_pixbufs[NUM_ICONS] = { NULL };
static void
task_table_emit_open_component (ETaskTable *task_table,
@@ -384,8 +382,6 @@ task_table_constructed (GObject *object)
ECalModel *model;
ECell *cell, *popup_cell;
ETableExtras *extras;
- gint i;
- GdkPixbuf *pixbuf;
GList *strings;
AtkObject *a11y;
gchar *etspecfile;
@@ -575,18 +571,11 @@ task_table_constructed (GObject *object)
/* Create pixmaps */
- if (!icon_pixbufs[0])
- for (i = 0; i < NUM_ICONS; i++) {
- icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], GTK_ICON_SIZE_MENU);
- }
-
- cell = e_cell_toggle_new (0, NUM_ICONS, icon_pixbufs);
- e_table_extras_add_cell(extras, "icon", cell);
- e_table_extras_add_pixbuf(extras, "icon", icon_pixbufs[0]);
+ cell = e_cell_toggle_new (icon_names, G_N_ELEMENTS (icon_names));
+ e_table_extras_add_cell (extras, "icon", cell);
+ e_table_extras_add_icon_name (extras, "icon", "stock_task");
- pixbuf = e_icon_factory_get_icon ("stock_check-filled", GTK_ICON_SIZE_MENU);
- e_table_extras_add_pixbuf(extras, "complete", pixbuf);
- g_object_unref(pixbuf);
+ e_table_extras_add_icon_name (extras, "complete", "stock_check-filled");
/* set proper format component for a default 'date' cell renderer */
cell = e_table_extras_get_cell (extras, "date");