aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-06 23:20:46 +0800
committerMilan Crha <mcrha@redhat.com>2012-11-06 23:21:37 +0800
commit704b78d23bf8d707707411608a3453250f2637a1 (patch)
tree6bea89936534973c9b467503d198245f5035bc77 /shell
parentb6fddaaa0efb8013c526f00926830b9cdcbe0d60 (diff)
downloadgsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.gz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.bz2
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.lz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.xz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.zst
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.zip
Replace deprecated GLib symbols (as of GLib 2.34.x)
Diffstat (limited to 'shell')
-rw-r--r--shell/e-convert-local-mail.c4
-rw-r--r--shell/e-shell.c25
2 files changed, 9 insertions, 20 deletions
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c
index 8a726f8a99..7e94ee7175 100644
--- a/shell/e-convert-local-mail.c
+++ b/shell/e-convert-local-mail.c
@@ -190,6 +190,7 @@ migrate_mbox_to_maildir (EShell *shell,
const gchar *mbox_uid;
gchar *path;
struct MigrateStore ms;
+ GThread *thread;
GError *error = NULL;
registry = e_shell_get_registry (shell);
@@ -255,12 +256,13 @@ migrate_mbox_to_maildir (EShell *shell,
ms.session = session;
ms.complete = FALSE;
- g_thread_create ((GThreadFunc) migrate_stores, &ms, TRUE, NULL);
+ thread = g_thread_new (NULL, (GThreadFunc) migrate_stores, &ms);
while (!ms.complete)
g_main_context_iteration (NULL, TRUE);
g_object_unref (mbox_service);
g_object_unref (maildir_service);
+ g_thread_unref (thread);
return TRUE;
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 3440df7bbf..2f7cdcc8b5 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -52,7 +52,6 @@ struct _EShellPrivate {
GQueue alerts;
EShellSettings *settings;
ESourceRegistry *registry;
- GActionGroup *action_group;
GtkWidget *preferences_window;
/* Shell Backends */
@@ -238,19 +237,18 @@ shell_action_quit_cb (GSimpleAction *action,
static void
shell_add_actions (GApplication *application)
{
- EShell *shell;
- GSimpleActionGroup *action_group;
+ GActionMap *action_map;
GSimpleAction *action;
- /* Add actions that remote instances can invoke. */
+ action_map = G_ACTION_MAP (application);
- action_group = g_simple_action_group_new ();
+ /* Add actions that remote instances can invoke. */
action = g_simple_action_new ("new-window", G_VARIANT_TYPE_STRING);
g_signal_connect (
action, "activate",
G_CALLBACK (shell_action_new_window_cb), application);
- g_simple_action_group_insert (action_group, G_ACTION (action));
+ g_action_map_add_action (action_map, G_ACTION (action));
g_object_unref (action);
action = g_simple_action_new (
@@ -258,21 +256,15 @@ shell_add_actions (GApplication *application)
g_signal_connect (
action, "activate",
G_CALLBACK (shell_action_handle_uris_cb), application);
- g_simple_action_group_insert (action_group, G_ACTION (action));
+ g_action_map_add_action (action_map, G_ACTION (action));
g_object_unref (action);
action = g_simple_action_new ("quit", NULL);
g_signal_connect (
action, "activate",
G_CALLBACK (shell_action_quit_cb), application);
- g_simple_action_group_insert (action_group, G_ACTION (action));
+ g_action_map_add_action (action_map, G_ACTION (action));
g_object_unref (action);
-
- shell = E_SHELL (application);
- shell->priv->action_group = G_ACTION_GROUP (action_group);
-
- g_application_set_action_group (
- application, shell->priv->action_group);
}
static void
@@ -721,11 +713,6 @@ shell_dispose (GObject *object)
priv->registry = NULL;
}
- if (priv->action_group != NULL) {
- g_object_unref (priv->action_group);
- priv->action_group = NULL;
- }
-
if (priv->preferences_window != NULL) {
g_object_unref (priv->preferences_window);
priv->preferences_window = NULL;