aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-17 18:15:48 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-17 21:47:39 +0800
commit9cae8fb44d9d76ad88d09527f48192dffba57711 (patch)
treedd0e01a1824962f484d7f2ada0980177a13e3716
parent382bb4914eb08c7c1472350633b1fe91bba50c05 (diff)
downloadgsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar.gz
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar.bz2
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar.lz
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar.xz
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.tar.zst
gsoc2013-empathy-9cae8fb44d9d76ad88d09527f48192dffba57711.zip
rename empathy_theme_manager_get() to empathy_theme_manager_dup_singleton()
We also don't leak it any more.
-rw-r--r--libempathy-gtk/empathy-chat.c5
-rw-r--r--libempathy-gtk/empathy-log-window.c7
-rw-r--r--libempathy-gtk/empathy-theme-manager.c2
-rw-r--r--libempathy-gtk/empathy-theme-manager.h2
4 files changed, 11 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index f68e1cc83..2f374cd62 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -2570,6 +2570,7 @@ chat_create_ui (EmpathyChat *chat)
gchar *filename;
GtkTextBuffer *buffer;
gint paned_pos;
+ EmpathyThemeManager *theme_mgr;
filename = empathy_file_lookup ("empathy-chat.ui",
"libempathy-gtk");
@@ -2594,7 +2595,9 @@ chat_create_ui (EmpathyChat *chat)
g_free (filename);
/* Add message view. */
- chat->view = empathy_theme_manager_create_view (empathy_theme_manager_get ());
+ theme_mgr = empathy_theme_manager_dup_singleton ();
+ chat->view = empathy_theme_manager_create_view (theme_mgr);
+ g_object_unref (theme_mgr);
/* If this is a GtkTextView, it's set as a drag destination for text/plain
and other types, even though it's non-editable and doesn't accept any
drags. This steals drag motion for anything inside the scrollbars,
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 650c3b442..d3f566777 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -223,6 +223,7 @@ empathy_log_window_show (TpAccount *account,
GtkBuilder *gui;
gchar *filename;
EmpathyLogWindow *window;
+ EmpathyThemeManager *theme_mgr;
if (log_window != NULL) {
gtk_window_present (GTK_WINDOW (log_window->window));
@@ -286,16 +287,18 @@ empathy_log_window_show (TpAccount *account,
window);
/* Configure Search EmpathyChatView */
- window->chatview_find = empathy_theme_manager_create_view (empathy_theme_manager_get ());
+ theme_mgr = empathy_theme_manager_dup_singleton ();
+ window->chatview_find = empathy_theme_manager_create_view (theme_mgr);
gtk_container_add (GTK_CONTAINER (window->scrolledwindow_find),
GTK_WIDGET (window->chatview_find));
gtk_widget_show (GTK_WIDGET (window->chatview_find));
/* Configure Contacts EmpathyChatView */
- window->chatview_chats = empathy_theme_manager_create_view (empathy_theme_manager_get ());
+ window->chatview_chats = empathy_theme_manager_create_view (theme_mgr);
gtk_container_add (GTK_CONTAINER (window->scrolledwindow_chats),
GTK_WIDGET (window->chatview_chats));
gtk_widget_show (GTK_WIDGET (window->chatview_chats));
+ g_object_unref (theme_mgr);
/* Account chooser for chats */
window->account_chooser_chats = empathy_account_chooser_new ();
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index bcad60538..a5438c6b3 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -523,7 +523,7 @@ empathy_theme_manager_init (EmpathyThemeManager *manager)
}
EmpathyThemeManager *
-empathy_theme_manager_get (void)
+empathy_theme_manager_dup_singleton (void)
{
static EmpathyThemeManager *manager = NULL;
diff --git a/libempathy-gtk/empathy-theme-manager.h b/libempathy-gtk/empathy-theme-manager.h
index a459b43cb..c60dc0cd9 100644
--- a/libempathy-gtk/empathy-theme-manager.h
+++ b/libempathy-gtk/empathy-theme-manager.h
@@ -49,7 +49,7 @@ struct _EmpathyThemeManagerClass {
};
GType empathy_theme_manager_get_type (void) G_GNUC_CONST;
-EmpathyThemeManager * empathy_theme_manager_get (void);
+EmpathyThemeManager * empathy_theme_manager_dup_singleton (void);
const gchar ** empathy_theme_manager_get_themes (void);
GList * empathy_theme_manager_get_adium_themes (void);
EmpathyChatView * empathy_theme_manager_create_view (EmpathyThemeManager *manager);