File Selection Problems
- From: ajam <ajam erols com>
- To: gtk-list redhat com
- Subject: File Selection Problems
- Date: Wed, 22 Jul 1998 08:18:08 -0400
Hi,
I am trying writing a very simple text editor in order to learn GTK+. The main
window works fine, everything is in its place. In order to put text into the
text widget I'm making a call from within the main program with:
gtk_signal_connect_object (GTK_OBJECT(mitem_open), "activate",
(GtkSignalFunc)openw,
GTK_OBJECT(text_box));
This makes a call to function 'openw', which has as its header
void openw (GtkObject *t_box) {...
Thus, I am passing the whole text widget to this other function. Once inside, I
defined the "file selection widget" with:
p_666.owindow = gtk_file_selection_new("Open File:");
, where p_666 was defined as:
struct p_struct {
GtkText *tt_box;
GtkWidget *open_window;
}p_666;
tt_box will be made equivalent to t_box. That is, the structure will have both
the selection and the text widgets. Now I want to pass this structure to
another one in order to get the file selected in the "file selection widget"
when the 'ok_button' is pressed. Also, note that the "file selection widget" is
shown in this first non-main function before transfering control for a second
time.
Well, I'm trying to transfer control for a second time when the 'ok_button is
pressed with the "signal connect" function:
gtk_signal_connect (GTK_OBJECT(GTK_FILE_SELECTION(open_window)->ok_button),
"clicked", (GtkSignalFunc)g_dude, p_666);
According to the tutorial, this should transfer control to the function "g_dude"
when the 'ok_button' is pressed. In reality what happens is that I start the
program. I go to the "file menu"; the sub menu opens down; I press "open", and
the "file selection widget" appears. Everything looks great, but I get the
followng "Warning":
** WARNING **: gtk_signal_connect(): could not find signal "clicked in the
'GtkVBox' class ancestry
And this 'gtk_signal_connect' function is the one that I am using to transfer
the structure. Well, I hope I made sense here, and I would appreciate
any comment from any interest listener.
Regards, ajam.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]