aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-commands.c77
-rw-r--r--calendar/gui/dayview.xpm34
-rw-r--r--calendar/gui/monthview.xpm34
-rw-r--r--calendar/gui/weekview.xpm34
-rw-r--r--calendar/gui/workweekview.xpm34
-rw-r--r--calendar/gui/yearview.xpm44
6 files changed, 35 insertions, 222 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index a9a9d62101..29557e2d68 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -45,14 +45,6 @@
#include "print.h"
#include "dialogs/cal-prefs-dialog.h"
-#include "dayview.xpm"
-#include "workweekview.xpm"
-#include "weekview.xpm"
-#include "monthview.xpm"
-#if 0
-#include "yearview.xpm"
-#endif
-
/* A list of all of the calendars started */
static GList *all_calendars = NULL;
@@ -60,13 +52,6 @@ static GList *all_calendars = NULL;
/* We have one global preferences dialog. */
static CalPrefsDialog *preferences_dialog = NULL;
-
-static void update_pixmaps (BonoboUIComponent *uic);
-static void set_pixmap (BonoboUIComponent *uic,
- const char *xml_path,
- char **xpm_data);
-
-
/* Callback for the new appointment command */
static void
new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path)
@@ -360,6 +345,41 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB_END
};
+static void
+set_pixmap (BonoboUIComponent *uic,
+ const char *xml_path,
+ const char *icon)
+{
+ char *path;
+ GdkPixbuf *pixbuf;
+
+ path = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution", icon);
+
+ pixbuf = gdk_pixbuf_new_from_file (path);
+ if (pixbuf == NULL) {
+ g_warning ("Cannot load image -- %s", path);
+ g_free (path);
+ return;
+ }
+
+ bonobo_ui_util_set_pixbuf (uic, xml_path, pixbuf);
+
+ gdk_pixbuf_unref (pixbuf);
+
+ g_free (path);
+}
+
+static void
+update_pixmaps (BonoboUIComponent *uic)
+{
+ set_pixmap (uic, "/Toolbar/New", "buttons/new_appointment.png");
+
+ set_pixmap (uic, "/Toolbar/DayView", "buttons/dayview.xpm");
+ set_pixmap (uic, "/Toolbar/WorkWeekView", "buttons/workweekview.xpm");
+ set_pixmap (uic, "/Toolbar/WeekView", "buttons/weekview.xpm");
+ set_pixmap (uic, "/Toolbar/MonthView", "buttons/monthview.xpm");
+}
+
void
calendar_control_activate (BonoboControl *control,
GnomeCalendar *cal)
@@ -404,33 +424,6 @@ calendar_control_activate (BonoboControl *control,
bonobo_ui_component_thaw (uic, NULL);
}
-
-static void
-update_pixmaps (BonoboUIComponent *uic)
-{
- set_pixmap (uic, "/Toolbar/DayView", dayview_xpm);
- set_pixmap (uic, "/Toolbar/WorkWeekView", workweekview_xpm);
- set_pixmap (uic, "/Toolbar/WeekView", weekview_xpm);
- set_pixmap (uic, "/Toolbar/MonthView", monthview_xpm);
-}
-
-
-static void
-set_pixmap (BonoboUIComponent *uic,
- const char *xml_path,
- char **xpm_data)
-{
- GdkPixbuf *pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) xpm_data);
- g_return_if_fail (pixbuf != NULL);
-
- bonobo_ui_util_set_pixbuf (uic, xml_path, pixbuf);
-
- gdk_pixbuf_unref (pixbuf);
-}
-
-
void
calendar_control_deactivate (BonoboControl *control)
{
diff --git a/calendar/gui/dayview.xpm b/calendar/gui/dayview.xpm
deleted file mode 100644
index dbabb24c5c..0000000000
--- a/calendar/gui/dayview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * dayview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #D8D8D4",
-"@ c #919191",
-"# c #666666",
-"$ c #FFFFFF",
-"% c #F2F1ED",
-"....................... ",
-".++++++++++++++++++++@. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".@####################. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".+@@#@@@@@@@@@@@@@@@@#. ",
-"....................... ",
-" "};
diff --git a/calendar/gui/monthview.xpm b/calendar/gui/monthview.xpm
deleted file mode 100644
index 21c76151d5..0000000000
--- a/calendar/gui/monthview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * monthview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #666666",
-"# c #919191",
-"$ c #F2F1ED",
-"% c #D8D8D4",
-"....................... ",
-".+++++++++++++++++++++. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".%###################@. ",
-"....................... ",
-" "};
diff --git a/calendar/gui/weekview.xpm b/calendar/gui/weekview.xpm
deleted file mode 100644
index 869b9e722a..0000000000
--- a/calendar/gui/weekview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * weekview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #D8D8D4",
-"# c #F2F1ED",
-"$ c #919191",
-"% c #666666",
-"....................... ",
-".++++++++++@++++++++++. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+$$$$$$$$$$$$$$$$$$$$. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+$$$$$$$$$$$$$$$$$$$$. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$$$$$$$$$$$. ",
-".+#########$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".@$$$$$$$$$%$$$$$$$$$%. ",
-"....................... ",
-" "};
diff --git a/calendar/gui/workweekview.xpm b/calendar/gui/workweekview.xpm
deleted file mode 100644
index 35cceedbdc..0000000000
--- a/calendar/gui/workweekview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * workweekview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #D8D8D4",
-"# c #B5B4AF",
-"$ c #666666",
-"% c #F2F1ED",
-"....................... ",
-".++++@+++@+++@+++@++++. ",
-".+###$###$###$###$###$. ",
-".+###$###$###$###$###$. ",
-".@$$$$$$$$$$$$$$$$$$$$. ",
-".++++#+++#+++#+++#+++#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".@###$###$###$###$####. ",
-"....................... ",
-" "};
diff --git a/calendar/gui/yearview.xpm b/calendar/gui/yearview.xpm
deleted file mode 100644
index 0d4fa4135b..0000000000
--- a/calendar/gui/yearview.xpm
+++ /dev/null
@@ -1,44 +0,0 @@
-/* XPM */
-static char * yearview_xpm[] = {
-"24 24 17 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F2F1ED",
-"# c #AAA9A6",
-"$ c #D7D6D2",
-"% c #92918E",
-"& c #B7B6B3",
-"* c #CBCAC6",
-"= c #919191",
-"- c #888785",
-"; c #B6B6B2",
-"> c #888884",
-", c #C1C1BD",
-"' c #A7A6A3",
-") c #D8D8D4",
-"! c #666666",
-"....................... ",
-".+++++++++++++++++++++. ",
-".+@@@@@@@#$%&*@@@@@@@=. ",
-".+@@@@@@@-;>,'@@@@@@@=. ",
-".+====================. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".)===================!. ",
-"....................... ",
-" "};