]> git.0d.be Git - empathy.git/commitdiff
Add a getter for the main window widget
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 3 Feb 2009 09:03:16 +0000 (09:03 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 3 Feb 2009 09:03:16 +0000 (09:03 +0000)
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2390

src/empathy-main-window.c
src/empathy-main-window.h

index 3bf94a46dfec1bea3025b3f76ad6317e1ab26f25..57872a7b51143c2d232b6db4895760b348e31b09 100644 (file)
@@ -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;
index 916dd242fae204a042e32488602bbfb56325f2a2..7960c460cb44c55cabe10e4f2c15377462fe51d1 100644 (file)
@@ -28,6 +28,7 @@
 
 G_BEGIN_DECLS
 
+GtkWidget *empathy_main_window_get (void);
 GtkWidget *empathy_main_window_show (void);
 
 G_END_DECLS