removal of widgets within a container
- From: Joseph Turner <joeman leederville net>
- To: gtk-devel-list gnome org
- Subject: removal of widgets within a container
- Date: Mon, 26 Jan 2004 14:41:19 +0800
Hello,
I'm e-mailing about a current issue with code which is meant to 'remove'
all widgets within a frame.
The code I use is -
int page_no;
GtkWidget *toplevel;
GtkWidget *frameright_temp;
char str[25];
// Initialise page_no variable
page_no = GPOINTER_TO_INT(page);
// Get top level widget
toplevel = (GtkWidget *) gtk_widget_get_toplevel(GTK_WIDGET(widget));
// Get frameright widget
sprintf(str, "frameright%d", page_no);
frameright_temp = (GtkWidget *) lookup_widget(toplevel, str);
gtk_container_remove (GTK_CONTAINER(frameright_temp), widget);
Where I have prviously given the frame the name frameright0 (page_no
is set to 0 (zero))
This code above is called by the following -
gtk_container_foreach(GTK_CONTAINER(frameright_temp), (GtkCallback) remove_notebook_table, (gpointer) 0);
This cleans out most of the widgets which include the following -
* vbox
* toolbar
* gtkTextView (many of them)
* gtksheet-2
But I get the following warnings -
(oranna:10452): Gtk-CRITICAL **: file gtkwidget.c: line 6997 (gtk_widget_get_clipboard): assertion `gtk_widget_has_screen (widget)' failed
(oranna:10452): Gtk-CRITICAL **: file gtkclipboard.c: line 575 (gtk_clipboard_get_owner): assertion `clipboard != NULL' failed
(oranna:10452): Gtk-CRITICAL **: file gtkwidget.c: line 6997 (gtk_widget_get_clipboard): assertion `gtk_widget_has_screen (widget)' failed
(oranna:10452): Gtk-CRITICAL **: file gtktextbuffer.c: line 3210 (gtk_text_buffer_remove_selection_clipboard): assertion `clipboard != NULL' failed
.
.
.
This is with gtk+-2.2.4, glib-2.2.1, pango 1.1.6, libglade 2.0.1 gtkextra 1.1.0
I've looked in the gtk source code and I can locate these lines where it is
doing these tests above that fail. All seem to be related to the clipboard.
And I suspect all are due to the buffer associated with the textview,
some clipboard feature. I make no explicit reference to clipboard routines.
Any ideas?
Cheers
Joe
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]