[Glade-users] Widget insert problem with libglade
- From: antongiulio email it (antongiulio)
- Subject: [Glade-users] Widget insert problem with libglade
- Date: Sun, 24 Apr 2005 00:04:58 +0200
Hi,
I have this code on my app:
++++++++++++++++++++++++++++++++++
accel_group = gtk_accel_group_new ();
xml_glade = glade_xml_new (GLADE_PATH "mywindow.glade", NULL, NULL);
interface.window = glade_xml_get_widget (xml_glade, "mainwindow");
gtk_window_add_accel_group (GTK_WINDOW (interface.window), accel_group);
interface.vbox = glade_xml_get_widget (xml_glade, "vbox");
interface.handlebox = glade_xml_get_widget (xml_glade, "bonobodockitem2");
interface.statusbar = glade_xml_get_widget (xml_glade, "appbar1");
interface.statusbar_pb = (GtkWidget *) gnome_appbar_get_progress ((GnomeAppBar *) interface.statusbar);
view_statusbar_menu = glade_xml_get_widget (xml_glade, "menu_statusbar1");
interface.save_as2 = glade_xml_get_widget (xml_glade, "save_output1");
interface.scrolledwindow = glade_xml_get_widget (xml_glade, "scrolledwindow1");
interface.autorefresh_frame = glade_xml_get_widget (xml_glade, "autorefresh_frame");
interface.change_settings_sub_menu = glade_xml_get_widget (xml_glade, "change_settings");
interface.combobox_lists = glade_xml_get_widget (xml_glade, "combobox_lists");
/* autorefresh widgets */
interface.spin1 = glade_xml_get_widget (xml_glade, "spinbutton1");
interface.spin2 = glade_xml_get_widget (xml_glade, "spinbutton2");
interface.progressbar = glade_xml_get_widget (xml_glade, "progressbar1");
interface.start = glade_xml_get_widget (xml_glade, "start_button");
interface.stop = glade_xml_get_widget (xml_glade, "stop_button");
interface.autorefresh_button = glade_xml_get_widget (xml_glade, "autorefresh_button");
/* search */
interface.search_button = glade_xml_get_widget (xml_glade, "search_button");
interface.search_entry = glade_xml_get_widget (xml_glade, "search_entry");
interface.combox = glade_xml_get_widget (xml_glade, "combobox");
gtk_combo_box_set_active (GTK_COMBO_BOX (interface.combox), 0);
glade_xml_signal_autoconnect (xml_glade);
++++++++++++++++++++++++++++++++++
this code works, and it generates a main window with an internal vbox. Vbox has 5 "elements".
When I append below code to put hpaned in the one only empty element of vbox (third element):
interface.hpaned = gtk_hpaned_new();
gtk_container_add (GTK_CONTAINER(interface.vbox), interface.hpaned);
gtk_widget_show (interface.hpaned);
I got a run time error, hpaned is not showed and app crashes...
From gdb:
#0 0x0000002a975e4593 in g_type_check_instance_is_a () from /usr/lib/libgobject-2.0.so.0
#1 0x0000002a975d15f4 in g_object_ref () from /usr/lib/libgobject-2.0.so.0
#2 0x0000002a9683bee1 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
Is not possible make this adding with libglade???
Thank you very much
Giulio
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Acquista ora Email.it Phone Card e comincia a risparmiare sulle tue telefonate! Clicca e scopri l'offerta
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2684&d=23-4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]