+2009-01-26 Christian Persch <chpe@gnome.org>
+
+ * shell/ev-application.c: (ev_application_register_service),
+ (ev_application_shutdown):
+ * shell/main.c: (main): Move metadata manager initialisation and
+ shutdown into EvApplication. Follow-up from bug #569120.
+
2009-01-26 Christian Persch <chpe@gnome.org>
* shell/ev-metadata-manager.c: (ev_metadata_manager_set_string): Don't
#include "ev-application.h"
#include "ev-document-factory.h"
#include "ev-file-helpers.h"
+#include "ev-metadata-manager.h"
#include "ev-utils.h"
#ifdef ENABLE_DBUS
GObjectClass base_class;
};
+static EvApplication *instance;
+
G_DEFINE_TYPE (EvApplication, ev_application, G_TYPE_OBJECT);
#define APPLICATION_SERVICE_NAME "org.gnome.evince.ApplicationService"
G_OBJECT (application));
application->scr_saver = totem_scrsaver_new (connection);
-
+
+ ev_metadata_manager_init ();
+
return TRUE;
}
#endif /* ENABLE_DBUS */
EvApplication *
ev_application_get_instance (void)
{
- static EvApplication *instance;
-
if (!instance) {
instance = EV_APPLICATION (g_object_new (EV_TYPE_APPLICATION, NULL));
}
}
#endif /* ENABLE_DBUS */
+ ev_metadata_manager_shutdown ();
+
g_free (application->dot_dir);
application->dot_dir = NULL;
g_free (application->last_chooser_uri);
application->last_chooser_uri = NULL;
g_object_unref (application);
+ instance = NULL;
gtk_main_quit ();
}
#include "ev-backends-manager.h"
#include "ev-debug.h"
#include "ev-file-helpers.h"
-#include "ev-metadata-manager.h"
#include "ev-stock-icons.h"
#include "eggsmclient.h"
#include "eggdesktopfile.h"
{
GOptionContext *context;
GHashTable *args;
- gboolean enable_metadata = FALSE;
GError *error = NULL;
/* Init glib threads asap */
return 0;
}
- } else {
- enable_metadata = TRUE;
}
#endif /* ENABLE_DBUS */
ev_debug_init ();
ev_backends_manager_init ();
- if (enable_metadata) {
- ev_metadata_manager_init ();
- }
-
ev_file_helpers_init ();
ev_stock_icons_init ();
ev_file_helpers_shutdown ();
- if (enable_metadata) {
- ev_metadata_manager_shutdown ();
- }
-
ev_backends_manager_shutdown ();
ev_debug_shutdown ();