Package: glademm
Version: 2.6.0-1.4
Severity: important

I have an odd problem using glade-- to generate code... When I start a new 
project in Glade, add a new Window, then a new VBox and then a new Button in 
the VBox without changing any properties, the following code (part) is 
generated:

** part of generated window1_glade.cc: **
window1_glade::window1_glade(
)
{  window1 = this;
  gmm_data = new GlademmData(get_accel_group());
  button1 = Gtk::manage(new class Gtk::Button("button"));
  vbox1 = Gtk::manage(new class Gtk::VBox(false, 0));
  button1->set_flags(Gtk::CAN_FOCUS);
  window1->add(*vbox1);
  button1->show();
  vbox1->show();
}
** end part **

The bug is... "vbox1->pack_start(*button1);" should have been somewhere, but is 
not. When compiling and running this code, the button is therefore not visible. 
This is also the case when placing buttons in the other containers. However, 
when I add the button directly to the window, the button does get added:

** part of generated window1_glade.cc: **
window1_glade::window1_glade(
)
{  window1 = this;
  gmm_data = new GlademmData(get_accel_group());
  button1 = Gtk::manage(new class Gtk::Button("button"));
  button1->set_flags(Gtk::CAN_FOCUS);
  window1->add(*button1); // <---
  button1->show();
}
** end part **

Other components do get added to VBoxes, such as labels. When for example I add 
a label and a button to the VBox, the following code is generated:

** part of generated window1_glade.cc: **
window1_glade::window1_glade(
)
{  window1 = this;
  gmm_data = new GlademmData(get_accel_group());
  label1 = Gtk::manage(new class Gtk::Label("label"));
  button1 = Gtk::manage(new class Gtk::Button("button"));
  vbox1 = Gtk::manage(new class Gtk::VBox(false, 0));
  button1->set_flags(Gtk::CAN_FOCUS);
  vbox1->pack_start(*label1); // <-- vbox is added, but button is not
  window1->add(*vbox1);
  label1->show();
  button1->show();
  vbox1->show();
}
** end part **

This bug arises with all the button types (also with togglebuttons, 
filepickbuttons, etc.), but I have not seen other components have failed to be 
added.

It might be caused because I use glade-3 instead of glade-2 or glade-1: the 
Debian description of glademm is: "C++ code generator for glade and glade-2". 
However, only glade-3 is available in Debian testing... So maybe the 
description also needs to be updated.

Kind regards and thanks!
Andr� Offringa

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (650, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages glademm depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.0-1  GCC support library
ii  libstdc++6                    4.3.0-1    The GNU Standard C++ Library v3

Versions of packages glademm recommends:
ii  glade                         3.4.3-1    GTK+ 2 User Interface Builder

-- no debconf information


Reply via email to