[gtk-list] Re: gtk_file_selection bug under gtk+970915?

Peter Mattis writes:
 > I'd like to throw out the suggestion of encapsulating the problem in a
 > simple test case...a compilable file that I can compile and run and
 > that will demonstrate the problem.

OK, sorry, I'm a bit new to this. Below is a compilable test case
which causes the errors:

----begin code----

#include <gtk/gtk.h>

void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
  g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));

void destroy (GtkWidget *widget, gpointer *data)
  gtk_main_quit ();

int main (int argc, char *argv[])
  GtkWidget *filew;
  gtk_init (&argc, &argv);

  filew = gtk_file_selection_new ("File selection");
  gtk_signal_connect (GTK_OBJECT (filew), "destroy",
		      (GtkSignalFunc) destroy, &filew);

  gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
		      "clicked", (GtkSignalFunc) file_ok_sel, filew );
  gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
 "clicked", (GtkSignalFunc) gtk_widget_destroy,
			     GTK_OBJECT (filew));
  gtk_main ();
  return 0;

----end code----

The above code is basically the file selection demo from Ian's gtk+
tutorial on the web. The file selection box comes up after the errors
are given, but the buttons in the "action area" are not connected to
the actions I gave them. The warnings given for this are:

** WARNING **: could not find signal type "clicked" in the "GtkLabel"
   class ancestry

** WARNING **: could not find signal type "clicked" in the "GtkVBox"
   class ancestry

It runs fine under gtk+ from gimp-0.99.10. I'm using gtk+970915 on
Solaris 2.5.1. I guess what's puzzling me is that I thought it would
be the sort of bug that everyone would notice straight away- which
probably means that it's simply to do with my setup here :-(


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