]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-ui-utils.c
Updatre python binding
[empathy.git] / libempathy-gtk / empathy-ui-utils.c
index 23875f7220a43052cd49c7c41c91d434bc58ab94..80dcd42275f98a8c581f53add638813116cc1466 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  * Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
+ * Copyright (C) 2007-2008 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -53,15 +53,20 @@ struct SizeData {
        gboolean preserve_aspect_ratio;
 };
 
-GladeXML *
-empathy_glade_get (const gchar *filename,
-                  const gchar *root,
-                  const gchar *domain)
+static GladeXML *
+get_glade_file (const gchar *filename,
+               const gchar *root,
+               const gchar *domain,
+               const gchar *first_required_widget,
+               va_list      args)
 {
-       GladeXML *gui;
-       gchar    *path;
+       GladeXML   *gui;
+       gchar      *path;
+       const char *name;
+       GtkWidget **widget_ptr;
 
-       path = g_build_filename (UNINSTALLED_GLADE_DIR, filename, NULL);
+       path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "libempathy-gtk",
+                                filename, NULL);
        if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
                g_free (path);
                path = g_build_filename (DATADIR, "empathy", filename, NULL);
@@ -75,22 +80,6 @@ empathy_glade_get (const gchar *filename,
                g_warning ("Couldn't find necessary glade file '%s'", filename);
        }
 
-       return gui;
-}
-
-static GladeXML *
-get_glade_file (const gchar *filename,
-               const gchar *root,
-               const gchar *domain,
-               const gchar *first_required_widget,
-               va_list      args)
-{
-       GladeXML   *gui;
-       const char *name;
-       GtkWidget **widget_ptr;
-
-       gui = empathy_glade_get (filename, root, domain);
-
        for (name = first_required_widget; name; name = va_arg (args, char *)) {
                widget_ptr = va_arg (args, void *);
 
@@ -1285,6 +1274,9 @@ empathy_window_present (GtkWindow *window,
        timestamp = gtk_get_current_event_time ();
        gtk_window_set_skip_taskbar_hint (window, FALSE);
        gtk_window_present_with_time (window, timestamp);
+       /* FIXME: This shouldn't be required as gtk_window_present's doc says
+        *        it deiconify automatically. */
+       gtk_window_deiconify (window);
 }
 
 GtkWindow *