Small change to load the .glade file from the current dir too when pressing the about menu item.

Original commit message from CVS:
Small change to load the .glade file from the current dir too when
pressing the about menu item.
This commit is contained in:
Wim Taymans 2001-04-01 14:09:39 +00:00
parent 44a7a49146
commit d7d417af45
2 changed files with 15 additions and 2 deletions

View 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);
}

View file

@ -148,7 +148,7 @@
</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>