diff --git a/ChangeLog b/ChangeLog index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 92a55d46d5..63494a30d9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,18 @@ +Wed Feb 25 13:50:05 GMT 1998 Tony Gale + + * docs/gtkfaq.sgml: added questions on: + - Why don't the contents of a button move when + the button is pressed? + - How do I catch a double click event in + a list widget? + - When compiling GTK+ I get an error like: + make: file `Makefile' line 456: Syntax error + Removed questions on menus which are covered in the + tutorial. + + Added link to HTML versions of FAQ and Tutorial on my + web site. + Tue Feb 24 22:47:01 1998 Owen Taylor * gtk/gtktext.c: Added some support for i18n. The support diff --git a/docs/faq/gtkfaq.sgml b/docs/faq/gtkfaq.sgml index b83974b24e..b8efe3c4a3 100644 --- a/docs/faq/gtkfaq.sgml +++ b/docs/faq/gtkfaq.sgml @@ -8,7 +8,7 @@ Nathan Froyd, Tony Gale, Shawn T. Amundson. -February 20th 1998 +February 25th 1998 This document is intended to answer questions that are likely to be frequently asked by programmers using GTK+ or people who are just @@ -83,13 +83,15 @@ reference material for both GTK and GDK, and this FAQ. There is also a GTK+ Tutorial which can be found at +name="http://www.levien.com/~slow/gtk/">. -In addition, if you are -on the web, you can browse all of the above by going to +The Tutorial and FAQ can also be found at +. + +In addition, you can find links to all of these documents by going to , where they -are already converted to HTML format. +name="http://www.gimp.org/gtk/docs">. Is there a mailing list (or mailing list archive) for GTK+? @@ -132,9 +134,10 @@ Bug reports should be sent to the GTK+ mailing list.

