aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-10-14 12:02:13 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-10-14 12:02:13 +0800
commita28d0468805da949037d3a64c0ebfda21be77a56 (patch)
tree2ee7e587172ab049d1b81dcd72bdf177d39f36f7
parent063f8d21af2564bf6c627d791a33e892c413eb7e (diff)
downloadgsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar.gz
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar.bz2
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar.lz
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar.xz
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.tar.zst
gsoc2013-evolution-a28d0468805da949037d3a64c0ebfda21be77a56.zip
call set_icon_from_comp. (set_icon_from_comp): set the window icon from
2001-10-13 Larry Ewing <lewing@ximian.com> * gui/dialogs/comp-editor.c (real_edit_comp): call set_icon_from_comp. (set_icon_from_comp): set the window icon from the comp. (make_icon_from_comp): get the icon path based on comp type. * gui/dialogs/Makefile.am (iconsdir): EVOLUTION_ICONSDIR bits. svn path=/trunk/; revision=13666
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/dialogs/Makefile.am3
-rw-r--r--calendar/gui/dialogs/comp-editor.c34
3 files changed, 46 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3fd1acd335..3741c400c7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-13 Larry Ewing <lewing@ximian.com>
+
+ * gui/dialogs/comp-editor.c (real_edit_comp): call
+ set_icon_from_comp.
+ (set_icon_from_comp): set the window icon from the comp.
+ (make_icon_from_comp): get the icon path based on comp type.
+
+ * gui/dialogs/Makefile.am (iconsdir): EVOLUTION_ICONSDIR bits.
+
2001-10-13 JP Rosevear <jpr@ximian.com>
* gui/dialogs/task-editor.c (task_editor_send_comp): send
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index c0c410a565..2784a36004 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -31,6 +31,7 @@ INCLUDES = \
$(EXTRA_GNOME_CFLAGS) \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
+ -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
$(BONOBO_VFS_GNOME_CFLAGS) \
-DGNOMELOCALEDIR=\""$(localedir)"\"
@@ -80,6 +81,8 @@ libcal_dialogs_a_SOURCES = \
task-page.c \
task-page.h
+iconsdir = $(datadir)/images/evolution
+
gladedir = $(datadir)/evolution/glade
glade_DATA = \
alarm-options.glade \
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index b6d6e233db..2ae92ac9c3 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -657,6 +657,28 @@ make_title_from_comp (CalComponent *comp)
return title;
}
+static const char *
+make_icon_from_comp (CalComponent *comp)
+{
+ CalComponentVType type;
+ const char *icon_path;
+
+ if (!comp)
+ return EVOLUTION_ICONSDIR "/evolution-calendar-mini.png";
+
+ type = cal_component_get_vtype (comp);
+ switch (type) {
+ case CAL_COMPONENT_EVENT:
+ return EVOLUTION_ICONSDIR "/buttons/new_appointment.png";
+ break;
+ case CAL_COMPONENT_TODO:
+ return EVOLUTION_ICONSDIR "/buttons/new_task.png";
+ break;
+ default:
+ return EVOLUTION_ICONSDIR "/evolution-calendar-mini.png";
+ }
+}
+
/* Sets the event editor's window title from a calendar component */
static void
set_title_from_comp (CompEditor *editor)
@@ -671,6 +693,17 @@ set_title_from_comp (CompEditor *editor)
}
static void
+set_icon_from_comp (CompEditor *editor)
+{
+ CompEditorPrivate *priv;
+ char *file;
+
+ priv = editor->priv;
+ file = make_icon_from_comp (priv->comp);
+ gnome_window_icon_set_from_file (GTK_WINDOW (priv->window), file);
+}
+
+static void
fill_widgets (CompEditor *editor)
{
CompEditorPrivate *priv;
@@ -741,6 +774,7 @@ real_edit_comp (CompEditor *editor, CalComponent *comp)
priv->comp = cal_component_clone (comp);
set_title_from_comp (editor);
+ set_icon_from_comp (editor);
fill_widgets (editor);
}