2007-05-19 Jorn Baayen <jorn@openedhand.com>
authorJorn Baayen <jorn@openedhand.com>
Sat, 19 May 2007 20:50:03 +0000 (20:50 +0000)
committerJorn Baayen <jorn@openedhand.com>
Sat, 19 May 2007 20:50:03 +0000 (20:50 +0000)
* tools/gssdp-device-sniffer.glade:

Fix about box closing.

2007-05-19  Zeeshan Ali  <zeenix@gstreamer.net>

* tools/gssdp-device-sniffer.c: (init_ui):

device-sniffer should test of the existance of the glade file itself,
to avoid warning messages from libglade.

git-svn-id: https://svn.o-hand.com/repos/gupnp/trunk/gssdp@216 d8cb91d7-bff9-0310-92b9-80b65e4482b2

ChangeLog
tools/gssdp-device-sniffer.c
tools/gssdp-device-sniffer.glade

index 6c8095f..f6e7d09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-05-19  Jorn Baayen  <jorn@openedhand.com>
+
+       * tools/gssdp-device-sniffer.glade:
+
+       Fix about box closing.
+
+2007-05-19  Zeeshan Ali  <zeenix@gstreamer.net>
+
+       * tools/gssdp-device-sniffer.c: (init_ui):
+
+       device-sniffer should test of the existance of the glade file itself,
+       to avoid warning messages from libglade.
+
 2007-05-16  Zeeshan Ali  <zeenix@gstreamer.net>
 
        * tools/gssdp-device-sniffer.c: (append_device),
index da19462..d3d9fb8 100644 (file)
@@ -557,20 +557,29 @@ init_ui (gint *argc, gchar **argv[])
 {
         GtkWidget *main_window;
         gint window_width, window_height;
+        gchar *glade_path = NULL;
         
         gtk_init (argc, argv);
         glade_init ();
 
         /* Try to fetch the glade file from the CWD first */
-        glade_xml = glade_xml_new (GLADE_FILE, NULL, NULL); 
-        if (glade_xml == NULL) {
+        glade_path = GLADE_FILE;
+        if (!g_file_test (glade_path, G_FILE_TEST_EXISTS)) {
                 /* Then Try to fetch it from the system path */
-                glade_xml = glade_xml_new (UI_DIR "/" GLADE_FILE, NULL, NULL);
-                if (glade_xml == NULL) {
-                        g_error ("Unable to load the GUI file %s", GLADE_FILE);
-                        return FALSE;
-                }
+                glade_path = UI_DIR "/" GLADE_FILE;
+
+                if (!g_file_test (glade_path, G_FILE_TEST_EXISTS))
+                        glade_path = NULL;
         }
+        
+        if (glade_path == NULL) {
+                g_critical ("Unable to load the GUI file %s", GLADE_FILE);
+                return FALSE;
+        }
+
+        glade_xml = glade_xml_new (glade_path, NULL, NULL); 
+        if (glade_xml == NULL)
+                return FALSE;
 
         main_window = glade_xml_get_widget (glade_xml, "main-window");
         g_assert (main_window != NULL);
index 72d12da..50ad413 100644 (file)
@@ -279,7 +279,7 @@ Inspired by Intel Tools for UPnP.</property>
   <property name="wrap_license">False</property>
   <property name="authors">Zeeshan Ali &lt;zeenix@gstreamer.net&gt;</property>
   <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
-  <signal name="close" handler="gtk_widget_hide" object="about-dialog" last_modification_time="Tue, 15 May 2007 21:16:34 GMT"/>
+  <signal name="response" handler="gtk_widget_hide" object="about-dialog" last_modification_time="Sat, 19 May 2007 20:52:15 GMT"/>
   <signal name="delete_event" handler="gtk_widget_hide" object="about-dialog" last_modification_time="Tue, 15 May 2007 21:17:51 GMT"/>
 </widget>