Commit 66741228 authored by Michael Terry's avatar Michael Terry

delay gui initialization in g-c-c panel to avoid doing too much work in...

delay gui initialization in g-c-c panel to avoid doing too much work in module_load and crashing g-c-c
parent 37137066
......@@ -389,9 +389,14 @@ void convert_s3_folder_to_hostname()
}
}
public bool meet_requirements(out string header, out string msg)
{
return DuplicityInfo.get_default().check_duplicity_version(out header, out msg);
}
public bool initialize(out string header, out string msg)
{
if (!DuplicityInfo.get_default().check_duplicity_version(out header, out msg))
if (!meet_requirements(out header, out msg))
return false;
convert_ssh_to_file();
......
......@@ -63,22 +63,31 @@ deja_dup_preferences_panel_init (DejaDupPreferencesPanel *self)
gtk_container_add (GTK_CONTAINER (self), widget);
}
static gboolean
delayed_init ()
{
deja_dup_gui_initialize(NULL, FALSE);
return FALSE;
}
void
g_io_module_load (GIOModule *module)
{
if (!deja_dup_meet_requirements(NULL, NULL))
return;
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
GtkIconTheme *theme = gtk_icon_theme_get_default ();
gtk_icon_theme_append_search_path (theme, THEME_DIR);
if (!deja_dup_gui_initialize(NULL, FALSE))
return;
deja_dup_preferences_panel_register_type (G_TYPE_MODULE (module));
g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
DEJA_DUP_TYPE_PREFERENCES_PANEL,
"deja-dup", 0);
g_idle_add(delayed_init, NULL);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment