Re: Real life example for GDL



Sorry, I have forget the attached file.

On Thu, 17 Sep 2009 09:14:59 +0200, Nicolas Joseph
<gege2061 redaction-developpez com> wrote:
Hello, 

I try to create a dockable application with GDL, but it doesn't
works. 

The code for populate the main application window: 

 private void
populate_window ()
 {
 Gdl.Dock dock;
 Gtk.HBox hbox;
 Gdl.DockItem item;

Gtk.VBox main_box;
 Gdl.DockBar dockbar;
 Gdl.DockLayout layout;

 main_box
= new Gtk.VBox (false, 0);
 this.add (main_box);

 main_box.pack_start
(this.menu, false, true, 0);
 main_box.pack_start (this.toolbar, false,
true, 0);
 this.fullscreen_toolbar = new FullscreenToolbar (this);

 hbox =
new Gtk.HBox (false, 0);
 main_box.pack_start (hbox, true, true, 0);


dockbar = new Gdl.DockBar ();
 dockbar.set_style (Gdl.DockBarStyle.TEXT);

hbox.pack_start (dockbar, false, false, 0);

 dock = new Gdl.Dock ();

hbox.pack_start (dock, true, true, 0);
 layout = new Gdl.DockLayout
(dock);

 item = new Gdl.DockItem ("executables", _("Messages"),
Gdl.DockItemBehavior.NORMAL);
 item.add (this.executables);
 dock.add_item
(item, Gdl.DockPlacement.BOTTOM);

 item = new Gdl.DockItem ("projects",
_("Projects"), Gdl.DockItemBehavior.NORMAL);
 item.add (this.projects);

dock.add_item (item, Gdl.DockPlacement.LEFT);

 item = new Gdl.DockItem
("documents", _("Documents"), Gdl.DockItemBehavior.NORMAL);
 item.add
(this.documents);
 dock.add_item (item, Gdl.DockPlacement.CENTER);


main_box.pack_start (this.statusbar, false, true, 0);

 if
(!layout.load_from_file ("layout.xml"))
 {
 critical ("error!");

Gtk.main_quit ();
 }
 } 

First, the items doesn't dock correctly (projects
and document on the left and messages on the right). 

Seconds, when I move
an item, the others doesn't respond. 

Last, the dockbar doesn't show.


The attached file, layout.xml is derived from the ajunta file. 

Thank's
in advance. 

Regards,

-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on developpez.com

http://nicolasj.developpez.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]