aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-12 12:12:01 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-12 12:12:01 +0800
commitc7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8 (patch)
tree246bdb714e24e1b0c9a8ce4a3e45a46b230316de /calendar/gui/dialogs
parentf8b33bc4ebe9dd8043674141b5fe4660efaa99e8 (diff)
downloadgsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.gz
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.bz2
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.lz
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.xz
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.zst
gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.zip
Merge revisions 36866:37046 from trunk.
svn path=/branches/kill-bonobo/; revision=37050
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c2
-rw-r--r--calendar/gui/dialogs/cal-attachment-select-file.c1
-rw-r--r--calendar/gui/dialogs/cancel-comp.c1
-rw-r--r--calendar/gui/dialogs/changed-comp.c1
-rw-r--r--calendar/gui/dialogs/comp-editor.c53
-rw-r--r--calendar/gui/dialogs/delete-error.c1
-rw-r--r--calendar/gui/dialogs/event-editor.c15
-rw-r--r--calendar/gui/dialogs/memo-editor.c22
-rw-r--r--calendar/gui/dialogs/recur-comp.c1
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2
-rw-r--r--calendar/gui/dialogs/schedule-page.c1
11 files changed, 78 insertions, 22 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 7e429a28b2..bf78f70011 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -642,7 +642,7 @@ populate_widgets_from_alarm (Dialog *dialog)
/* Alarm options */
e_dialog_option_menu_set (dialog->action, *action, action_map);
- action_selection_done_cb (GTK_MENU_SHELL (dialog->action), dialog);
+ action_selection_done_cb (GTK_MENU_SHELL (gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action))), dialog);
switch (*action) {
case E_CAL_COMPONENT_ALARM_AUDIO:
diff --git a/calendar/gui/dialogs/cal-attachment-select-file.c b/calendar/gui/dialogs/cal-attachment-select-file.c
index 8d968a84a9..5de8ea669b 100644
--- a/calendar/gui/dialogs/cal-attachment-select-file.c
+++ b/calendar/gui/dialogs/cal-attachment-select-file.c
@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-uidefs.h>
#include <glib/gi18n.h>
#include "cal-attachment-select-file.h"
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index 547f70348e..2548d5ba2d 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libgnomeui/gnome-uidefs.h>
#include "e-util/e-error.h"
#include "cancel-comp.h"
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index ae215463be..9a0665d763 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -27,7 +27,6 @@
#endif
#include <glib/gi18n.h>
-#include <libgnomeui/gnome-uidefs.h>
#include "changed-comp.h"
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 3b7f2c5385..5d9298cd18 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -26,15 +26,15 @@
#include <config.h>
#endif
+#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <gdk/gdkkeysyms.h>
-#include <libgnome/libgnome.h>
#include <e-util/e-util.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
@@ -163,6 +163,7 @@ static const gchar *ui =
" <toolitem action='close'/>"
" <separator/>"
" <toolitem action='attach'/>"
+" <separator/>"
" </toolbar>"
"</ui>";
@@ -1111,6 +1112,24 @@ action_print_preview_cb (GtkAction *action,
g_object_unref (comp);
}
+static gboolean
+remove_event_dialog (ECal *client,
+ ECalComponent *comp,
+ GtkWindow *parent)
+{
+ GtkWidget *dialog;
+ gboolean ret;
+
+ g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), TRUE);
+
+ dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _("Keep original item?"));
+ gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
+ ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES;
+ gtk_widget_destroy (dialog);
+
+ return ret;
+}
+
static void
action_save_cb (GtkAction *action,
CompEditor *editor)
@@ -1162,9 +1181,33 @@ action_save_cb (GtkAction *action,
if (!text.value)
if (!send_component_prompt_subject ((GtkWindow *) editor, priv->client, priv->comp))
return;
- if (save_comp_with_send (editor))
- close_dialog (editor);
+ if (save_comp_with_send (editor)) {
+ CompEditorFlags flags;
+ gboolean delegate;
+
+ flags = comp_editor_get_flags (editor);
+ delegate = flags & COMP_EDITOR_DELEGATE;
+
+ if (delegate && !remove_event_dialog (priv->client, priv->comp, GTK_WINDOW (editor))) {
+ const char *uid = NULL;
+ GError *error = NULL;
+
+ e_cal_component_get_uid (priv->comp, &uid);
+
+ if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) {
+ gchar *rid;
+ rid = e_cal_component_get_recurid_as_string (priv->comp);
+ e_cal_remove_object_with_mod (priv->client, uid, rid, priv->mod, &error);
+ g_free (rid);
+ } else
+ e_cal_remove_object (priv->client, uid, &error);
+
+ g_clear_error (&error);
+ }
+ }
+
+ close_dialog (editor);
}
static void
@@ -2410,6 +2453,7 @@ comp_editor_set_summary (CompEditor *editor,
show_warning =
!editor->priv->warned &&
+ !(editor->priv->flags & COMP_EDITOR_DELEGATE) &&
editor->priv->existing_org &&
!editor->priv->user_org;
@@ -2458,6 +2502,7 @@ comp_editor_set_changed (CompEditor *editor,
show_warning =
changed && !editor->priv->warned &&
+ !(editor->priv->flags & COMP_EDITOR_DELEGATE) &&
editor->priv->existing_org && !editor->priv->user_org;
if (show_warning) {
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index d42ef1af91..b151ef8068 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libgnomeui/gnome-uidefs.h>
#include "delete-error.h"
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 2a4883cdfd..ef94f631d0 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -78,20 +78,21 @@ static const gchar *ui =
" <menu action='options-menu'>"
" <menuitem action='alarms'/>"
" <menuitem action='show-time-busy'/>"
+" <menuitem action='recurrence'/>"
" <menuitem action='all-day-event'/>"
+" <menuitem action='free-busy'/>"
" <menu action='classification-menu'>"
" <menuitem action='classify-public'/>"
" <menuitem action='classify-private'/>"
" <menuitem action='classify-confidential'/>"
" </menu>"
-" <menuitem action='recurrence'/>"
-" <menuitem action='free-busy'/>"
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
" <toolitem action='alarms'/>"
-" <toolitem action='all-day-event'/>"
+" <toolitem action='show-time-busy'/>"
" <toolitem action='recurrence'/>"
+" <toolitem action='all-day-event'/>"
" <toolitem action='free-busy'/>"
" </toolbar>"
"</ui>";
@@ -148,9 +149,15 @@ action_all_day_event_cb (GtkToggleAction *action,
EventEditor *editor)
{
gboolean active;
+ GtkAction *action_show_busy;
+ CompEditor *comp_editor = COMP_EDITOR (editor);
active = gtk_toggle_action_get_active (action);
event_page_set_all_day_event (editor->priv->event_page, active);
+
+ action_show_busy = comp_editor_get_action (comp_editor, "show-time-busy");
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action_show_busy), !active);
+ event_page_set_show_time_busy (editor->priv->event_page, !active);
}
static void
@@ -222,7 +229,7 @@ static GtkToggleActionEntry event_toggle_entries[] = {
FALSE },
{ "show-time-busy",
- NULL,
+ GTK_STOCK_DIALOG_ERROR,
N_("Show Time as _Busy"),
NULL,
N_("Toggles whether to show time as busy"),
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
index c76c96b94c..90c77f2349 100644
--- a/calendar/gui/dialogs/memo-editor.c
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -96,6 +96,21 @@ memo_editor_dispose (GObject *object)
}
static void
+memo_editor_constructed (GObject *object)
+{
+ MemoEditorPrivate *priv;
+ CompEditor *editor;
+
+ priv = MEMO_EDITOR_GET_PRIVATE (object);
+ editor = COMP_EDITOR (object);
+
+ priv->memo_page = memo_page_new (editor);
+ comp_editor_append_page (
+ editor, COMP_EDITOR_PAGE (priv->memo_page),
+ _("Memo"), TRUE);
+}
+
+static void
memo_editor_class_init (MemoEditorClass *class)
{
GObjectClass *object_class;
@@ -105,6 +120,7 @@ memo_editor_class_init (MemoEditorClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->dispose = memo_editor_dispose;
+ object_class->constructed = memo_editor_constructed;
/* TODO Add a help section for memos. */
editor_class = COMP_EDITOR_CLASS (class);
@@ -131,12 +147,6 @@ memo_editor_init (MemoEditor *me)
g_critical ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
}
-
- me->priv->memo_page = memo_page_new (editor);
- comp_editor_append_page (
- COMP_EDITOR (me),
- COMP_EDITOR_PAGE (me->priv->memo_page),
- _("Memo"), TRUE);
}
/**
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index e90cfd237f..e57c0c8aa7 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -27,7 +27,6 @@
#endif
#include <glib/gi18n.h>
-#include <libgnomeui/gnome-uidefs.h>
#include "recur-comp.h"
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 6c879ae8e3..8a93c4dfee 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -1377,7 +1377,7 @@ make_ending_count_special (RecurrencePage *rpage)
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (priv->ending_special), hbox);
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 10));
+ adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 0));
priv->ending_count_spin = gtk_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric ((GtkSpinButton *)priv->ending_count_spin, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), priv->ending_count_spin,
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 534923a853..e1137be3a0 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -31,7 +31,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libgnomeui/gnome-dialog-util.h>
#include <glade/glade.h>
#include <e-util/e-dialog-widgets.h>
#include <e-util/e-util-private.h>