[Glade-users] [Fwd: Re: XML to Source Code?]
Tristan Van Berkom
tristan.van.berkom at gmail.com
Thu Feb 25 19:31:11 EST 2010
2010/2/25 José Félix Ontañón <felixonta at gmail.com>:
> El día 25 de febrero de 2010 17:39, Tristan Van Berkom
> <tristan.van.berkom at gmail.com> escribió:
>> 2010/2/25 José Félix Ontañón <felixonta at gmail.com>:
>> [...]
>>>
>>> Well Alexey, maybe my widgets are not designed for re-use them in
>>> other projects.
>>> Think about a sublclass of gtk.StatusIcon with clic-events captured
>>> and some menus, i don't think publish as a library would be
>>> interesting for no one. Don't you think?
>>>
>>
>> Hi,
>> its perfectly normal to write widgets as part of your project
>> that are not intended for distribution, i.e. they are not
>> intended for use in other projects.
>>
>> I think its even becoming a more popular coding practice
>> to encode application logic into derived screen objects, which
>> is why I would really like to add some UI magic to Glade
>> to help automate the procedure of deriving widgets to be
>> implemented in your code...
>>
>> That being said; I think the best practice for this context
>> of application-use only widgets is to simply include a catalog
>> in your project repository and distribution tarballs, probably
>> in the same directory you store your glade file(s), and you
>> might include a note somewhere about having to use
>> the GLADE_CATALOG_PATH ... (hopefully Glade will
>> eventually automatically load catalogs that the glade file
>> depends on from a relative directory or same directory).
>>
>> Cheers,
>> -Tristan
>>
>
> Thanks again Tristan, it sounds rather well.
> I use to build my own debian packages for distribute my apps too.
> I think put the catalog file under /usr/share/my_app/ with the other glade
> files it's the bet approach, isn't?
I wouldnt recommend that really; if for instance when I download and install
your module on my computer and your module installs a catalog to the
system catalog path; then I would have your widgets in my Glade palette
by virtue of having your application installed.
If your widgets are not in a library that is distributed for others to use,
then the above scenario does not make sense at all (because assuming
your widgets are provided in your app, they are useless to me in my
Glade environment).
>
> It's there a good doc to learn about GLADE_CATALOG_PATH and how
> can i include my own catalog? is an environment variable? Must my app
> include the catalog on GLADE_CATALOG_PATH when launching?
As I stated earlier in this thread; http://library.gnome.org/devel/gladeui/3.6/,
in fact I put alot of work into those docs, the entire catalog format is covered
in the first section.
... Ideally ofcourse Glade should know about a catalog that exists in a project
relative directory to the glade file its opening ... and implementing something
like that could be pretty easy considering the dependency is already
saved to the Glade
file ... but sorry for now its probably best to just remember to start
Glade with
GLADE_CATALOG_PATH set.
Cheers,
-Tristan
More information about the Glade-users
mailing list