aboutsummaryrefslogtreecommitdiffstats
path: root/modules/backup-restore/e-mail-config-restore-ready-page.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-03-26 06:19:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-03 11:00:41 +0800
commitcd3759369b675e754dbed5ba19894cdd87a63a88 (patch)
tree3eaca93bd8630675c57896da239f5ade32300e40 /modules/backup-restore/e-mail-config-restore-ready-page.c
parent71f5369ebfe5ee1d06b0bd1936cca80abc58e60a (diff)
downloadgsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar.gz
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar.bz2
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar.lz
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar.xz
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.tar.zst
gsoc2013-evolution-cd3759369b675e754dbed5ba19894cdd87a63a88.zip
Add 'backup-restore' module.
Replaces the 'backup-restore' plugin.
Diffstat (limited to 'modules/backup-restore/e-mail-config-restore-ready-page.c')
-rw-r--r--modules/backup-restore/e-mail-config-restore-ready-page.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/modules/backup-restore/e-mail-config-restore-ready-page.c b/modules/backup-restore/e-mail-config-restore-ready-page.c
new file mode 100644
index 0000000000..2827e67e5b
--- /dev/null
+++ b/modules/backup-restore/e-mail-config-restore-ready-page.c
@@ -0,0 +1,80 @@
+/*
+ * e-mail-config-restore-ready-page.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+/* NOTE: This page is never actually shown to the user. It works as a
+ * placeholder, visible only when the user chooses a backup file
+ * to restore. As soon as we arrive on this page we execl() the
+ * "evolution-backup" tool, and the startup wizard disappears. */
+
+#include "e-mail-config-restore-ready-page.h"
+
+#include <config.h>
+#include <glib/gi18n-lib.h>
+
+/* Forward Declarations */
+static void e_mail_config_restore_ready_page_interface_init
+ (EMailConfigPageInterface *interface);
+
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (
+ EMailConfigRestoreReadyPage,
+ e_mail_config_restore_ready_page,
+ GTK_TYPE_BOX,
+ 0,
+ G_IMPLEMENT_INTERFACE_DYNAMIC (
+ E_TYPE_MAIL_CONFIG_PAGE,
+ e_mail_config_restore_ready_page_interface_init))
+
+static void
+e_mail_config_restore_ready_page_class_init (EMailConfigRestoreReadyPageClass *class)
+{
+}
+
+static void
+e_mail_config_restore_ready_page_class_finalize (EMailConfigRestoreReadyPageClass *class)
+{
+}
+
+static void
+e_mail_config_restore_ready_page_interface_init (EMailConfigPageInterface *interface)
+{
+ /* Keep the title identical to EMailConfigRestorePage
+ * so it's only shown once in the assistant sidebar. */
+ interface->title = _("Restore from Backup");
+ interface->sort_order = E_MAIL_CONFIG_RESTORE_READY_PAGE_SORT_ORDER;
+}
+
+static void
+e_mail_config_restore_ready_page_init (EMailConfigRestoreReadyPage *page)
+{
+}
+
+void
+e_mail_config_restore_ready_page_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_mail_config_restore_ready_page_register_type (type_module);
+}
+
+EMailConfigPage *
+e_mail_config_restore_ready_page_new (void)
+{
+ return g_object_new (E_TYPE_MAIL_CONFIG_RESTORE_READY_PAGE, NULL);
+}
+