Some applications which use GTK+ are: -GIMP ( ), +GIMP ( ), an image manipulation program -gsumi (Gsumi (), a fun B+W doodling program with XInput support. GUBI (How to find, configure, install, and troubleshoot GTK+ + + What do I need to run GTK+?

To compile GTK+, all you need is a C compiler (gcc) and the X Window System and associated libraries on your system. + Where can I get GTK+?

The canonical site is: @@ -188,6 +194,16 @@ make in the gtk+-version/ directory. + +When compiling GTK+ I get an error like: + +Make sure that you are using GNU make (use + I've compiled and installed GTK+, but I can't get any programs to link with it!

@@ -223,6 +239,7 @@ and reinstall gtk+. Development of GTK+ + When will it reach version 1.0?

The file 'TODO' in the gtk+ distribution lists the things that need to be done @@ -311,6 +328,11 @@ ftp://ftp.gimp.org/pub/gtk/gtk--/

+Perl bindings + +ftp://ftp.gimp.org/pub/gtk/perl + + Guile bindings. The home page is at: http://www.ping.de/sites/zagadka/guile-gtk/ @@ -335,11 +357,6 @@ http://www.acs.ucalgary.cs/~nashceme/python-gtk/ If you try python-gtk and don't like it, there's also pygtk located at: ftp://ftp.gimp.org/pub/gtk/python/ - - -If you're a perl fanatic, you might enjoy using the perl-gtk interface at: - -ftp://ftp.gimp.org/pub/gtk/perl/ @@ -454,7 +471,7 @@ code where you are changing a lot of stuff. This will result in much faster speed since it will prevent resizing of the entire widget hierarchy. -How do I catach a double click event in a list widget? +How do I catch a double click event in a list widget?

Tim Janik wrote to gtk-list (slightly modified): @@ -476,11 +493,11 @@ signal_handler_event(GtkWiget *widget, GdkEvenButton *event, gpointer func_data) } -And connect the handler to your object: +And connect the handler to your object: { - /* list, list item init stuff */ + /* list, list item init stuff */ gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", @@ -497,7 +514,7 @@ And connect the handler to your object: /* something else */ } - + How do I find out about the selection of a GtkList?

@@ -632,110 +649,31 @@ copy gtkviewport.c and strip out the adjustment and shadow functionality (perhaps you could call it GtkClipper). -How do I make menus? +Why don't the contents of a button move when the button is pressed? Here's a patch to make it work that way...

-Sascha Ziemann wrote to the gtk-list: (slightly modified) - -First you have to write a function for every menu: (the translate -function returns simple strings) - - -/*********************************************************************** -** Create the File-Menu -*/ -GtkWidget* create_file_menu (GtkWidget *window) -{ - GtkWidget *menu; - GtkWidget *submenu; - GtkWidget *menuitem; - GSList *group; +From: Peter Mattis - menu = gtk_menu_new (); - submenu = NULL; - group = NULL; - - menuitem = gtk_menu_item_new_with_label(translate("file-new-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-open-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - gtk_menu_line_new(GTK_MENU(menu)); - - menuitem = gtk_menu_item_new_with_label(translate("file-save-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-saveas-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-saveall-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - gtk_menu_line_new(GTK_MENU(menu)); - - menuitem = gtk_menu_item_new_with_label(translate("file-export-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - return menu; -} - - -And in your main window creation function you create a menubar in a box. - - - /* - ** base frame - */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - (GtkSignalFunc) destroy_program, - & -window); - gtk_widget_set_name (window, "EDINI"); - gtk_widget_set_uposition (window, 20, 20); - base_frame_box = gtk_vbox_new (FALSE, 10); - gtk_container_add (GTK_CONTAINER (window), base_frame_box); - gtk_widget_show (base_frame_box); - - /* - ** the menu bar - */ - menubar = gtk_menu_bar_new (); - gtk_box_pack_start (GTK_BOX (base_frame_box), menubar, FALSE, TRUE, 0); - gtk_widget_show (menubar); - - menu = create_file_menu(window); - - menuitem = gtk_menu_item_new_with_label(translate("file-menu-label")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu); - gtk_menu_bar_append (GTK_MENU_BAR (menubar), menuitem); - gtk_widget_show (menuitem); - - - - -Is there a better way to do the menus? -

-Jay Painter wrote to the gtk-list: (slightly modified) - -The best way to make menus is with gtk_menu_factory where you create a -structure with all your menus in it, feed it to a function, and all your -menus get created for you without 50 calls to gtk_menuitem_new. You can -find a good example in the GZilla code. I still don't know exaclty what -all the fields are in the structure, but NULL is always a good choice for -those. :) - +The reason buttons don't move their child down and to the right when +they are depressed is because I don't think that's what is happening +visually. My view of buttons is that you are looking at them straight +on. That is, the user interface lies in a plane and you're above it +looking straight at it. When a button gets pressed it moves directly +away from you. To be absolutely correct I guess the child should +actually shrink a tiny amount. But I don't see why the child should +shift down and to the left. Remember, the child is supposed to be +attached to the buttons surface. Its not good for it to appear like +the child is slipping on the surface of the button. +On a more practical note, I did implement this at one point and +determined it didn't look good and removed it. + How can I define a separation line in a menu?

-Just insert an empty menu item: +See the for information on how to create menus. +However, to create a separation line in a menu, just insert an +empty menu item: menuitem = gtk_menu_item_new(); diff --git a/docs/gtkfaq.sgml b/docs/gtkfaq.sgml index b83974b24e..b8efe3c4a3 100644 --- a/docs/gtkfaq.sgml +++ b/docs/gtkfaq.sgml @@ -8,7 +8,7 @@ Nathan Froyd, Tony Gale, Shawn T. Amundson. -February 20th 1998 +February 25th 1998 This document is intended to answer questions that are likely to be frequently asked by programmers using GTK+ or people who are just @@ -83,13 +83,15 @@ reference material for both GTK and GDK, and this FAQ. There is also a GTK+ Tutorial which can be found at +name="http://www.levien.com/~slow/gtk/">. -In addition, if you are -on the web, you can browse all of the above by going to +The Tutorial and FAQ can also be found at +. + +In addition, you can find links to all of these documents by going to , where they -are already converted to HTML format. +name="http://www.gimp.org/gtk/docs">. Is there a mailing list (or mailing list archive) for GTK+? @@ -132,9 +134,10 @@ Bug reports should be sent to the GTK+ mailing list.

Some applications which use GTK+ are: -GIMP ( ), +GIMP ( ), an image manipulation program -gsumi (Gsumi (), a fun B+W doodling program with XInput support. GUBI (How to find, configure, install, and troubleshoot GTK+ + + What do I need to run GTK+?

To compile GTK+, all you need is a C compiler (gcc) and the X Window System and associated libraries on your system. + Where can I get GTK+?

The canonical site is: @@ -188,6 +194,16 @@ make in the gtk+-version/ directory. + +When compiling GTK+ I get an error like: + +Make sure that you are using GNU make (use + I've compiled and installed GTK+, but I can't get any programs to link with it!

@@ -223,6 +239,7 @@ and reinstall gtk+. Development of GTK+ + When will it reach version 1.0?

The file 'TODO' in the gtk+ distribution lists the things that need to be done @@ -311,6 +328,11 @@ ftp://ftp.gimp.org/pub/gtk/gtk--/

+Perl bindings + +ftp://ftp.gimp.org/pub/gtk/perl + + Guile bindings. The home page is at: http://www.ping.de/sites/zagadka/guile-gtk/ @@ -335,11 +357,6 @@ http://www.acs.ucalgary.cs/~nashceme/python-gtk/ If you try python-gtk and don't like it, there's also pygtk located at: ftp://ftp.gimp.org/pub/gtk/python/ - - -If you're a perl fanatic, you might enjoy using the perl-gtk interface at: - -ftp://ftp.gimp.org/pub/gtk/perl/ @@ -454,7 +471,7 @@ code where you are changing a lot of stuff. This will result in much faster speed since it will prevent resizing of the entire widget hierarchy. -How do I catach a double click event in a list widget? +How do I catch a double click event in a list widget?

Tim Janik wrote to gtk-list (slightly modified): @@ -476,11 +493,11 @@ signal_handler_event(GtkWiget *widget, GdkEvenButton *event, gpointer func_data) } -And connect the handler to your object: +And connect the handler to your object: { - /* list, list item init stuff */ + /* list, list item init stuff */ gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", @@ -497,7 +514,7 @@ And connect the handler to your object: /* something else */ } - + How do I find out about the selection of a GtkList?

@@ -632,110 +649,31 @@ copy gtkviewport.c and strip out the adjustment and shadow functionality (perhaps you could call it GtkClipper). -How do I make menus? +Why don't the contents of a button move when the button is pressed? Here's a patch to make it work that way...

-Sascha Ziemann wrote to the gtk-list: (slightly modified) - -First you have to write a function for every menu: (the translate -function returns simple strings) - - -/*********************************************************************** -** Create the File-Menu -*/ -GtkWidget* create_file_menu (GtkWidget *window) -{ - GtkWidget *menu; - GtkWidget *submenu; - GtkWidget *menuitem; - GSList *group; +From: Peter Mattis - menu = gtk_menu_new (); - submenu = NULL; - group = NULL; - - menuitem = gtk_menu_item_new_with_label(translate("file-new-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-open-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - gtk_menu_line_new(GTK_MENU(menu)); - - menuitem = gtk_menu_item_new_with_label(translate("file-save-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-saveas-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label(translate("file-saveall-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - gtk_menu_line_new(GTK_MENU(menu)); - - menuitem = gtk_menu_item_new_with_label(translate("file-export-label")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - return menu; -} - - -And in your main window creation function you create a menubar in a box. - - - /* - ** base frame - */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - (GtkSignalFunc) destroy_program, - & -window); - gtk_widget_set_name (window, "EDINI"); - gtk_widget_set_uposition (window, 20, 20); - base_frame_box = gtk_vbox_new (FALSE, 10); - gtk_container_add (GTK_CONTAINER (window), base_frame_box); - gtk_widget_show (base_frame_box); - - /* - ** the menu bar - */ - menubar = gtk_menu_bar_new (); - gtk_box_pack_start (GTK_BOX (base_frame_box), menubar, FALSE, TRUE, 0); - gtk_widget_show (menubar); - - menu = create_file_menu(window); - - menuitem = gtk_menu_item_new_with_label(translate("file-menu-label")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu); - gtk_menu_bar_append (GTK_MENU_BAR (menubar), menuitem); - gtk_widget_show (menuitem); - - - - -Is there a better way to do the menus? -

-Jay Painter wrote to the gtk-list: (slightly modified) - -The best way to make menus is with gtk_menu_factory where you create a -structure with all your menus in it, feed it to a function, and all your -menus get created for you without 50 calls to gtk_menuitem_new. You can -find a good example in the GZilla code. I still don't know exaclty what -all the fields are in the structure, but NULL is always a good choice for -those. :) - +The reason buttons don't move their child down and to the right when +they are depressed is because I don't think that's what is happening +visually. My view of buttons is that you are looking at them straight +on. That is, the user interface lies in a plane and you're above it +looking straight at it. When a button gets pressed it moves directly +away from you. To be absolutely correct I guess the child should +actually shrink a tiny amount. But I don't see why the child should +shift down and to the left. Remember, the child is supposed to be +attached to the buttons surface. Its not good for it to appear like +the child is slipping on the surface of the button. +On a more practical note, I did implement this at one point and +determined it didn't look good and removed it. + How can I define a separation line in a menu?

-Just insert an empty menu item: +See the for information on how to create menus. +However, to create a separation line in a menu, just insert an +empty menu item: menuitem = gtk_menu_item_new();