Small change to load the .glade file from the current dir too when pressing the about...
authorWim Taymans <wim.taymans@gmail.com>
Sun, 1 Apr 2001 14:09:39 +0000 (14:09 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sun, 1 Apr 2001 14:09:39 +0000 (14:09 +0000)
Original commit message from CVS:
Small change to load the .glade file from the current dir too when
pressing the about menu item.

gstplay/callbacks.c
gstplay/gstmediaplay.glade

index 3e35234d9b64cf4dae9ec119696565c00442b632..781173f894d4085fae3b16733da79fc20c23cc53 100644 (file)
@@ -6,6 +6,9 @@
 #include <glade/glade.h>
 #include <gst/gst.h>
 
+#include <sys/stat.h>
+#include <unistd.h>
+
 #include "gstplay.h"
 #include "callbacks.h"
 
@@ -45,7 +48,15 @@ on_preferences1_activate                      (GtkMenuItem     *menuitem,
 void on_about_activate(GtkWidget *widget, gpointer data)
 {
   GladeXML *xml;
-  xml = glade_xml_new(DATADIR "gstmediaplay.glade", "about");
+  struct stat statbuf;
+
+  if (stat(DATADIR"gstmediaplay.glade", &statbuf) == 0) {
+    xml = glade_xml_new (DATADIR"gstmediaplay.glade", "about");
+  }
+  else {
+    xml = glade_xml_new ("gstmediaplay.glade", "about");
+  }
+
   /* connect the signals in the interface */
   glade_xml_signal_autoconnect(xml);
 }
index ba39ffbe16d1051079abfdfa03864e20a341400b..448409d2e0c286ab564db3bff0f67189ada21117 100644 (file)
              </signal>
              <label>_Extended</label>
              <active>False</active>
-             <always_show_toggle>False</always_show_toggle>
+             <always_show_toggle>True</always_show_toggle>
            </widget>
 
            <widget>
@@ -443,6 +443,7 @@ Ronald Bultje &lt;rbultje@ronald.bitfreak.net&gt;
       <last_modification_time>Sun, 06 Aug 2000 15:55:52 GMT</last_modification_time>
     </signal>
     <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+    <relief>GTK_RELIEF_NORMAL</relief>
   </widget>
 
   <widget>
@@ -458,6 +459,7 @@ Ronald Bultje &lt;rbultje@ronald.bitfreak.net&gt;
       <last_modification_time>Sun, 06 Aug 2000 15:53:48 GMT</last_modification_time>
     </signal>
     <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+    <relief>GTK_RELIEF_NORMAL</relief>
   </widget>
 </widget>