From e6d0aad4ecfdaa8628692571add867bd17837eda Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 3 Feb 2009 09:03:16 +0000 Subject: [PATCH] Add a getter for the main window widget Signed-off-by: Sjoerd Simons svn path=/trunk/; revision=2390 --- src/empathy-main-window.c | 9 ++++++++- src/empathy-main-window.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 3bf94a46..57872a7b 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -108,6 +108,8 @@ typedef struct { GList *widgets_connected; } EmpathyMainWindow; +static EmpathyMainWindow *window = NULL; + static void main_window_destroy_cb (GtkWidget *widget, EmpathyMainWindow *window); static void main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window); @@ -486,10 +488,15 @@ main_window_contact_presence_changed_cb (EmpathyContactMonitor *monitor, } } +GtkWidget * +empathy_main_window_get (void) +{ + return window != NULL ? window->window : NULL; +} + GtkWidget * empathy_main_window_show (void) { - static EmpathyMainWindow *window = NULL; EmpathyContactList *list_iface; EmpathyContactMonitor *monitor; GladeXML *glade; diff --git a/src/empathy-main-window.h b/src/empathy-main-window.h index 916dd242..7960c460 100644 --- a/src/empathy-main-window.h +++ b/src/empathy-main-window.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS +GtkWidget *empathy_main_window_get (void); GtkWidget *empathy_main_window_show (void); G_END_DECLS -- 2.39.2