+2006-05-09 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * pdf/ev-poppler.cc:
+ * shell/ev-application.[ch]:
+ * shell/main.c:
+
+ Fix some memory leaks.
+
2006-05-09 Wouter Bolsterlee <uws+gnome@xs4all.nl>
* shell/ev-properties-dialog.c: (ev_properties_dialog_init):
if (child)
build_tree (pdf_document, model, &tree_iter, child);
poppler_index_iter_free (child);
+ poppler_action_free (action);
} while (poppler_index_iter_next (iter));
}
G_DEFINE_TYPE (EvApplication, ev_application, G_TYPE_OBJECT);
-#define EV_APPLICATION_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_APPLICATION, EvApplicationPrivate))
-
#define APPLICATION_SERVICE_NAME "org.gnome.evince.ApplicationService"
#ifdef ENABLE_DBUS
gboolean
ev_application_register_service (EvApplication *application)
{
- DBusGConnection *connection;
+ static DBusGConnection *connection = NULL;
DBusGProxy *driver_proxy;
GError *err = NULL;
guint request_name_result;
+ if (connection) {
+ g_warning ("Service already registered.");
+ return FALSE;
+ }
+
connection = dbus_g_bus_get (DBUS_BUS_STARTER, &err);
if (connection == NULL) {
g_warning ("Service registration failed.");
}
#endif
+ g_object_unref (driver_proxy);
+
if (request_name_result == DBUS_REQUEST_NAME_REPLY_EXISTS) {
return FALSE;
}
g_object_unref (application->recent_model);
application->recent_model = NULL;
}
-
+
g_free (application->last_chooser_uri);
g_object_unref (application);
typedef struct _EvApplication EvApplication;
typedef struct _EvApplicationClass EvApplicationClass;
-typedef struct _EvApplicationPrivate EvApplicationPrivate;
#define EV_TYPE_APPLICATION (ev_application_get_type ())
#define EV_APPLICATION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_APPLICATION, EvApplication))
if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) {
g_warning (error->message);
g_clear_error (&error);
+ g_object_unref (remote_object);
+ dbus_g_connection_unref (connection);
return FALSE;
}
#elif DBUS_VERSION == 34
if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) {
g_warning (error->message);
g_clear_error (&error);
+ g_object_unref (remote_object);
+ dbus_g_connection_unref (connection);
return FALSE;
}
#else
G_TYPE_INVALID)) {
g_warning (error->message);
g_clear_error (&error);
+ g_object_unref (remote_object);
+ dbus_g_connection_unref (connection);
return FALSE;
}
#endif
+ g_object_unref (remote_object);
+ dbus_g_connection_unref (connection);
+
return TRUE;
}
result = TRUE;
}
+ g_object_unref (remote_object);
+ dbus_g_connection_unref (connection);
+
gdk_notify_startup_complete ();
return result;