file and dir lists in an other window?
- From: A Dark Elf <drow DarkElf net>
- To: gtk-list redhat com, gtk-app-devel-list redhat com
- Subject: file and dir lists in an other window?
- Date: Tue, 13 Apr 1999 20:40:17 -0500 (CDT)
I want to take the dir_list and file_list of the file selection widget and
add them to an other window. I've tried the following code but it doesn't
work. I can't seem to remove the 2 widgets from their parents to be able
to add them to my frame:
project_struct = gtk_file_selection_new("PROJECT STRUCT");
gtk_container_remove(GTK_CONTAINER(GTK_FILE_SELECTION(project_struct)->dir_list->parent),
GTK_WIDGET(GTK_FILE_SELECTION(project_struct)->dir_list));
gtk_container_remove(GTK_CONTAINER(GTK_FILE_SELECTION(project_struct)->file_list->parent),
GTK_WIDGET(GTK_FILE_SELECTION(project_struct)->file_list));
gtk_box_pack_start(GTK_BOX(vbox),
GTK_FILE_SELECTION(project_struct)->dir_list, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox),
GTK_FILE_SELECTION(project_struct)->file_list, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT(GTK_FILE_SELECTION(project_struct)->file_list),
"select_row", GTK_SIGNAL_FUNC(CB_project_click), project_struct);
gtk_widget_show(GTK_FILE_SELECTION(project_struct)->dir_list);
gtk_widget_show(GTK_FILE_SELECTION(project_struct)->file_list);
I get these errors:
Gtk-CRITICAL **: file gtkwidget.c: line 3300 (gtk_widget_set_parent):
assertion `GTK_IS_WIDGET (widget)' failed.
Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'
Gtk-CRITICAL **: file gtkwidget.c: line 1642 (gtk_widget_realize):
assertion `GTK_IS_WIDGET (widget)' failed.
...
Patrick Lambert
-----------------------------------------------------------------------
DarkElf Network SysAdmin http://www.darkelf.net
CompSci Student University of Montreal http://www.umontreal.ca
-----------------------------------------------------------------------
HTML emails and spam to this address will be sent directly to /dev/null
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]