improved notebooks?



I was about to make a question to this mailing-list about the way to
make colored labels or labels with icons in a notebook. After reading
the tutorial, the word label confused me, because it induced me to think
that the the labels of a notebook should be only "labels" (I mean only
label widgets). After looking at the functions that manage the
gtk_notebook widget, I saw that I could pass a generic widget as a
label. So I tried it. I inserted a hbox as a label, that included a
pixmap and a button inside it.
And it worked perfectly (GTK is really awesome!!!). So now I think the
questions of colored labels (ala OS/2) or labels with icons have gone,
because I can insert a complete widget as a label.
Nevertheless I encountered a runtime error, concretely:

Gtk-CRITICAL **: file gtkwidget.c: line 3360 (gtk_widget_set_parent):
assertion `widget->parent == NULL' failed.

Is there anything wrong with this?. I suspect that gtk_notebook is
complaining about the hbox not being a windowless widget. And I
correct?. Is this a big problem?

Other problem appears when I issue gtk_notebook_popup_enable() with a
notebook with "strange labels" like icons, etc..., because the popup
menu only shows labels, not the widget that acts like the label. In my
case, it showed something like Page 12, instead of showing the hbox.
I think this couldn't be considered a bug, because I think that the
notebook was first thought to only contain "normal labels" and not
strange ones, but hey, putting icons in the labels of a notebook is
something we shouldn't lose. So could anyone fix the popup_menu in the
notebooks to show the label widgets correctly?.

Another someway unrelated problem:

When I have a scrollable notebook, is it possible to make the
arrows (that appear to scroll the notebook) become DnD aware?. I mean,
suppose you have a text processor with a lot of opened documents in a
scrollable notebook. Suppose you select text in the first document of
the scrollable notebook, and you want DnD the selected text over the
last document of the scrollable notebook.
Then you select the text in the first document, drag the mouse to the
arrow, and if the arrow were DnD aware, the programmer could make that
dragging something over the arrow were as if you were pressing it, so
you can advance to the last page of the scrollable notebook, where you
can drop the selected text.
I know nothing about DnD, but I think the last can't be done, unless you
can obtain the widgets that represents the arrows. I have read
gtknotebook.h and found no way to obtain these arrows.
So how can one make the DnD as indicated above?




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