aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2001-01-03 02:16:45 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-01-03 02:16:45 +0800
commit59b1e25cfdb4253a94df4392d1e2fb69a6901515 (patch)
tree4bf75e92066b0762ac1653320bc98ca61af1657f /calendar/gui/calendar-commands.c
parent59c0cc7f80c6e5ff909a296fd1dbdaa8af66cda6 (diff)
downloadgsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar.gz
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar.bz2
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar.lz
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar.xz
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.tar.zst
gsoc2013-evolution-59b1e25cfdb4253a94df4392d1e2fb69a6901515.zip
Do not compose strings so that they can be localized correctly. Also,
2001-01-02 Federico Mena Quintero <federico@helixcode.com> * gui/dialogs/delete-comp.c (delete_component_dialog): Do not compose strings so that they can be localized correctly. Also, convert from UTF8 into the font's encoding. Fixes bug #1030. * gui/e-calendar-table.c (delete_component): Pass the widget argument to delete_component_dialog(). * gui/e-day-view.c (e_day_view_on_delete_appointment): Likewise. * gui/e-week-view.c (e_week_view_on_delete_appointment): Likewise. * gui/event-editor.c (file_delete_cb): Likewise. * gui/calendar-commands.c: Use BONOBO_UI_VERB() instead of BONOBO_UI_UNSAFE_VERB(). Guess what, all of our handler signatures were wrong. * gui/event-editor.c: Likewise. * gui/dialogs/task-editor.c: Likewise. * gui/goto-dialog.glade: Added some spacing between the month/year widgets and the calendar widget. svn path=/trunk/; revision=7211
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c103
1 files changed, 63 insertions, 40 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 7b6c909f76..f56d941d2c 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -50,11 +50,11 @@ static void set_pixmap (BonoboUIComponent *uic,
/* Callback for the new appointment command */
static void
-new_appointment_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal;
- gcal = GNOME_CALENDAR (user_data);
+ gcal = GNOME_CALENDAR (data);
gnome_calendar_new_appointment (gcal);
}
@@ -85,7 +85,7 @@ print (GnomeCalendar *gcal, gboolean preview)
/* File/Print callback */
static void
-file_print_cb (BonoboUIComponent *uih, void *data, const char *path)
+file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal;
@@ -127,74 +127,94 @@ set_normal_cursor (GnomeCalendar *gcal)
}
static void
-previous_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+previous_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+
set_clock_cursor (gcal);
gnome_calendar_previous (gcal);
set_normal_cursor (gcal);
}
static void
-next_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+next_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+
set_clock_cursor (gcal);
gnome_calendar_next (gcal);
set_normal_cursor (gcal);
}
static void
-today_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+today_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+
set_clock_cursor (gcal);
gnome_calendar_goto_today (gcal);
set_normal_cursor (gcal);
}
static void
-goto_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+goto_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+
goto_dialog (gcal);
}
static void
-show_day_view_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
gnome_calendar_set_view (gcal, "dayview", FALSE, TRUE);
}
static void
-show_work_week_view_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
gnome_calendar_set_view (gcal, "workweekview", FALSE, TRUE);
}
static void
-show_week_view_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
gnome_calendar_set_view (gcal, "weekview", FALSE, TRUE);
}
static void
-show_month_view_clicked (BonoboUIComponent *uih, void *user_data, const char *path)
+show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
- GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
gnome_calendar_set_view (gcal, "monthview", FALSE, TRUE);
}
static void
-new_calendar_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
+new_calendar_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
{
new_calendar ();
}
@@ -226,7 +246,7 @@ open_ok (GtkWidget *widget, GtkFileSelection *fs)
}
static void
-open_calendar_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
+open_calendar_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
{
GtkFileSelection *fs;
@@ -265,12 +285,15 @@ close_save (GtkWidget *w)
}
static void
-save_as_calendar_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
+save_as_calendar_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
{
+ GnomeCalendar *gcal;
GtkFileSelection *fs;
+ gcal = GNOME_CALENDAR (data);
+
fs = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save calendar")));
- gtk_object_set_user_data (GTK_OBJECT (fs), user_data);
+ gtk_object_set_user_data (GTK_OBJECT (fs), gcal);
gtk_signal_connect (GTK_OBJECT (fs->ok_button), "clicked",
(GtkSignalFunc) save_ok,
@@ -288,7 +311,7 @@ save_as_calendar_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-properties_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
+properties_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
{
if (!preferences_dialog)
preferences_dialog = cal_prefs_dialog_new ();
@@ -298,22 +321,22 @@ properties_cmd (BonoboUIComponent *uih, void *user_data, const char *path)
static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("CalendarNew", new_calendar_cmd),
- BONOBO_UI_UNSAFE_VERB ("CalendarOpen", open_calendar_cmd),
- BONOBO_UI_UNSAFE_VERB ("CalendarSaveAs", save_as_calendar_cmd),
- BONOBO_UI_UNSAFE_VERB ("CalendarPrint", file_print_cb),
- BONOBO_UI_UNSAFE_VERB ("EditNewAppointment", new_appointment_cb),
- BONOBO_UI_UNSAFE_VERB ("CalendarPreferences", properties_cmd),
-
- BONOBO_UI_UNSAFE_VERB ("CalendarPrev", previous_clicked),
- BONOBO_UI_UNSAFE_VERB ("CalendarToday", today_clicked),
- BONOBO_UI_UNSAFE_VERB ("CalendarNext", next_clicked),
- BONOBO_UI_UNSAFE_VERB ("CalendarGoto", goto_clicked),
-
- BONOBO_UI_UNSAFE_VERB ("ShowDayView", show_day_view_clicked),
- BONOBO_UI_UNSAFE_VERB ("ShowWorkWeekView", show_work_week_view_clicked),
- BONOBO_UI_UNSAFE_VERB ("ShowWeekView", show_week_view_clicked),
- BONOBO_UI_UNSAFE_VERB ("ShowMonthView", show_month_view_clicked),
+ BONOBO_UI_VERB ("CalendarNew", new_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarOpen", open_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarSaveAs", save_as_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
+ BONOBO_UI_VERB ("EditNewAppointment", new_appointment_cb),
+ BONOBO_UI_VERB ("CalendarPreferences", properties_cmd),
+
+ BONOBO_UI_VERB ("CalendarPrev", previous_clicked),
+ BONOBO_UI_VERB ("CalendarToday", today_clicked),
+ BONOBO_UI_VERB ("CalendarNext", next_clicked),
+ BONOBO_UI_VERB ("CalendarGoto", goto_clicked),
+
+ BONOBO_UI_VERB ("ShowDayView", show_day_view_clicked),
+ BONOBO_UI_VERB ("ShowWorkWeekView", show_work_week_view_clicked),
+ BONOBO_UI_VERB ("ShowWeekView", show_week_view_clicked),
+ BONOBO_UI_VERB ("ShowMonthView", show_month_view_clicked),
BONOBO_UI_VERB_END
};