Re: cannot launch project with glad file
- From: Florian Müllner <fmuellner gnome org>
- To: gtk-app-devel-list gnome org
- Subject: Re: cannot launch project with glad file
- Date: Fri, 14 Jan 2011 12:48:58 +0100
On Fri, 2011-01-14 at 04:36 -0500, craigbakalian wrote:
xml = glade_xml_new ("mLilyEditor.glade", NULL, NULL);
"myLilyEditor.glade" does not mean "in the same directory as the
executable" but "in the current working directory".
Usually you define a constant from your Makefile.am (e.g.
PACKAGE_DATA_DIR) and construct a full path with g_build_filename():
GladeXML *xml;
char *glade_file;
glade_file = g_build_filename (PACKAGE_DATA_DIR,
"myLilyEditor.glade",
NULL);
xml = glade_xml_new (glade_file, NULL, NULL);
g_free (glade_file);
Also note that libglade is deprecated and should not be used in new
projects - it is highly recommended that you use GtkBuilder instead (the
glade UI editor also supports that file type)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]