aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-04-22 00:06:38 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-22 00:06:38 +0800
commita84b1a325147e6321b90f491a1dc686e588869dc (patch)
tree409a66488e99ed288c9ff2b4eb90f1993ae537ab /calendar
parente9c4388490925de25b029fa0d6437a34a6386c05 (diff)
parentece7dcdcea82d0e1fbc104cf48b2928a449b8748 (diff)
downloadgsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar.gz
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar.bz2
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar.lz
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar.xz
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.tar.zst
gsoc2013-evolution-a84b1a325147e6321b90f491a1dc686e588869dc.zip
Merge commit 'origin/gnome-2-30' into express2
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/Makefile.am15
-rw-r--r--calendar/gui/alarm-notify/evolution-alarm-notify-icon.rc1
-rw-r--r--calendar/gui/alarm-notify/evolution-alarm-notify.icobin0 -> 17542 bytes
-rw-r--r--calendar/gui/e-cal-model.c15
-rw-r--r--calendar/gui/e-cal-model.h3
-rw-r--r--calendar/gui/e-day-view.c11
-rw-r--r--calendar/gui/e-week-view.c14
7 files changed, 45 insertions, 14 deletions
diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am
index 44e0187180..79b9122a3c 100644
--- a/calendar/gui/alarm-notify/Makefile.am
+++ b/calendar/gui/alarm-notify/Makefile.am
@@ -1,5 +1,9 @@
bin_PROGRAMS = evolution-alarm-notify
+if HAVE_WINDRES
+EVOLUTIONALARMNOTIFYICON = evolution-alarm-notify-icon.o
+endif
+
evolution_alarm_notify_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DG_LOG_DOMAIN=\"evolution-alarm-notify\" \
@@ -39,12 +43,19 @@ evolution_alarm_notify_LDADD = \
$(CAMEL_LIBS) \
$(EVOLUTION_CALENDAR_LIBS) \
$(CANBERRA_LIBS) \
- $(GNOME_PLATFORM_LIBS)
+ $(GNOME_PLATFORM_LIBS) \
+ $(EVOLUTIONALARMNOTIFYICON)
if OS_WIN32
evolution_alarm_notify_LDFLAGS = -mwindows
endif
-EXTRA_DIST = $(ui_DATA)
+EXTRA_DIST = $(ui_DATA) \
+ evolution-alarm-notify-icon.rc \
+ evolution-alarm-notify.ico
+
+
+evolution-alarm-notify-icon.o: evolution-alarm-notify.ico evolution-alarm-notify-icon.rc
+ $(WINDRES) evolution-alarm-notify-icon.rc evolution-alarm-notify-icon.o
-include $(top_srcdir)/git.mk
diff --git a/calendar/gui/alarm-notify/evolution-alarm-notify-icon.rc b/calendar/gui/alarm-notify/evolution-alarm-notify-icon.rc
new file mode 100644
index 0000000000..1f9ef65874
--- /dev/null
+++ b/calendar/gui/alarm-notify/evolution-alarm-notify-icon.rc
@@ -0,0 +1 @@
+1 ICON "evolution-alarm-notify.ico"
diff --git a/calendar/gui/alarm-notify/evolution-alarm-notify.ico b/calendar/gui/alarm-notify/evolution-alarm-notify.ico
new file mode 100644
index 0000000000..6585452256
--- /dev/null
+++ b/calendar/gui/alarm-notify/evolution-alarm-notify.ico
Binary files differ
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index c075e95c13..e48b95999d 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -138,6 +138,7 @@ enum {
CAL_VIEW_PROGRESS,
CAL_VIEW_DONE,
STATUS_MESSAGE,
+ TIMEZONE_CHANGED,
LAST_SIGNAL
};
@@ -411,6 +412,16 @@ e_cal_model_class_init (ECalModelClass *class)
e_marshal_VOID__STRING_DOUBLE,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_DOUBLE);
+ signals[TIMEZONE_CHANGED] = g_signal_new (
+ "timezone-changed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECalModelClass, timezone_changed),
+ NULL, NULL,
+ e_marshal_VOID__POINTER_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
}
static void
@@ -1365,12 +1376,14 @@ void
e_cal_model_set_timezone (ECalModel *model,
icaltimezone *zone)
{
+ icaltimezone *old_zone;
g_return_if_fail (E_IS_CAL_MODEL (model));
if (model->priv->zone == zone)
return;
e_table_model_pre_change (E_TABLE_MODEL (model));
+ old_zone = model->priv->zone;
model->priv->zone = zone;
/* the timezone affects the times shown for date fields,
@@ -1378,6 +1391,8 @@ e_cal_model_set_timezone (ECalModel *model,
e_table_model_changed (E_TABLE_MODEL (model));
g_object_notify (G_OBJECT (model), "timezone");
+ g_signal_emit (G_OBJECT (model), signals[TIMEZONE_CHANGED], 0,
+ old_zone, zone);
}
void
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index ee914eef67..29c3335310 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -166,6 +166,9 @@ struct _ECalModelClass {
void (*status_message) (ECalModel *model,
const gchar *message,
gdouble percent);
+ void (*timezone_changed) (ECalModel *model,
+ icaltimezone *old_zone,
+ icaltimezone *new_zone);
};
typedef time_t (*ECalModelDefaultTimeFunc) (ECalModel *model, gpointer user_data);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index cbc71b969c..cc8581fb00 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -948,12 +948,13 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data)
}
static void
-timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
+timezone_changed_cb (ECalModel *cal_model, icaltimezone *old_zone,
icaltimezone *new_zone, gpointer user_data)
{
struct icaltimetype tt;
time_t lower;
- EDayView *day_view = (EDayView *) cal_view;
+ EDayView *day_view = (EDayView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) day_view;
g_return_if_fail (E_IS_DAY_VIEW (day_view));
@@ -1294,10 +1295,6 @@ e_day_view_init (EDayView *day_view)
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
e_drag_dest_add_calendar_targets (day_view->main_canvas);
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (day_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
static void
@@ -1314,6 +1311,8 @@ init_model (EDayView *day_view, ECalModel *model)
G_CALLBACK (model_rows_inserted_cb), day_view);
g_signal_connect (G_OBJECT (model), "comps_deleted",
G_CALLBACK (model_comps_deleted_cb), day_view);
+ g_signal_connect (G_OBJECT (model), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), day_view);
}
/* Turn off the background of the canvas windows. This reduces flicker
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 23cc8e6654..696113987b 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -422,11 +422,12 @@ week_view_time_range_changed_cb (EWeekView *week_view,
}
static void
-timezone_changed_cb (ECalendarView *cal_view,
+timezone_changed_cb (ECalModel *cal_model,
icaltimezone *old_zone,
icaltimezone *new_zone,
gpointer user_data)
{
+ ECalendarView *cal_view = (ECalendarView *) user_data;
struct icaltimetype tt = icaltime_null_time ();
time_t lower;
EWeekView *week_view = (EWeekView *) cal_view;
@@ -819,10 +820,6 @@ e_week_view_init (EWeekView *week_view)
week_view->move_cursor = gdk_cursor_new (GDK_FLEUR);
week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
week_view->last_cursor_set = NULL;
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (week_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
/**
@@ -834,9 +831,14 @@ e_week_view_init (EWeekView *week_view)
ECalendarView *
e_week_view_new (ECalModel *model)
{
+ ECalendarView *view;
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- return g_object_new (E_TYPE_WEEK_VIEW, "model", model, NULL);
+ view = g_object_new (E_TYPE_WEEK_VIEW, "model", model, NULL);
+
+ g_signal_connect (G_OBJECT (model), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), view);
+ return view;
}
static void