[gedit-list] [Fwd: Off Topic??]
- From: chuchi <jbarbero quiter com>
- To: gedit-list <gedit-list gnome org>
- Subject: [gedit-list] [Fwd: Off Topic??]
- Date: Tue, 07 Nov 2006 09:20:05 +0100
Hi all,
I'm trying to add a new tab in the bottom panel. I am loading the widgets from a .glade file. I have a GtkWindow widget with a GtkScrolledWindow. I want load the GtkScrolledWindow and add it to the gedit notebook. This is my code for test:
ret = gedit_utils_get_glade_widgets ("/home/chuchi/desarrollo/sources/gedit/plugins/gedituv/gedituv.glade",
"window1",
&error_widget,
"login_scroll", &panel_uv,
NULL);
if (!ret)
{
gedit_warning (GTK_WINDOW (active_window),
gtk_label_get_label (GTK_LABEL (error_widget)));
gtk_widget_destroy (error_widget);
return;
}
else
{
GeditPanel *panel;
GeditWindow *gwindow;
GeditApp *gapp;
gapp = gedit_app_get_default();
gwindow = gedit_app_get_active_window(gapp);
panel = gedit_window_get_bottom_panel (gwindow);
gedit_panel_add_item(panel,
panel_uv ,
"A verrrrrrr",
NULL);
}
The error:
Gtk-ERROR **: file gtkcontainer.c: line 2447 (gtk_container_propagate_expose): assertion failed: (child->parent == GTK_WIDGET (container))
aborting...
Can you help me? I can not find how to load a widget from glade without a window parent.
Glade file:
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="title" translatable="yes">window1</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<child>
<widget class="GtkScrolledWindow" id="login_scroll">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="border_width">10</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">10</property>
...........
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]