Re: building a modular interface
I think there are some introspection annotations, so it should be possible get python bindings quite easily. I think i'll take this opportunity to teach myself C and use the libgdl libraries directly, i haven't been able to find any gobject packaged for python/vala so i'll put my efforts into that. Thanks for all the discussion, you've saved me having to rewrite something that already existed. :) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: building a modular interface
Hi, Le 27/03/2012 10:03, Lachlan a écrit : libgdl is EXACTLY what i wanted to do. after looking at ajunta it's perfect. looks like gnome team is handling it now as well http://ftp.gnome.org/pub/GNOME/sources/gdl/3.4/ Yes, GDL is still used by Anjuta and is maintained by Anjuta's team. It has been ported to GTK+3. A forked version is used in Inkscape too. There are some work done to merge both versions. I can't see it a gtk3 version of python-gdl for debian so i think i'm out of my league on this. I think there are some introspection annotations, so it should be possible get python bindings quite easily. Regards, Sébastien ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
building a modular interface
hi, I've decided to hunker down and start developing my first gtk application. I have a few questions that google hasn't really been helpful with. I know how to create and load an interface built from glade but is it possible to take a more modular approach? For example I would like to be able to load an empty window, check config file that defines how the interface looks and import the widgets into that empty window. so a default config file would be something like this in yaml: --- FooBar vbox: 3 hbox: 2 item: menu item: progress hbox: 2 vbox: 2 item: filelist item: fileinfo item: preview item: statusbar What I would then like to do; is be able to load or not load parts in any way the user feels like using this config file. That way it can be arranged easily without having to edit the entire interface. My guess is that there would be a main ui file that has the basic window and then each item is loaded from it's own config file which i think can be done with glade's Add widget as top level. I'm looking to do this all in pygobject and using xml/yaml/whatever. Is this kind of stuff possible or am i barking up the wrong tree? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: building a modular interface
Hi. First, please dont bluntly use a single Glade file to define your entire interface. I'll attach here the same tarball which I attached a couple months ago here for demonstration: lists.ximian.com/pipermail/glade-users/2012-January/005469.html With the approach described in the attached tarball, you can simply bootstrap your composite widgets into types directly so that when you create an instance it already has it's interface sub-components created. (such as a preferences dialog or item editor widget or user status thingy or whatever is relevant for your application). This is a little orthogonal to optional viewing of sub-components of your application, typically we control what components of an application are visible via the View menu, and we load/save this state along with any relevant session data (possibly to a GKeyFile) Cheers, -Tristan On Tue, Mar 27, 2012 at 12:55 PM, Lachlan lachlan...@gmail.com wrote: hi, I've decided to hunker down and start developing my first gtk application. I have a few questions that google hasn't really been helpful with. I know how to create and load an interface built from glade but is it possible to take a more modular approach? For example I would like to be able to load an empty window, check config file that defines how the interface looks and import the widgets into that empty window. so a default config file would be something like this in yaml: --- FooBar vbox: 3 hbox: 2 item: menu item: progress hbox: 2 vbox: 2 item: filelist item: fileinfo item: preview item: statusbar What I would then like to do; is be able to load or not load parts in any way the user feels like using this config file. That way it can be arranged easily without having to edit the entire interface. My guess is that there would be a main ui file that has the basic window and then each item is loaded from it's own config file which i think can be done with glade's Add widget as top level. I'm looking to do this all in pygobject and using xml/yaml/whatever. Is this kind of stuff possible or am i barking up the wrong tree? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: building a modular interface
On 27 March 2012 14:39, Tristan Van Berkom t...@gnome.org wrote: Hi. First, please dont bluntly use a single Glade file to define your entire interface. I'll attach here the same tarball which I attached a couple months ago here for demonstration: lists.ximian.com/pipermail/glade-users/2012-January/005469.html With the approach described in the attached tarball, you can simply bootstrap your composite widgets into types directly so that when you create an instance it already has it's interface sub-components created. (such as a preferences dialog or item editor widget or user status thingy or whatever is relevant for your application). Thanks, grabbed that to look through now. I haven't done more than notifications or config menus before so it's all new to me. This is a little orthogonal to optional viewing of sub-components of your application, typically we control what components of an application are visible via the View menu, and we load/save this state along with any relevant session data (possibly to a GKeyFile) I don't really want to just turn widgets on or off but just trying to find away to make vast changes to ui using something simple like a conf file. although i should learn to walk before running by the looks of it. thanks for this. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: building a modular interface
On Tue, Mar 27, 2012 at 2:10 PM, Lachlan lachlan...@gmail.com wrote: On 27 March 2012 14:39, Tristan Van Berkom t...@gnome.org wrote: Hi. First, please dont bluntly use a single Glade file to define your entire interface. I'll attach here the same tarball which I attached a couple months ago here for demonstration: lists.ximian.com/pipermail/glade-users/2012-January/005469.html With the approach described in the attached tarball, you can simply bootstrap your composite widgets into types directly so that when you create an instance it already has it's interface sub-components created. (such as a preferences dialog or item editor widget or user status thingy or whatever is relevant for your application). Thanks, grabbed that to look through now. I haven't done more than notifications or config menus before so it's all new to me. This is a little orthogonal to optional viewing of sub-components of your application, typically we control what components of an application are visible via the View menu, and we load/save this state along with any relevant session data (possibly to a GKeyFile) I don't really want to just turn widgets on or off but just trying to find away to make vast changes to ui using something simple like a conf file. although i should learn to walk before running by the looks of it. For an idea, there exists a library called gdl (gnome docking library), I'm not sure how maintained/current it is, it was used by Anjuta IDE (not sure if Anjuta is still using/maintaining that). The docking library exposed special widgetry that allows the user to place portions of the user interface into Paned windows, Notebook Tabs, or floating separately as separate toplevel windows, then that library would serialize the current state into some kind of session data (so that a user could view the Anjuta IDE in their own preferred setup). I think your use case seems to be different but the general idea the same: optionally show portions of a ui, and optionally show them in different configurations, and allow loading/saving of current configurations. However, you might consider using libgdl directly (not sure if it's ported to GTK+3 but that shouldn't be too hard to accomplish...), since that seems to be a more user friendly way to allow users to configure an application than demanding that they edit a configuration file by hand but I'm not entirely clear on what your requirements are... Cheers, -Tristan thanks for this. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list