[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Cancel Button in a FileSelection + Tooltips on labels
- From: "Eric Gavaldo" <egavaldo europe shiva com>
- To: gtk-app-devel-list redhat com
- Subject: Cancel Button in a FileSelection + Tooltips on labels
- Date: Fri, 15 Oct 1999 14:56:23 +0100
Hi there !
I am entering into 2 problems now ...
******* First Question:
I cannot make the cancel button of a FileSelection widget to destroy the widget
... Did someone need it once ?
******* Second Question:
Why tooltips are not working on "non-active" widgets like labels or progressbar
??? I would need it ... How to do ?
Thanks a lot in advance !!!
Here is the code for CancelButton issue:
void create_fileselection (char *bar_title, int action_flag)
{
GtkWidget *fileselection, *fs_ok_button, *fs_cancel_button;
fileselection = gtk_file_selection_new (_(bar_title));
gtk_file_selection_set_filename ((GtkFileSelection *)fileselection,
"/usr/dig/xc2s.conf");
gtk_object_set_data (GTK_OBJECT (fileselection),
"fileselection",
fileselection);
gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
fs_ok_button = GTK_FILE_SELECTION (fileselection)->ok_button;
gtk_object_set_data (GTK_OBJECT (fileselection),
"fs_ok_button",
fs_ok_button);
fs_cancel_button = GTK_FILE_SELECTION (fileselection)->cancel_button;
gtk_object_set_data (GTK_OBJECT (fileselection),
"fs_cancel_button",
fs_cancel_button);
gtk_widget_show (fs_ok_button);
GTK_WIDGET_SET_FLAGS (fs_ok_button, GTK_CAN_DEFAULT);
gtk_widget_show (fs_cancel_button);
GTK_WIDGET_SET_FLAGS (fs_cancel_button, GTK_CAN_DEFAULT);
gtk_widget_show (fileselection);
gtk_signal_connect(GTK_OBJECT(fs_cancel_button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT(fileselection));
if (action_flag == FILE_READ) {
gtk_signal_connect(GTK_OBJECT(fs_ok_button), "clicked",
GTK_SIGNAL_FUNC(read_settings_cb),
NULL);
} else if (action_flag == FILE_SAVE) {
gtk_signal_connect(GTK_OBJECT(fs_ok_button), "clicked",
GTK_SIGNAL_FUNC(save_settings_cb),
NULL);
}
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]