Ok, wait... :-)
Glade is not automatically interactive. Glade is only a XML description and a lib to build GTK interfaces.
Autoglade is a script to automagically build a GTK window from a glade file and add interaction based on the names given to the widgets.
You don't need to know glade+python or gtk+python to use autoglade.
So, there are two interesting ways to use it for extensions: 1- correct autoglade code and include it on a extension code. This extension will not to use a inkscape dialog based on INX. All will be done by a autoglade dialog. 2- re-implement the autoglade idea inside inkscape using the libGlade and allows any extension to use a rich interface based on a glade file.
if you are a C++ programmer i vote on "2"! :-)
Aurium
On Tue, Nov 23, 2010 at 10:42 AM, Pieter Barendrecht <pieter@...2481...> wrote:
Hmm, I just figured out how to work with Glade and Python together. I'm not sure why I need Autoglade though, because the mentioned Examples can be easily implemented using just Glade:
... def ExampleData(self,widget): index = self.wTree.get_widget("Examples").get_active(); if index == 0: self.wTree.get_widget("windowMain").set_title("Pythagorean Tree") self.wTree.get_widget("Field1").set_text("60") self.wTree.get_widget("Field2").set_text("45") ...
However, I've yet to find out how to link the above Python script to Inkscape. For those who aren't familiar with Glade/Python, the Python script calls the GUI defined in the Glade file. So via a terminal, the GUI appears by typing "python Examples.py". Somehow the Python file needs a link to the Inkscape Canvas. I hope somebody has some spare time to join me in creating interactive dialogs!
Best regards, Pieter
On 11/22/2010 10:44 PM, Aurélio A. Heckert wrote:
On Mon, Nov 22, 2010 at 10:52 AM, Pieter Barendrecht<pieter@...2481...> wrote:
Hi Aurium,
Thanks for your support. I tried to install Autoglade (on Ubuntu 10.04), however the Package Installer complains about "Dependency is not satisfiable: python-xml". I found on Google that this package may be unstable and is obsolete, and therefore removed from the repo. I didn't have time yet to look into the source how to fix this.
Ho... Will be good you to fix an test this! Than you will see how good is the idea.
Back to the original question. If I understand correctly, it is not possible to create an interactive dialog using the RelaxNG schema language (used for the xml in the INX files)?
May be... but i think that will be a bad approach. The glade syntax can do better dialogs, and with some code that will be more "smart".
Pieter