GTK:
Try loading the glade file from the source folder to allow running gvbam without installing it
This commit is contained in:
parent
ccfed5c1c3
commit
c71336cc3b
|
@ -91,10 +91,18 @@ int main(int argc, char * argv[])
|
|||
|
||||
Gtk::Window::set_default_icon_name("vbam");
|
||||
|
||||
// Use the glade file from the source folder if it exists
|
||||
// to make gvbam runnable without installation
|
||||
std::string sGladeFile = "src/gtk/vba.glade";
|
||||
if (!Glib::file_test(sGladeFile, Glib::FILE_TEST_EXISTS))
|
||||
{
|
||||
sGladeFile = PKGDATADIR "/vba.glade";
|
||||
}
|
||||
|
||||
Glib::RefPtr<Xml> poXml;
|
||||
try
|
||||
{
|
||||
poXml = Xml::create(PKGDATADIR "/vba.glade", "MainWindow");
|
||||
poXml = Xml::create(sGladeFile, "MainWindow");
|
||||
}
|
||||
catch (const Xml::Error & e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue