aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/comp-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-04-20 02:53:33 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-04-20 02:53:33 +0800
commit64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6 (patch)
tree4ebe95239bef43cb97c0e46aa8194d44e6c88be6 /calendar/gui/dialogs/comp-editor.c
parentbb05f6e6d0541bf29c8dde4e264cc7c23ba52fbb (diff)
downloadgsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.gz
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.bz2
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.lz
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.xz
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.zst
gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.zip
Massive code cleanup (bug #429422)
svn path=/trunk/; revision=33432
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r--calendar/gui/dialogs/comp-editor.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index d74c23daef..0cd25deef7 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -814,15 +814,17 @@ save_comp (CompEditor *editor)
}
if (!result) {
- GtkWidget *dlg;
- char *msg;
+ GtkWidget *dialog;
- msg = g_strdup (error ? error->message : _("Could not update object"));
+ dialog = gtk_message_dialog_new (
+ NULL, 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s", (error != NULL) ? error->message :
+ _("Could not update object"));
+ gtk_dialog_run (GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
- dlg = gnome_error_dialog (msg);
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
-
- g_free (msg);
if (error)
g_error_free (error);
@@ -2093,7 +2095,7 @@ comp_editor_show_page (CompEditor *editor, CompEditorPage *page)
page_widget = comp_editor_page_get_widget (page);
page_num = gtk_notebook_page_num (priv->notebook, page_widget);
- gtk_notebook_set_page (priv->notebook, page_num);
+ gtk_notebook_set_current_page (priv->notebook, page_num);
}
/**
@@ -2964,10 +2966,17 @@ obj_modified_cb (ECal *client, GList *objects, gpointer data)
if (e_cal_component_set_icalcomponent (comp, icalcomp)) {
comp_editor_edit_comp (editor, comp);
} else {
- GtkWidget *dlg;
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (
+ NULL, 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s",
+ _("Unable to use current version!"));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
- dlg = gnome_error_dialog (_("Unable to use current version!"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
icalcomponent_free (icalcomp);
}