Subject: [Patch] GTK2 support for FvwmGtk

From: Victor Ananjevsky <[email-masked]>
Date: Sat, 19 Jun 2004 13:08:49 +0300

Hi

There is a patch for add Gtk2 support for FvwmGtk module instead of GTk 1.x

I adapt this patch - http://www.hpc.uh.edu/fvwm/archive/0209/msg00563.html
for cvs version of fvwm, make some cleanups and add new widget StockButton.

-- 

Victor Ananjevsky (aka Ananas)
diff -urN fvwm-orig/configure.in fvwm/configure.in
--- fvwm-orig/configure.in	2004-05-23 19:20:23.000000000 +0300
+++ fvwm/configure.in	2004-06-19 12:38:35.604175728 +0300
@@ -979,7 +979,7 @@
 fi

-dnl ********* GTK, IMLIB, GNOME
+dnl ********* GTK+ 2.0
 dnl Check the availability of gtk
 FVWMGTK=""
 MANFVWMGTK=""
@@ -988,7 +988,7 @@
 	[  --disable-gtk           do not build modules using gtk library],
 	enable_gtktest="$enableval", enable_gtktest=yes)
 if test x"$enable_gtktest" = xyes; then
-	AM_PATH_GTK(1.1.0,[
+	AM_PATH_GTK_2_0(2.0.0,[
 		FVWMGTK=FvwmGtk AC_SUBST(FVWMGTK)
 		MANFVWMGTK=FvwmGtk.1 AC_SUBST(MANFVWMGTK)
 	],)
@@ -1006,18 +1006,6 @@
 AC_SUBST(FVWMGTK)
 AC_SUBST(MANFVWMGTK)
 
-dnl Check the availability of gdk-imlib
-AM_PATH_GDK_IMLIB(1.8.0, AC_DEFINE(GDK_IMLIB),)
-if test x"$no_imlib" = x; then
-  with_gdkimlib=yes
-  problem_gdkimlib=""
-else
-  with_gdkimlib=no
-  problem_gdkimlib=": Failed on gdk-imlib, see config.log"
-fi
-
-GNOME_INIT_HOOK
-
 dnl Unfortunately we have 2 gnome supports: WM hints and gnome libs.
 dnl The $with_gnomehints below refers to the first, not GNOME_INIT_HOOK.
 if test x"$enable_gnome_hints" != xno; then
@@ -1187,12 +1175,6 @@
 eval my_localedir="`eval echo ${LOCALEDIR}`"
 test x"$USE_NLS" = xno && my_localedir="(Not installed) $my_localdir"
 
-case "$with_gtk" in
-  yes) fvwmgtk_msg="
-  With GDK image support in FvwmGtk?  $with_gdkimlib$problem_gdkimlib
-  With GNOME libs support in FvwmGtk? $with_gnomelibs$problem_gnomelibs" ;;
-  no) fvwmgtk_msg="" ;;
-esac
 
 echo "
 FVWM Configuration:
@@ -1208,7 +1190,7 @@
 
   With Asian bi-direct. text support? $with_bidi$problem_bidi
   With Gettext Native Lang support?   $with_gettext$problem_gettext
-  With GTK+ required for FvwmGtk?     $with_gtk$problem_gtk$fvwmgtk_msg
+  With GTK+ required for FvwmGtk?     $with_gtk$problem_gtk
   With Iconv support?                 $with_iconv_type$problem_iconv
   With Mouse strokes (gestures)?      $with_stroke$problem_stroke
   With PNG image support?             $with_png$problem_png
diff -urN fvwm-orig/modules/FvwmGtk/dialog.c fvwm/modules/FvwmGtk/dialog.c
--- fvwm-orig/modules/FvwmGtk/dialog.c	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/dialog.c	2004-06-19 12:27:50.034317264 +0300
@@ -28,6 +28,8 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <gdk/gdkprivate.h>
 
 #include "libs/fvwmlib.h"
@@ -63,18 +65,14 @@
 	return NULL;
       item = gtk_menu_get_active (GTK_MENU (menu));
       if (item)
-	{
 	  return gtk_object_get_data (GTK_OBJECT (item), "value");
-	}
       else
-	{
 	  return NULL;
-	}
     }
   else if (GTK_IS_SCALE (w))
     {
       g_snprintf (buf, sizeof (buf), "%.*f",
-		  GTK_RANGE (w)->digits,
+		  GTK_RANGE (w)->round_digits,
 		  gtk_range_get_adjustment (GTK_RANGE (w))->value);
       return buf;
     }
@@ -86,38 +84,26 @@
       gtk_color_selection_get_color (GTK_COLOR_SELECTION (w), rgb);
       red   = rgb[0] * 65536;
       if (red >= 65536)
-	{
 	  red = 65535;
-	}
       green = rgb[1] * 65536;
       if (green >= 65536)
-	{
 	  green = 65535;
-	}
       blue  = rgb[2] * 65536;
       if (blue >= 65536)
-	{
 	  blue = 65535;
-	}
       g_snprintf (buf, sizeof (buf), "rgb:%.4lx/%.4lx/%.4lx",
-		red, green, blue);
+		  red, green, blue);
       return buf;
     }
   else if (GTK_IS_ENTRY (w))
-    {
       /* this also catches spin buttons */
-      return gtk_entry_get_text (GTK_ENTRY (w));
-    }
+      return (gpointer) gtk_entry_get_text (GTK_ENTRY (w));
   else if (GTK_IS_TOGGLE_BUTTON (w))
     {
       if (GTK_TOGGLE_BUTTON (w)->active)
-	{
 	  return gtk_object_get_data (GTK_OBJECT (w), "on-value");
-	}
       else
-	{
 	  return gtk_object_get_data (GTK_OBJECT (w), "off-value");
-	}
     }
 
   return NULL;
@@ -132,10 +118,8 @@
 
   val = widget_get_value (w);
   if (val)
-    {
       gtk_object_set_data_full (GTK_OBJECT (gtk_widget_get_toplevel (w)),
-	gtk_widget_get_name (w), safestrdup (val), free);
-    }
+				gtk_widget_get_name (w), safestrdup (val), free);
 }

@@ -164,54 +148,32 @@
 		  def = TRUE;
 		}
 	      else if (strcasecmp (argv[i], "can-default") == 0)
-		{
 		  can_def = TRUE;
-		}
 	      else if (strcasecmp (argv[i], "focus") == 0)
-		{
 		  focus = TRUE;
-		}
 	      else if (strcasecmp (argv[i], "expand") == 0)
-		{
 		  expand = TRUE;
-		}
 	      else if (strcasecmp (argv[i], "fill") == 0)
-		{
 		  fill = TRUE;
-		}
 	      else
-		{
 		  padding = atoi (argv[i]);
-		}
 	    }
 	  break;
 	}
     }
   if (GTK_IS_NOTEBOOK (current))
-    {
       gtk_notebook_append_page (GTK_NOTEBOOK (current), w,
 				gtk_label_new (notebook_label));
-    }
   else if (GTK_IS_BOX (current))
-    {
       gtk_box_pack_start (GTK_BOX (current), w, expand, fill, padding);
-    }
   else
-    {
       gtk_container_add (GTK_CONTAINER (current), w);
-    }
   if (focus)
-    {
       gtk_widget_grab_focus (w);
-    }
   if (can_def)
-    {
       GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
-    }
   if (def)
-    {
       gtk_widget_grab_default (w);
-    }
   update_value (w);
 }
 
@@ -228,19 +190,13 @@
     {
       char *val = recursive_replace (dialog, *vals);
       if (strcasecmp (val, "close") == 0)
-	{
 	  gtk_widget_hide (dialog);
-	}
       else
 	{
 	  if (val[0] == '!')
-	    {
 	      system (val + 1);
-	    }
 	  else
-	    {
 	      SendText (fvwm_fd, val, context);
-	    }
 	}
       free (val);
     }
@@ -250,21 +206,21 @@
 open_dialog (int argc, char **argv)
 {
   GtkWidget *item;
-  char *name;
+  const char *name;
 
   g_return_if_fail (argc >= 2);
 
   item = g_hash_table_lookup (widgets, argv[0]);
   if (item)
-    {
       name = gtk_widget_get_name (item);
-    }
   else
     {
-      item = gtk_window_new (GTK_WINDOW_DIALOG);
+      item = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+      gtk_window_set_type_hint (GTK_WINDOW(item),
+				GDK_WINDOW_TYPE_HINT_DIALOG);
       gtk_widget_set_name (item, argv[0]);
       name = gtk_widget_get_name (item);
-      g_hash_table_insert (widgets, name, item);
+      g_hash_table_insert (widgets, (char *)name, item);
       gtk_object_ref (GTK_OBJECT (item));
 
       gtk_window_set_title (GTK_WINDOW (item), argv[1]);
@@ -276,26 +232,19 @@
 	(GTK_OBJECT (item), "delete_event",
 	 GTK_SIGNAL_FUNC (gtk_widget_hide), current);
       if (argc >= 3 && strcasecmp ("center", argv[2]) == 0)
-	{
 	  gtk_window_position (GTK_WINDOW (item), GTK_WIN_POS_CENTER);
-	}
       else
-	{
 	  gtk_window_position (GTK_WINDOW (item), GTK_WIN_POS_MOUSE);
-	}
       if (argc >= 4)
 	{
 	  int border_width;
 
 	  border_width = atoi (argv[3]);
-
 	  gtk_container_border_width (GTK_CONTAINER (item), border_width);
 	}
     }
   if (GTK_IS_MENU (item))
-    {
       fprintf (stderr, "%s is a menu\n", name);
-    }
   current = item;
 }
 
@@ -370,7 +319,6 @@
       int border_width;
 
       border_width = atoi (argv[1]);
-
       gtk_container_border_width (GTK_CONTAINER (item), border_width);
     }
   gtk_widget_show (item);
@@ -394,16 +342,13 @@
   for (i = 0; i < argc - 1; i++)
     {
       if (strcmp (argv[i+1], "--") == 0)
-	{
 	  break;
-	}
       vals[i] = safestrdup(argv[i + 1]);
     }
   vals[i] = NULL;
   gtk_object_set_data (GTK_OBJECT (item), "return_values", vals);
-  gtk_signal_connect
-    (GTK_OBJECT (item), "clicked",
-     GTK_SIGNAL_FUNC (send_values), item);
+  gtk_signal_connect (GTK_OBJECT (item), "clicked",
+		      GTK_SIGNAL_FUNC (send_values), item);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
 }
@@ -421,16 +366,11 @@
   gtk_object_set_data (GTK_OBJECT (item), "on-value", safestrdup (argv[2]));
   gtk_object_set_data (GTK_OBJECT (item), "off-value", safestrdup (argv[3]));
   if (argc >= 5 && strcasecmp (argv[4], "on") == 0)
-    {
       gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (item), TRUE);
-    }
   else
-    {
       gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (item), FALSE);
-    }
-  gtk_signal_connect
-    (GTK_OBJECT (item), "toggled",
-     GTK_SIGNAL_FUNC (update_value), item);
+  gtk_signal_connect (GTK_OBJECT (item), "toggled",
+		      GTK_SIGNAL_FUNC (update_value), item);
 
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
@@ -446,12 +386,9 @@
   item = gtk_entry_new ();
   gtk_widget_set_name (item, argv[0]);
   if (argc >= 2)
-    {
       gtk_entry_set_text (GTK_ENTRY (item), argv[1]);
-    }
-  gtk_signal_connect
-    (GTK_OBJECT (item), "changed",
-     GTK_SIGNAL_FUNC (update_value), item);
+  gtk_signal_connect (GTK_OBJECT (item), "changed",
+		      GTK_SIGNAL_FUNC (update_value), item);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
 }
@@ -469,17 +406,11 @@
   gtk_widget_set_name (item, group_name);
   gtk_object_set_data (GTK_OBJECT (item), "on-value", safestrdup (argv[1]));
   if (argc >= 3 && strcasecmp (argv[2], "on") == 0)
-    {
       gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (item), TRUE);
-    }
   else
-    {
       gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (item), FALSE);
-    }
-  gtk_signal_connect
-    (GTK_OBJECT (item), "toggled",
-     GTK_SIGNAL_FUNC (update_value), item);
-
+  gtk_signal_connect (GTK_OBJECT (item), "toggled",
+		      GTK_SIGNAL_FUNC (update_value), item);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
 }
@@ -491,9 +422,7 @@
   g_return_if_fail (argc >= 1);
 
   if (group_name)
-    {
       free (group_name);
-    }
   group_name = safestrdup (argv[0]);
   radio_group = NULL;
 }
@@ -522,23 +451,14 @@
   gtk_widget_set_name (item, argv[0]);
   if (argc >= 2)
     {
-      XColor color;
-      /* FIXME: get meaningful colormap */
-      if (XParseColor (gdk_display,
-		       DefaultColormap (gdk_display, gdk_screen),
-		       argv[1],
-		       &color))
-	{
-	  double rgb[3];
-	  rgb[0] = (double) color.red   / 65536.0;
-	  rgb[1] = (double) color.green / 65536.0;
-	  rgb[2] = (double) color.blue  / 65536.0;
-	  gtk_color_selection_set_color (GTK_COLOR_SELECTION (item), rgb);
-	}
+      GdkColor color;
+	  
+      if (gdk_color_parse (argv[1], &color))
+	  gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (item), 
+						 &color);
     }
-  gtk_signal_connect
-    (GTK_OBJECT (item), "color_changed",
-     GTK_SIGNAL_FUNC (update_value), item);
+  gtk_signal_connect (GTK_OBJECT (item), "color_changed",
+		      GTK_SIGNAL_FUNC (update_value), item);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
 }
@@ -558,36 +478,24 @@
   for (i = 0; i < argc; i++)
     {
       if (strcmp (argv[i], "--") == 0)
-	{
 	  break;
-	}
       else if (strcasecmp (argv[i], "homogeneous") == 0)
-	{
 	  homogeneous = 1;
-	}
       else if (strcasecmp (argv[i], "vertical") == 0)
-	{
 	  vertical = 1;
-	}
       else if (read_spacing)
 	{
 	  spacing = atoi (argv[i]);
 	  read_spacing = FALSE;
 	}
       else
-	{
 	  border_width = atoi (argv[i]);
-	}
     }
 
   if (vertical)
-    {
       item = gtk_vbox_new (homogeneous, spacing);
-    }
   else
-    {
       item = gtk_hbox_new (homogeneous, spacing);
-    }
   gtk_container_border_width (GTK_CONTAINER (item), border_width);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
@@ -601,13 +509,9 @@
   GtkWidget *item;
 
   if (GTK_IS_HBOX (current))
-    {
       item = gtk_vseparator_new ();
-    }
   else
-    {
       item = gtk_hseparator_new ();
-    }
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
 }
@@ -640,24 +544,18 @@
     }
 
   if (argc >= 8 + i)
-    {
       digits = atoi (argv[i + 7]);
-    }
 
-  adj = gtk_adjustment_new (atof (argv[i + 1]), atof (argv[i + 2]),
-			    atof (argv[i + 3]), atof (argv[i + 4]),
-			    atof (argv[i + 5]), atof (argv[i + 6]));
+  adj = gtk_adjustment_new (atof (argv[i+1]), atof (argv[i+2]),
+			    atof (argv[i+3]), atof (argv[i+4]),
+			    atof (argv[i+5]), atof (argv[i+6]));
   if (vertical)
-    {
       item = gtk_vscale_new (GTK_ADJUSTMENT (adj));
-    }
   else
-    {
       item = gtk_hscale_new (GTK_ADJUSTMENT (adj));
-    }
-  gtk_signal_connect_object
-    (GTK_OBJECT (adj), "value_changed",
-     GTK_SIGNAL_FUNC (update_value), GTK_OBJECT (item));
+  gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
+			     GTK_SIGNAL_FUNC (update_value), 
+			     GTK_OBJECT (item));
   gtk_widget_set_name (item, argv[0]);
   gtk_scale_set_digits (GTK_SCALE (item), digits);
   gtk_widget_show (item);
@@ -675,18 +573,16 @@
   g_return_if_fail (argc >= 8);
 
   if (argc >= 9)
-    {
       digits = atoi (argv[8]);
-    }
 
   adj = gtk_adjustment_new (atof (argv[1]), atof (argv[2]),
 			    atof (argv[3]), atof (argv[4]),
 			    atof (argv[5]), atof (argv[6]));
 
   item = gtk_spin_button_new (GTK_ADJUSTMENT (adj), atof (argv[7]), digits);
-  gtk_signal_connect_object
-    (GTK_OBJECT (adj), "value_changed",
-     GTK_SIGNAL_FUNC (update_value), GTK_OBJECT (item));
+  gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
+			     GTK_SIGNAL_FUNC (update_value), 
+			     GTK_OBJECT (item));
   gtk_widget_set_name (item, argv[0]);
   gtk_widget_show (item);
   add_to_dialog (item, argc, argv);
@@ -694,6 +590,32 @@

 void
+dialog_stockbutton (int argc, char **argv)
+{
+  GtkWidget *item;
+  char **vals;
+  int i;
+
+  g_return_if_fail (argc >= 2);
+
+  item = gtk_button_new_from_stock (argv[0]);
+
+  vals = (char **) safemalloc (argc * sizeof (char *));
+  for (i = 0; i < argc - 1; i++)
+    {
+      if (strcmp (argv[i+1], "--") == 0)
+	  break;
+      vals[i] = safestrdup(argv[i + 1]);
+    }
+  vals[i] = NULL;
+  gtk_object_set_data (GTK_OBJECT (item), "return_values", vals);
+  gtk_signal_connect (GTK_OBJECT (item), "clicked",
+		      GTK_SIGNAL_FUNC (send_values), item);
+  gtk_widget_show (item);
+  add_to_dialog (item, argc, argv);
+}
+
+void
 dialog_start_option_menu (int argc, char **argv)
 {
   GtkWidget *item;
@@ -713,16 +635,14 @@
 void
 dialog_end_option_menu (int argc, char **argv)
 {
-  gtk_signal_connect_object
-    (GTK_OBJECT (menu), "deactivate",
-     GTK_SIGNAL_FUNC (update_value), GTK_OBJECT (current));
+  gtk_signal_connect_object (GTK_OBJECT (menu), "deactivate",
+			     GTK_SIGNAL_FUNC (update_value), 
+			     GTK_OBJECT (current));
   gtk_option_menu_set_menu (GTK_OPTION_MENU (current), menu);
   menu = NULL;
   if (option_menu_active_item > 0)
-   {
-     gtk_option_menu_set_history (GTK_OPTION_MENU (current),
-				  option_menu_active_item);
-   }
+      gtk_option_menu_set_history (GTK_OPTION_MENU (current),
+				   option_menu_active_item);
   update_value (current);
   gtk_widget_show (current);
   current = current->parent;
@@ -742,9 +662,7 @@
   gtk_widget_show (item);
 
   if (argc >= 3 && strcasecmp (argv[2], "on") == 0)
-    {
-       option_menu_active_item = option_menu_items;
-    }
+      option_menu_active_item = option_menu_items;
 
   gtk_menu_append (GTK_MENU (menu), item);
   option_menu_items++;
diff -urN fvwm-orig/modules/FvwmGtk/dialog.h fvwm/modules/FvwmGtk/dialog.h
--- fvwm-orig/modules/FvwmGtk/dialog.h	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/dialog.h	2004-06-19 12:27:50.035317112 +0300
@@ -19,6 +19,7 @@
 void dialog_separator (int argc, char **argv);
 void dialog_scale (int argc, char **argv);
 void dialog_spinbutton (int argc, char **argv);
+void dialog_stockbutton (int argc, char **argv);
 void dialog_start_option_menu (int argc, char **argv);
 void dialog_end_option_menu (int argc, char **argv);
 void dialog_option_menu_item (int argc, char **argv);
diff -urN fvwm-orig/modules/FvwmGtk/FvwmGtk.1 fvwm/modules/FvwmGtk/FvwmGtk.1
--- fvwm-orig/modules/FvwmGtk/FvwmGtk.1	2003-04-15 04:24:07.000000000 +0300
+++ fvwm/modules/FvwmGtk/FvwmGtk.1	2004-06-19 12:27:50.037316808 +0300
@@ -69,7 +69,7 @@
 
 .SH MENUS
 The following commands define menus. For all arguments named "label"
-in the following menu commands, FvwmGtk looks for embedded ampersands
+in the following menu commands, FvwmGtk looks for embedded underscores
 in the same way fvwm does for its menus.
 
 .IP "*FvwmGtk: Menu \fBname\fP"
@@ -83,7 +83,7 @@
 is given, it should be the name of an xpm file in the ImagePath. The
 icon will appear to the left of the text. If FvwmGtk has been compiled
 with imlib support, icon can of any image format imlib can read. The label
-can contain an ampersand to mark the following character as an accelerator to
+can contain an underscore to mark the following character as an accelerator to
 be underlined. Underlined accelerators work in the same way as they do in fvwm
 native menus. If r_label is given, it will be right-justified.
 
@@ -92,7 +92,7 @@
 text that will appear in the item, the second argument will be sent to
 fvwm when the item is activated. If the optional argument is given, it
 should be the name of an xpm file in the ImagePath. The icon will appear
-to the left of the text. The label can contain an ampersand
+to the left of the text. The label can contain an underscore
 to mark the following character as an accelerator to be underlined.
 Underlined accelerators work in the same way as they do in fvwm native menus.
 If r_label is given, it will be right-justified.
@@ -103,7 +103,7 @@
 the sub menu that will be opened when the item is selected. If the sub menu
 doesn't exist yet, it will be created. If the optional argument is given,
 it should be the name of an xpm file in the ImagePath. The icon will
-appear to the left of the text. The label can contain an ampersand
+appear to the left of the text. The label can contain an underscore
 to mark the following character as an accelerator to be underlined.
 Underlined accelerators work in the same way as they do in fvwm native menus.
 
@@ -199,6 +199,10 @@
 and exclamation sign (which is stripped before execution) or the special
 command "close" to close the current dialog.
 
+.IP "*FvwmGtk: StockButton \fBlabel\fP \fBcmd\fP ..."
+Adds a button widget with label from GTK stock elements. Label is stock
+element name. Commands are similar to \fBButton\fP widget.
+
 .IP "*FvwmGtk: CheckButton \fBname\fP \fBlabel\fP \fBon-value\fP \fBoff-value\fP [ \fBon\fP ]"
 Adds a check button widget with the given label. The value referred to
 by \fBname\fP will be either \fBon-value\fP or \fBoff-value\fP, depending
diff -urN fvwm-orig/modules/FvwmGtk/FvwmGtk.c fvwm/modules/FvwmGtk/FvwmGtk.c
--- fvwm-orig/modules/FvwmGtk/FvwmGtk.c	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/FvwmGtk.c	2004-06-19 12:27:50.040316352 +0300
@@ -26,16 +26,8 @@
 
 #include <X11/Xlib.h>
 
-#ifdef NEED_GNOMESUPPORT_H
-#include <gnome.h>
-#else
 #include <glib.h>
 #include <gtk/gtk.h>
-#endif
-
-#ifdef GDK_IMLIB
-#include <gdk_imlib.h>
-#endif
 
 #include <libs/Module.h>
 #include <libs/fvwmlib.h>
@@ -61,477 +53,455 @@
 GHashTable *window_list_entries = NULL;
 
 /*
-   General overview:
+  General overview:
 
-   All widgets (menus and dialogs) are stored in one hash table, widgets.
-   They are built up piecemeal, the widget currently being built up is current.
-   For dialogs, current may also point to a subwidget of the dialog.
+  All widgets (menus and dialogs) are stored in one hash table, widgets.
+  They are built up piecemeal, the widget currently being built up is current.
+  For dialogs, current may also point to a subwidget of the dialog.
 
-   dialog contain diffent kinds of widgets:
+  dialog contain diffent kinds of widgets:
 
-   * data widgets which return some value these all have a name and store
-   their value as data on the top-level dialog under their name
+  * data widgets which return some value these all have a name and store
+  their value as data on the top-level dialog under their name
 
-   * action widgets like buttons. These have a list of commands which are
-   sent to fvwm or executed by FvwmGtk itself (eg close).
-   The commands are stored as data on the action widget under the name
-   "values", as a NULL-terminated char*-array.
+  * action widgets like buttons. These have a list of commands which are
+  sent to fvwm or executed by FvwmGtk itself (eg close).
+  The commands are stored as data on the action widget under the name
+  "values", as a NULL-terminated char*-array.
 
-   A command can contain references to other widgets values in the form
-   $(name). These references are resolved recursively, ie the values can
-   again contain references.
+  A command can contain references to other widgets values in the form
+  $(name). These references are resolved recursively, ie the values can
+  again contain references.
 
-   The resolution of the references is done by splitting the string into a
-   list of passive strings and variable references and splicing in sublists
-   for the variable references until only passive strings remain.
- */
+  The resolution of the references is done by splitting the string into a
+  list of passive strings and variable references and splicing in sublists
+  for the variable references until only passive strings remain.
+*/

-void destroy(int argc, char **argv)
+void
+destroy (int argc, char **argv)
 {
-	GtkWidget *w;
+  GtkWidget *w;
 
-	g_return_if_fail(argc >= 1);
+  g_return_if_fail (argc >= 1);
 
-	w = g_hash_table_lookup(widgets, argv[0]);
-	if (w != NULL)
+  w = g_hash_table_lookup (widgets, argv[0]);
+  if (w != NULL)
+    {
+      if (gtk_widget_get_toplevel (current) == w)
 	{
-		if (gtk_widget_get_toplevel(current) == w)
-		{
-			current = NULL;
-		}
-
-		g_hash_table_remove(widgets, argv[0]);
-		gtk_object_unref(GTK_OBJECT(w));
-		gtk_widget_destroy(w);
+	  current = NULL;
 	}
+
+      g_hash_table_remove (widgets, argv[0]);
+      gtk_object_unref (GTK_OBJECT (w));
+      gtk_widget_destroy (w);
+    }
 }

-void separator(int argc, char **argv)
+void
+separator (int argc, char **argv)
 {
-	if (GTK_IS_MENU(current))
-	{
-		menu_separator(argc, argv);
-	}
-	else
-	{
-		dialog_separator(argc, argv);
-	}
+  if (GTK_IS_MENU (current))
+    {
+      menu_separator (argc, argv);
+    }
+  else
+    {
+      dialog_separator (argc, argv);
+    }
 }

-void item(int argc, char **argv)
+void
+item (int argc, char **argv)
 {
-	if (GTK_IS_MENU(current))
-	{
-		  menu_item(argc, argv);
-	}
-	else
-	{
-		  dialog_option_menu_item(argc, argv);
-	}
+  if (GTK_IS_MENU (current))
+    {
+      menu_item (argc, argv);
+    }
+  else
+    {
+      dialog_option_menu_item (argc, argv);
+    }
 }

-void parse_rc_file(int argc, char **argv)
+void
+parse_rc_file (int argc, char **argv)
 {
-	g_return_if_fail(argc >= 1);
+  g_return_if_fail (argc >= 1);
 
-	gtk_rc_parse(argv[0]);
+  gtk_rc_parse (argv[0]);
 }

-void icon_size(int argc, char **argv)
+void
+icon_size (int argc, char **argv)
 {
-	if (argc < 2)
-	{
-		icon_w = 0;
-		icon_h = 0;
-	}
-	else
-	{
-		icon_w = atoi(argv[0]);
-		icon_h = atoi(argv[1]);
-	}
+  if (argc < 2)
+    {
+      icon_w = 0;
+      icon_h = 0;
+    }
+  else
+    {
+      icon_w = atoi (argv[0]);
+      icon_h = atoi (argv[1]);
+    }
 }

 char *table[] = {
-	"Box",
-	"Button",
-	"CheckButton",
-	"Color",
-	"Destroy",
-	"Dialog",
-	"EndBox",
-	"EndFrame",
-	"EndNotebook",
-	"EndOptionMenu",
-	"EndRadioGroup",
-	"Entry",
-	"Frame",
-	"IconSize",
-	"Item",
-	"Label",
-	"Menu",
-	"Notebook",
-	"OptionMenu",
-	"RadioButton",
-	"RadioGroup",
-	"RCFile",
-	"Scale",
-	"Separator",
-	"SpinButton",
-	"Submenu",
-	"Tearoff",
-	"Title",
-	"WindowList",
+  "Box",
+  "Button",
+  "CheckButton",
+  "Color",
+  "Destroy",
+  "Dialog",
+  "EndBox",
+  "EndFrame",
+  "EndNotebook",
+  "EndOptionMenu",
+  "EndRadioGroup",
+  "Entry",
+  "Frame",
+  "IconSize",
+  "Item",
+  "Label",
+  "Menu",
+  "Notebook",
+  "OptionMenu",
+  "RadioButton",
+  "RadioGroup",
+  "RCFile",
+  "Scale",
+  "Separator",
+  "SpinButton",
+  "StockButton",
+  "Submenu",
+  "Tearoff",
+  "Title",
+  "WindowList",
 };

-void (*handler[])(int, char**) = {
-	dialog_start_box,
-	dialog_button,
-	dialog_checkbutton,
-	dialog_color,
-	destroy,
-	open_dialog,
-	dialog_end_something,
-	dialog_end_something,
-	dialog_end_notebook,
-	dialog_end_option_menu,
-	dialog_end_radiogroup,
-	dialog_entry,
-	dialog_start_frame,
-	icon_size,
-	item,
-	dialog_label,
-	open_menu,
-	dialog_notebook,
-	dialog_start_option_menu,
-	dialog_radiobutton,
-	dialog_start_radiogroup,
-	parse_rc_file,
-	dialog_scale,
-	separator,
-	dialog_spinbutton,
-	menu_submenu,
-	menu_tearoff_item,
-	menu_title,
-	window_list
+void (*handler[]) (int, char **) = {
+  dialog_start_box,
+  dialog_button,
+  dialog_checkbutton,
+  dialog_color,
+  destroy,
+  open_dialog,
+  dialog_end_something,
+  dialog_end_something,
+  dialog_end_notebook,
+  dialog_end_option_menu,
+  dialog_end_radiogroup,
+  dialog_entry,
+  dialog_start_frame,
+  icon_size,
+  item,
+  dialog_label,
+  open_menu,
+  dialog_notebook,
+  dialog_start_option_menu,
+  dialog_radiobutton,
+  dialog_start_radiogroup,
+  parse_rc_file,
+  dialog_scale,
+  separator,
+  dialog_spinbutton,
+  dialog_stockbutton,
+  menu_submenu, 
+  menu_tearoff_item, 
+  menu_title, 
+  window_list
 };

-void parse_arguments(char **line, int *argc, char ***argv)
+void
+parse_arguments (char **line, int *argc, char ***argv)
 {
-	char *tmp[100];
-	int i;
+  char *tmp[100];
+  int i;
 
-	for (i = 0; i < 100 ; i++)
-	{
-		*line = GetNextSimpleOption(*line, &tmp[i]);
-		if (!tmp[i]) break;
-	}
-	*argc = i;
+  for (i = 0; i < 100; i++)
+    {
+      *line = GetNextSimpleOption (*line, &tmp[i]);
+      if (!tmp[i])
+	break;
+    }
+  *argc = i;
+
+  *argv = (char **) safemalloc (i * sizeof (char *));
+  for (i = 0; i < *argc; i++)
+    {
+      (*argv)[i] = tmp[i];
+    }
+}
+
+
+void
+widget_not_found (char *name)
+{
+  GtkWidget *dialog;
+
+  SendText (fvwm_fd, "Beep", 0);
+  dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+				   "No such menu or dialog: %s", name);
+  g_signal_connect_swapped (GTK_OBJECT (dialog), "response",
+			    G_CALLBACK (gtk_widget_destroy),
+			    GTK_OBJECT (dialog));
+  gtk_window_set_title (GTK_WINDOW (dialog), "Error");
+  gtk_window_set_wmclass (GTK_WINDOW (dialog), "Error", "FvwmGtk");
+  gtk_widget_show (dialog);
+}
+
+
+void
+parse_config_line (char *buf)
+{
+  int argc;
+  char **argv;
+  char *p;
+  char **e;
+
+  if (buf[strlen (buf) - 1] == '\n')
+    {
+      buf[strlen (buf) - 1] = '\0';
+    }
+  if (strncasecmp (buf, my_name, my_name_len) == 0)
+    {
+      p = buf + my_name_len;
+      if ((e = FindToken (p, table, char *)))
+	{
+	  p += strlen (*e);
+	  parse_arguments (&p, &argc, &argv);
+	  handler[e - (char **) table] (argc, argv);
+	}
+      else
+	{
+	  fprintf (stderr, "%s: unknown command: %s\n", my_name + 1, buf);
+	}
+    }
+  else if (strncasecmp (buf, "ImagePath", 9) == 0)
+    {
+      if (image_path)
+	{
+	  free (image_path);
+	}
+      image_path = stripcpy (buf + 9);
+    }
+}
+
+
+void
+parse_options (void)
+{
+  char *buf;
+
+  InitGetConfigLine (fvwm_fd, my_name);	/* only my config lines needed */
+  while (GetConfigLine (fvwm_fd, &buf), buf != NULL)
+    {
+      parse_config_line (buf);
+    }
+}
+
+
+void
+process_message (unsigned long type, unsigned long timestamp,
+		 unsigned long *body)
+{
+  int button = 0;
+  GtkWidget *widget;
+  window_list_options *opts;
+
+  char name[128];
+
+  switch (type)
+    {
+    case M_STRING:
+      SendUnlockNotification (fvwm_fd);
+      context = body[0];	/* this is fw */
+      sscanf ((char *) (&body[3]), "%127s %d", name, &button);
+      widget = g_hash_table_lookup (widgets, name);
+      if (!widget)
+	{
+	  widget_not_found (name);
+	}
+      else if (GTK_IS_MENU (widget))
+	{
+	  opts =
+	    (window_list_options *) gtk_object_get_data (GTK_OBJECT (widget),
+							 "window_list");
+	  if (opts)
+	    {
+	      char *argv[1];
+
+	      argv[0] = name;
+	      destroy (1, argv);
+	      open_menu (1, argv);
+	      widget = current;
+	      gtk_object_set_data (GTK_OBJECT (current), "window_list", opts);
+	      construct_window_list ();
+	    }
+
+	  gtk_menu_popup (GTK_MENU (widget), NULL, NULL, NULL, NULL,
+			  button, timestamp);
+	}
+      else if (GTK_IS_WINDOW (widget))
+	{
+	  gtk_widget_show (GTK_WIDGET (widget));
+	}
+      break;
+    case M_CONFIG_INFO:
+      parse_config_line ((char *) (&body[3]));
+      break;
+    case M_NEW_DESK:
+      current_desk = (long) body[0];
+      break;
+    case M_ADD_WINDOW:
+    case M_CONFIGURE_WINDOW:
+      {
+	struct ConfigWinPacket *cfg = (void *) body;
+	window_list_entry *wle = lookup_window_list_entry (body[0]);
+
+	wle->desk = cfg->desk;
+	wle->layer = 0;
+	wle->iconified = IS_ICONIFIED (cfg);
+	wle->sticky = (IS_STICKY_ACROSS_PAGES (cfg) ||
+		       IS_STICKY_ACROSS_DESKS (cfg));
+	wle->skip = DO_SKIP_WINDOW_LIST (cfg);
+	wle->x = cfg->frame_x;
+	wle->y = cfg->frame_y;
+	wle->width = cfg->frame_width;
+	wle->height = cfg->frame_height;
+      }
+      break;
+    case M_DESTROY_WINDOW:
+      g_hash_table_remove (window_list_entries, &(body[0]));
+      break;
+    case M_VISIBLE_NAME:
+      {
+	window_list_entry *wle = lookup_window_list_entry (body[0]);
+	if (wle->name)
+	  {
+	    free (wle->name);
+	  }
+	wle->name = safestrdup ((char *) (&body[3]));
+      }
+      break;
+    case MX_VISIBLE_ICON_NAME:
+      {
+	window_list_entry *wle = lookup_window_list_entry (body[0]);
+	if (wle->icon_name)
+	  {
+	    free (wle->icon_name);
+	  }
+	wle->icon_name = safestrdup ((char *) (&body[3]));
+      }
+      break;
+    case M_MINI_ICON:
+      {
+
+	MiniIconPacket *mip = (MiniIconPacket *) body;
+	window_list_entry *wle = lookup_window_list_entry (mip->w);
+
+	if (wle->mini_icon)
+	  {
+	    free (wle->mini_icon);
+	  }
+	wle->mini_icon = mip->name[0] != '\0' ? safestrdup (mip->name) : NULL;
+      }
+      break;
+    }
+}
+
+
+void
+read_fvwm_pipe (gpointer data, int source, GdkInputCondition cond)
+{
+  FvwmPacket *packet = ReadFvwmPacket (source);
+  if (packet == NULL)
+    {
+      exit (0);
+    }
+  else
+    {
+      process_message (packet->type, packet->timestamp, packet->body);
+    }
+}
+
+int
+main (int argc, char **argv)
+{
+  char *s;
+
+  if ((s = strrchr (argv[0], '/')))
+    {
+      s++;
+    }
+  else
+    {
+      s = argv[0];
+    }
+  if (argc == 7)
+    {
+      s = argv[6];
+    }
+  my_name_len = strlen (s) + 1;
+  my_name = safemalloc (my_name_len + 1);
+  *my_name = '*';
+  strcpy (my_name + 1, s);
+
+  if ((argc != 6) && (argc != 7))	/* Now MyName is defined */
+    {
+      fprintf (stderr,
+	       "%s version %s should only be executed by fvwm!\n",
+	       my_name + 1, VERSION);
+      exit (1);
+    }
+
+  fvwm_fd[0] = atoi (argv[1]);
+  fvwm_fd[1] = atoi (argv[2]);
+
+  gtk_init (&argc, &argv);
+
+  widgets = g_hash_table_new (g_str_hash, g_str_equal);
+
+  attach_to_toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_widget_realize (attach_to_toplevel);
+
+  window_list_entries = g_hash_table_new (g_int_hash, g_int_equal);
+
+  parse_options ();
+
+  /* normal messages */
+  SetMessageMask (fvwm_fd,
+		  M_STRING |
+		  M_CONFIG_INFO |
+		  M_SENDCONFIG |
+		  M_ADD_WINDOW |
+		  M_DESTROY_WINDOW |
+		  M_CONFIGURE_WINDOW |
+		  M_NEW_DESK | M_VISIBLE_NAME | M_MINI_ICON);
+  /* extended messages */
+  SetMessageMask (fvwm_fd, MX_VISIBLE_ICON_NAME);
+
+  SendText (fvwm_fd, "Send_WindowList", 0);
+
+  gtk_input_add_full (fvwm_fd[1], GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
+		      read_fvwm_pipe, NULL, NULL, NULL);
 
-	*argv = (char **) safemalloc(i * sizeof(char *));
-	for (i = 0; i < *argc; i++)
-	{
-		(*argv)[i] = tmp[i];
-	}
-}
+  /* tell fvwm we're running */
+  SendFinishedStartupNotification (fvwm_fd);
 
+  /* tell fvwm we want to be lock on send for M_STRING Messages */
+  SetSyncMask (fvwm_fd, M_STRING);
 
-void widget_not_found(char *name)
-{
-	GtkWidget *dialog, *box, *item;
-	char buf[200];
-
-	SendText(fvwm_fd, "Beep", 0);
-	dialog = gtk_window_new(GTK_WINDOW_DIALOG);
-	gtk_window_set_title(GTK_WINDOW(dialog), "Error");
-	gtk_window_set_wmclass(GTK_WINDOW(dialog), "Error", "FvwmGtk");
-
-	box = gtk_vbox_new(FALSE, 10);
-	gtk_container_add(GTK_CONTAINER(dialog), box);
-	gtk_container_border_width(GTK_CONTAINER(dialog), 30);
-	g_snprintf(buf, sizeof(buf), "No such menu or dialog: %s", name);
-	item = gtk_label_new(buf);
-	gtk_box_pack_start(GTK_BOX(box), item, FALSE, FALSE, 5);
-	item = gtk_button_new_with_label("OK");
-	gtk_box_pack_start(GTK_BOX(box), item, FALSE, FALSE, 5);
-	gtk_signal_connect_object(
-		GTK_OBJECT(item), "clicked",
-		GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(dialog));
-	gtk_widget_show_all(box);
-	gtk_widget_show(dialog);
-}
-
-
-void parse_config_line(char *buf)
-{
-	int argc;
-	char **argv;
-	char *p;
-	char **e;
-
-	if (buf[strlen(buf)-1] == '\n')
-	{
-		buf[strlen(buf)-1] = '\0';
-	}
-	if (strncasecmp(buf, my_name, my_name_len) == 0)
-	{
-		p = buf + my_name_len;
-		if ((e = FindToken(p, table, char*)))
-		{
-			p += strlen(*e);
-			parse_arguments(&p, &argc, &argv);
-			handler[e - (char**)table](argc, argv);
-		}
-		else
-		{
-			fprintf(stderr, "%s: unknown command: %s\n",
-				my_name + 1, buf);
-		}
-	}
-	else if (strncasecmp(buf, "ImagePath", 9) == 0)
-	{
-		if (image_path)
-		{
-			free(image_path);
-		}
-		image_path = stripcpy(buf + 9);
-	}
+  gtk_main ();
+  return 0;
 }
-
-
-void parse_options(void)
-{
-	char *buf;
-
-	InitGetConfigLine(fvwm_fd,my_name);   /* only my config lines needed */
-	while (GetConfigLine(fvwm_fd, &buf), buf != NULL)
-	{
-		parse_config_line(buf);
-	}
-}
-
-
-void process_message(
-	unsigned long type, unsigned long timestamp, unsigned long *body)
-{
-	int button = 0;
-	GtkWidget *widget;
-	window_list_options *opts;
-
-	char name[128];
-
-	switch (type)
-	{
-	case M_STRING:
-		SendUnlockNotification(fvwm_fd);
-		context = body[0]; /* this is fw */
-		sscanf((char*)(&body[3]), "%127s %d", name, &button);
-		widget = g_hash_table_lookup(widgets, name);
-		if (!widget)
-		{
-			widget_not_found(name);
-		}
-		else if (GTK_IS_MENU(widget))
-		{
-			opts = (window_list_options *)gtk_object_get_data(
-				GTK_OBJECT(widget), "window_list");
-			if (opts)
-			{
-				char *argv[1];
-
-				argv[0] = name;
-				destroy(1, argv);
-				open_menu(1, argv);
-				widget = current;
-				gtk_object_set_data(
-					GTK_OBJECT(current), "window_list",
-					opts);
-				construct_window_list();
-			}
-
-			gtk_menu_popup(
-				GTK_MENU(widget), NULL, NULL, NULL, NULL,
-				button, timestamp);
-		}
-		else if (GTK_IS_WINDOW(widget))
-		{
-			gtk_widget_show(GTK_WIDGET(widget));
-		}
-		break;
-	case M_CONFIG_INFO:
-		parse_config_line((char *)(&body[3]));
-		break;
-	case M_NEW_DESK:
-		current_desk = (long)body[0];
-		break;
-	case M_ADD_WINDOW:
-	case M_CONFIGURE_WINDOW:
-		{
-			struct ConfigWinPacket *cfg = (void *)body;
-			window_list_entry *wle =
-				lookup_window_list_entry(body[0]);
-
-			wle->desk = cfg->desk;
-			wle->layer = 0;
-			wle->iconified = IS_ICONIFIED(cfg);
-			wle->sticky = (IS_STICKY_ACROSS_PAGES(cfg) ||
-				       IS_STICKY_ACROSS_DESKS(cfg));
-			wle->skip = DO_SKIP_WINDOW_LIST(cfg);
-			wle->x = cfg->frame_x;
-			wle->y = cfg->frame_y;
-			wle->width = cfg->frame_width;
-			wle->height = cfg->frame_height;
-		}
-		break;
-	case M_DESTROY_WINDOW:
-		g_hash_table_remove(window_list_entries, &(body[0]));
-		break;
-	case M_VISIBLE_NAME:
-		{
-			window_list_entry *wle =
-				lookup_window_list_entry(body[0]);
-			if (wle->name)
-			{
-				free(wle->name);
-			}
-			wle->name = safestrdup((char *)(&body[3]));
-		}
-		break;
-	case MX_VISIBLE_ICON_NAME:
-		{
-			window_list_entry *wle =
-				lookup_window_list_entry(body[0]);
-			if (wle->icon_name)
-			{
-				free(wle->icon_name);
-			}
-			wle->icon_name = safestrdup((char*)(&body[3]));
-		}
-		break;
-	case M_MINI_ICON:
-		{
-
-			MiniIconPacket *mip = (MiniIconPacket *)body;
-			window_list_entry *wle =
-				lookup_window_list_entry(mip->w);
-
-			if (wle->mini_icon)
-			{
-				free(wle->mini_icon);
-			}
-			wle->mini_icon = mip->name[0] != '\0' ?
-				safestrdup(mip->name) : NULL;
-		}
-		break;
-	}
-}
-
-
-void read_fvwm_pipe(gpointer data, int source, GdkInputCondition cond)
-{
-	FvwmPacket* packet = ReadFvwmPacket(source);
-	if (packet == NULL)
-	{
-		exit(0);
-	}
-	else
-	{
-		process_message(packet->type, packet->timestamp, packet->body);
-	}
-}
-
-int main(int argc, char **argv)
-{
-	char *s;
-
-	if ((s = strrchr(argv[0], '/')))
-	{
-		s++;
-	}
-	else
-	{
-		s = argv[0];
-	}
-	if (argc == 7)
-	{
-		s = argv[6];
-	}
-	my_name_len = strlen(s) + 1;
-	my_name = safemalloc(my_name_len + 1);
-	*my_name = '*';
-	strcpy(my_name + 1, s);
-
-	if ((argc != 6) && (argc != 7)) /* Now MyName is defined */
-	{
-		fprintf(stderr,
-			"%s version %s should only be executed by fvwm!\n",
-			my_name + 1, VERSION);
-		exit(1);
-	}
-
-	fvwm_fd[0] = atoi(argv[1]);
-	fvwm_fd[1] = atoi(argv[2]);
-
-#ifdef GDK_IMLIB
-	gdk_init(&argc, &argv);
-	gdk_imlib_init();
-	gtk_widget_push_visual(gdk_imlib_get_visual());
-	gtk_widget_push_colormap(gdk_imlib_get_colormap());
-#endif
-
-#ifdef NEED_GNOMESUPPORT_H
-	gnome_init("FvwmGtk", VERSION, argc, argv);
-	gnome_client_disconnect(gnome_master_client());
-#else
-	gtk_init(&argc, &argv);
-#endif
-
-	widgets = g_hash_table_new(g_str_hash, g_str_equal);
-
-	attach_to_toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_widget_realize(attach_to_toplevel);
-
-	window_list_entries = g_hash_table_new(g_int_hash, g_int_equal);
-
-	parse_options();
-
-	/* normal messages */
-	SetMessageMask(
-		fvwm_fd,
-		M_STRING |
-		M_CONFIG_INFO |
-		M_SENDCONFIG |
-		M_ADD_WINDOW |
-		M_DESTROY_WINDOW |
-		M_CONFIGURE_WINDOW |
-		M_NEW_DESK |
-		M_VISIBLE_NAME |
-		M_MINI_ICON);
-	/* extended messages */
-	SetMessageMask(
-		fvwm_fd,
-		MX_VISIBLE_ICON_NAME);
-
-	SendText(fvwm_fd, "Send_WindowList", 0);
-
-	gtk_input_add_full(
-		fvwm_fd[1], GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
-		read_fvwm_pipe, NULL, NULL, NULL);
-
-	/* tell fvwm we're running */
-	SendFinishedStartupNotification(fvwm_fd);
-
-	/* tell fvwm we want to be lock on send for M_STRING Messages */
-	SetSyncMask(fvwm_fd, M_STRING);
-
-	gtk_main();
-	return 0;
-}
-
diff -urN fvwm-orig/modules/FvwmGtk/gtkpixmapmenuitem.c fvwm/modules/FvwmGtk/gtkpixmapmenuitem.c
--- fvwm-orig/modules/FvwmGtk/gtkpixmapmenuitem.c	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/gtkpixmapmenuitem.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,290 +0,0 @@
-/* -*-c-*- */
-/* Author: Dietmar Maurer <[email-masked]> */
-
-/* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include "config.h"
-
-#include "gtkpixmapmenuitem.h"
-#include <gtk/gtkaccellabel.h>
-#include <gtk/gtksignal.h>
-
-static void gtk_pixmap_menu_item_class_init    (GtkPixmapMenuItemClass *klass);
-static void gtk_pixmap_menu_item_init          (GtkPixmapMenuItem      *menu_item);
-static void gtk_pixmap_menu_item_draw          (GtkWidget              *widget,
-						GdkRectangle           *area);
-static gint gtk_pixmap_menu_item_expose        (GtkWidget              *widget,
-						GdkEventExpose         *event);
-
-/* we must override the following functions */
-
-static void gtk_pixmap_menu_item_map           (GtkWidget        *widget);
-static void gtk_pixmap_menu_item_size_allocate (GtkWidget        *widget,
-						GtkAllocation    *allocation);
-static void gtk_pixmap_menu_item_forall        (GtkContainer    *container,
-						gboolean         include_internals,
-						GtkCallback      callback,
-						gpointer         callback_data);
-static void gtk_pixmap_menu_item_size_request  (GtkWidget        *widget,
-						GtkRequisition   *requisition);
-static void gtk_pixmap_menu_item_remove        (GtkContainer *container,
-						GtkWidget    *child);
-
-
-static GtkMenuItemClass *parent_class = NULL;
-
-#define INDENT 18
-
-GtkType
-gtk_pixmap_menu_item_get_type (void)
-{
-  static GtkType pixmap_menu_item_type = 0;
-
-  if (!pixmap_menu_item_type)
-    {
-      GtkTypeInfo pixmap_menu_item_info =
-      {
-	"GtkPixmapMenuItem",
-	sizeof (GtkPixmapMenuItem),
-	sizeof (GtkPixmapMenuItemClass),
-	(GtkClassInitFunc) gtk_pixmap_menu_item_class_init,
-	(GtkObjectInitFunc) gtk_pixmap_menu_item_init,
-	/* reserved_1 */ NULL,
-	/* reserved_2 */ NULL,
-	(GtkClassInitFunc) NULL,
-      };
-
-      pixmap_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (),
-					       &pixmap_menu_item_info);
-    }
-
-  return pixmap_menu_item_type;
-}
-
-GtkWidget*
-gtk_pixmap_menu_item_new (void)
-{
-  return GTK_WIDGET (gtk_type_new (gtk_pixmap_menu_item_get_type ()));
-}
-
-static void
-gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass)
-{
-  GtkObjectClass *object_class;
-  GtkWidgetClass *widget_class;
-  GtkMenuItemClass *menu_item_class;
-  GtkContainerClass *container_class;
-
-  object_class = (GtkObjectClass*) klass;
-  widget_class = (GtkWidgetClass*) klass;
-  menu_item_class = (GtkMenuItemClass*) klass;
-  container_class = (GtkContainerClass*) klass;
-
-  parent_class = gtk_type_class (gtk_menu_item_get_type ());
-
-  widget_class->draw = gtk_pixmap_menu_item_draw;
-  widget_class->expose_event = gtk_pixmap_menu_item_expose;
-  widget_class->map = gtk_pixmap_menu_item_map;
-  widget_class->size_allocate = gtk_pixmap_menu_item_size_allocate;
-  widget_class->size_request = gtk_pixmap_menu_item_size_request;
-
-  container_class->forall = gtk_pixmap_menu_item_forall;
-  container_class->remove = gtk_pixmap_menu_item_remove;
-  menu_item_class->toggle_size = INDENT;
-}
-
-static void
-gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item)
-{
-  menu_item->pixmap = NULL;
-}
-
-static void
-gtk_pixmap_menu_item_draw (GtkWidget    *widget,
-			   GdkRectangle *area)
-{
-  g_return_if_fail (widget != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget));
-  g_return_if_fail (area != NULL);
-
-  if (GTK_WIDGET_CLASS (parent_class)->draw)
-    (* GTK_WIDGET_CLASS (parent_class)->draw) (widget, area);
-
-  if (GTK_WIDGET_DRAWABLE (widget) &&
-      GTK_PIXMAP_MENU_ITEM(widget)->pixmap) {
-    gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL);
-  }
-}
-
-static gint
-gtk_pixmap_menu_item_expose (GtkWidget      *widget,
-			     GdkEventExpose *event)
-{
-  g_return_val_if_fail (widget != NULL, FALSE);
-  g_return_val_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  if (GTK_WIDGET_CLASS (parent_class)->expose_event)
-    (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
-
-  if (GTK_WIDGET_DRAWABLE (widget) &&
-      GTK_PIXMAP_MENU_ITEM(widget)->pixmap) {
-    gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL);
-  }
-
-  return FALSE;
-}
-
-void
-gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item,
-				 GtkWidget         *pixmap)
-{
-  g_return_if_fail (menu_item != NULL);
-  g_return_if_fail (pixmap != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (menu_item));
-  g_return_if_fail (GTK_IS_WIDGET (pixmap));
-  g_return_if_fail (menu_item->pixmap == NULL);
-
-  gtk_widget_set_parent (pixmap, GTK_WIDGET (menu_item));
-  menu_item->pixmap = pixmap;
-
-  if (GTK_WIDGET_VISIBLE (pixmap->parent)) {
-    if (GTK_WIDGET_REALIZED (pixmap->parent) &&
-	!GTK_WIDGET_REALIZED (pixmap))
-      gtk_widget_realize (pixmap);
-
-    if (GTK_WIDGET_MAPPED (pixmap->parent) &&
-	!GTK_WIDGET_MAPPED (pixmap))
-      gtk_widget_map (pixmap);
-  }
-
-  if (GTK_WIDGET_VISIBLE (pixmap) && GTK_WIDGET_VISIBLE (menu_item))
-    gtk_widget_queue_resize (pixmap);
-
-}
-
-static void
-gtk_pixmap_menu_item_map (GtkWidget *widget)
-{
-  GtkPixmapMenuItem *menu_item;
-
-  g_return_if_fail (widget != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget));
-
-  menu_item = GTK_PIXMAP_MENU_ITEM(widget);
-
-  GTK_WIDGET_CLASS(parent_class)->map(widget);
-
-  if (menu_item->pixmap &&
-      GTK_WIDGET_VISIBLE (menu_item->pixmap) &&
-      !GTK_WIDGET_MAPPED (menu_item->pixmap))
-    gtk_widget_map (menu_item->pixmap);
-}
-
-static void
-gtk_pixmap_menu_item_size_allocate (GtkWidget        *widget,
-				    GtkAllocation    *allocation)
-{
-  GtkPixmapMenuItem *menu_item;
-  GtkAllocation child_allocation;
-
-  g_return_if_fail (widget != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget));
-  g_return_if_fail (allocation != NULL);
-
-  menu_item = GTK_PIXMAP_MENU_ITEM(widget);
-
-  if (menu_item->pixmap) {
-    child_allocation.x = GTK_CONTAINER (widget)->border_width+
-      widget->style->klass->xthickness + 3;
-    child_allocation.y = GTK_CONTAINER (widget)->border_width+4;
-    child_allocation.width = INDENT-child_allocation.x;
-    child_allocation.height = allocation->height-2*child_allocation.y;
-    gtk_widget_size_allocate (menu_item->pixmap, &child_allocation);
-  }
-
-  GTK_WIDGET_CLASS(parent_class)->size_allocate(widget,allocation);
-}
-
-static void
-gtk_pixmap_menu_item_forall (GtkContainer    *container,
-			     gboolean         include_internals,
-			     GtkCallback      callback,
-			     gpointer         callback_data)
-{
-  GtkPixmapMenuItem *menu_item;
-
-  g_return_if_fail (container != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container));
-  g_return_if_fail (callback != NULL);
-
-  menu_item = GTK_PIXMAP_MENU_ITEM (container);
-
-  if (menu_item->pixmap)
-    (* callback) (menu_item->pixmap, callback_data);
-
-  GTK_CONTAINER_CLASS(parent_class)->forall(container,include_internals,
-					    callback,callback_data);
-}
-
-static void
-gtk_pixmap_menu_item_size_request (GtkWidget      *widget,
-				   GtkRequisition *requisition)
-{
-  GtkPixmapMenuItem *menu_item;
-  GtkRequisition req;
-
-  g_return_if_fail (widget != NULL);
-  g_return_if_fail (GTK_IS_MENU_ITEM (widget));
-  g_return_if_fail (requisition != NULL);
-
-  GTK_WIDGET_CLASS(parent_class)->size_request(widget,requisition);
-
-  menu_item = GTK_PIXMAP_MENU_ITEM (widget);
-
-  /* some widgets needs this */
-  if (menu_item->pixmap)
-    gtk_widget_size_request(menu_item->pixmap,&req);
-
-}
-
-static void
-gtk_pixmap_menu_item_remove (GtkContainer *container,
-			     GtkWidget    *child)
-{
-  GtkBin *bin;
-  gboolean widget_was_visible;
-
-  g_return_if_fail (container != NULL);
-  g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container));
-  g_return_if_fail (child != NULL);
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  bin = GTK_BIN (container);
-  g_return_if_fail ((bin->child == child ||
-		     (GTK_PIXMAP_MENU_ITEM(container)->pixmap == child)));
-
-  widget_was_visible = GTK_WIDGET_VISIBLE (child);
-
-  gtk_widget_unparent (child);
-  if (bin->child == child)
-    bin->child = NULL;
-  else
-    GTK_PIXMAP_MENU_ITEM(container)->pixmap = NULL;
-
-  if (widget_was_visible)
-    gtk_widget_queue_resize (GTK_WIDGET (container));
-}
diff -urN fvwm-orig/modules/FvwmGtk/gtkpixmapmenuitem.h fvwm/modules/FvwmGtk/gtkpixmapmenuitem.h
--- fvwm-orig/modules/FvwmGtk/gtkpixmapmenuitem.h	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/gtkpixmapmenuitem.h	1970-01-01 03:00:00.000000000 +0300
@@ -1,63 +0,0 @@
-/* -*-c-*- */
-/* Author: Dietmar Maurer <[email-masked]> */
-/* Description:
-
-   This widget works like a normal menu_item, but you can insert a
-   arbitrary widget (most often a pixmap widget), which is displayed
-   at the left side. The advantage is that indentation is handled the
-   same way as GTK does.
-
-   (i.e if you create a menu with a gtk_check_menu_item, all normal
-   menu_items are automatically indented by GTK - so if you use a normal
-   menu_item to display pixmaps at the left side, the pixmaps will be
-   indented, which is not what you want. This widget solves the problem)
-
-   */
-
-#ifndef __GTK_MENU_PIXMAP_ITEM_H__
-#define __GTK_MENU_PIXMAP_ITEM_H__
-
-
-#include <gtk/gtkpixmap.h>
-#include <gtk/gtkmenuitem.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#define GTK_TYPE_PIXMAP_MENU_ITEM           (gtk_pixmap_menu_item_get_type ())
-#define GTK_PIXMAP_MENU_ITEM(obj)           (GTK_CHECK_CAST ((obj), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItem))
-#define GTK_PIXMAP_MENU_ITEM_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItemClass))
-#define GTK_IS_PIXMAP_MENU_ITEM(obj)        (GTK_CHECK_TYPE ((obj), GTK_TYPE_PIXMAP_MENU_ITEM))
-#define GTK_IS_PIXMAP_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PIXMAP_MENU_ITEM))
-
-
-typedef struct _GtkPixmapMenuItem       GtkPixmapMenuItem;
-typedef struct _GtkPixmapMenuItemClass  GtkPixmapMenuItemClass;
-
-struct _GtkPixmapMenuItem
-{
-  GtkMenuItem menu_item;
-
-  GtkWidget *pixmap;
-};
-
-struct _GtkPixmapMenuItemClass
-{
-  GtkMenuItemClass parent_class;
-};
-
-
-GtkType    gtk_pixmap_menu_item_get_type      (void);
-GtkWidget* gtk_pixmap_menu_item_new           (void);
-void       gtk_pixmap_menu_item_set_pixmap    (GtkPixmapMenuItem *menu_item,
-					       GtkWidget *pixmap);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GTK_PIXMAP_MENU_ITEM_H__ */
diff -urN fvwm-orig/modules/FvwmGtk/Makefile.am fvwm/modules/FvwmGtk/Makefile.am
--- fvwm-orig/modules/FvwmGtk/Makefile.am	2004-03-31 10:28:36.000000000 +0300
+++ fvwm/modules/FvwmGtk/Makefile.am	2004-06-19 12:27:50.046315440 +0300
@@ -15,15 +15,9 @@
 
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
-GDK_IMLIB_CFLAGS = @GDK_IMLIB_CFLAGS@
-GDK_IMLIB_LIBS = @GDK_IMLIB_LIBS@
-GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@
-GNOME_LIBDIR = @GNOME_LIBDIR@
-GNOMEUI_LIBS = @GNOMEUI_LIBS@
 
-FvwmGtk_SOURCES = FvwmGtk.c gtkpixmapmenuitem.c gtkpixmapmenuitem.h \
-	dialog.c dialog.h expand.c expand.h windowlist.c windowlist.h \
-	menu.c menu.h
+FvwmGtk_SOURCES = FvwmGtk.c dialog.c dialog.h expand.c expand.h \
+	windowlist.c windowlist.h menu.c menu.h
 FvwmGtk_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
 
 ## Xpm note: while this module may not depend on Xpm explicitly,
@@ -31,11 +25,9 @@
 ## so we might as well link against libXpm, if present.
 LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \
 	$(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) -lm \
-	$(GTK_LIBS) $(GDK_IMLIB_LIBS) \
-	$(GNOME_LIBDIR) $(GNOMEUI_LIBS)
+	$(GTK_LIBS)
 
-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \
-	$(GTK_CFLAGS) $(GDK_IMLIB_CFLAGS) $(GNOME_INCLUDEDIR)
+INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS)
 
 clean-local:
 	rm -f FvwmGtk
diff -urN fvwm-orig/modules/FvwmGtk/menu.c fvwm/modules/FvwmGtk/menu.c
--- fvwm-orig/modules/FvwmGtk/menu.c	2003-06-29 22:53:25.000000000 +0300
+++ fvwm/modules/FvwmGtk/menu.c	2004-06-19 12:27:50.048315136 +0300
@@ -30,10 +30,6 @@
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkprivate.h>
-#include "gtkpixmapmenuitem.h"
-#ifdef GDK_IMLIB
-#include <gdk_imlib.h>
-#endif
 
 #include "libs/fvwmlib.h"
 #include "libs/Module.h"
@@ -66,7 +62,7 @@
 find_or_create_menu (char *name)
 {
   GtkWidget *menu;
-  char *name_copy;
+  const char *name_copy;
 
   menu = g_hash_table_lookup (widgets, name);
 
@@ -79,7 +75,7 @@
       name_copy = gtk_widget_get_name (menu);
       gtk_object_ref (GTK_OBJECT (menu));
       gtk_object_sink (GTK_OBJECT (menu));
-      g_hash_table_insert (widgets, name_copy, menu);
+      g_hash_table_insert (widgets, (char *)name_copy, menu);
       gtk_object_ref (GTK_OBJECT (menu));
     }
   if (GTK_IS_MENU (menu))
@@ -94,157 +90,29 @@
 }

-/* from gtkcauldron.c */
-/* result must be g_free'd */
-static gchar *
-convert_label_with_ampersand (const gchar * _label,
-			      gint * accelerator_key,
-			      gint * underbar_pos)
-{
-    gchar *p;
-    gchar *label = g_strdup (_label);
-    for (p = label;; p++) {
-	if (!*p)
-	    break;
-	if (!p[1])
-	    break;
-	if (*p == '&') {
-	    memmove (p, p + 1, strlen (p));
-	    if (*p == '&')      /* use && for an actual & */
-		continue;
-	    *underbar_pos = (unsigned long) p - (unsigned long) label;
-	    *accelerator_key = *p;
-	    return label;
-	}
-    }
-    return label;
-}
-
-
-/* from gtkcauldron.c */
-static gchar *
-create_label_pattern (gchar * label, gint underbar_pos)
-{
-    gchar *pattern;
-    pattern = g_strdup (label);
-    memset (pattern, ' ', strlen (label));
-    if (underbar_pos < strlen (pattern) && underbar_pos >= 0)
-	pattern[underbar_pos] = '_';
-    return pattern;
-}
-
-
-/* from gnome-app-helper.c */
-static GtkAccelGroup *
-get_menu_accel_group (GtkMenuShell *menu_shell)
-{
-	GtkAccelGroup *ag;
-
-	ag = gtk_object_get_data (GTK_OBJECT (menu_shell),
-			"gnome_menu_accel_group");
-
-	if (!ag) {
-		ag = gtk_accel_group_new ();
-		gtk_accel_group_attach (ag, GTK_OBJECT (menu_shell));
-		gtk_object_set_data (GTK_OBJECT (menu_shell),
-				"gnome_menu_accel_group", ag);
-	}
-
-	return ag;
-}
-
-
 GtkWidget *
 menu_item_new_with_pixmap_and_label (char *file, char *l_label, char *r_label)
 {
-  GtkWidget *item, *label, *icon, *box;
-  GdkPixmap *pixmap = NULL;
-  GdkBitmap *mask = NULL;
+  GtkWidget *item;
   char *path;
-  gint accel_key = 0, underbar_pos = -1;
-  gchar *pattern, *converted_label;
-#ifdef GDK_IMLIB
-  GdkImlibImage *im;
-  int w, h;
-#endif
+  GtkWidget *image;
 
   path = PictureFindImageFile (file ? file : "", image_path, R_OK);
 
   if (path == NULL)
     {
-      item = gtk_menu_item_new ();
+      item = gtk_menu_item_new_with_mnemonic (l_label);
     }
   else
     {
-#ifdef GDK_IMLIB
-      im = gdk_imlib_load_image (path);
-      if (im)
-	{
-	  if (icon_w == 0 || icon_h == 0)
-	    {
-	      w = im->rgb_width;
-	      h = im->rgb_height;
-	    }
-	  else
-	    {
-	      w = icon_w;
-	      h = icon_h;
-	    }
-	  gdk_imlib_render (im, w, h);
-	  pixmap = gdk_imlib_move_image (im);
-	  mask = gdk_imlib_move_mask (im);
-	}
-#else
-      pixmap = gdk_pixmap_create_from_xpm (NULL, &mask, NULL, path);
-#endif
-      if (pixmap)
-	{
-	  item = gtk_pixmap_menu_item_new ();
-	  icon = gtk_pixmap_new (pixmap, mask);
-	  gtk_pixmap_menu_item_set_pixmap (GTK_PIXMAP_MENU_ITEM (item), icon);
-	  gtk_widget_show (icon);
-	}
-      else
-	{
-	  item = gtk_menu_item_new ();
-	}
-
+	  image = gtk_image_new_from_file (path);
+	  gtk_widget_show (image);
+	  item = gtk_image_menu_item_new_with_mnemonic (l_label);
+	  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+	  
       free (path);
     }
 
-  converted_label = convert_label_with_ampersand (l_label, &accel_key,
-						  &underbar_pos);
-  label = gtk_label_new (converted_label);
-  if (underbar_pos != -1)
-    {
-      GtkAccelGroup *accel_group =
-	get_menu_accel_group (GTK_MENU_SHELL (current));
-
-      pattern = create_label_pattern (converted_label, underbar_pos);
-      gtk_label_set_pattern (GTK_LABEL (label), pattern);
-
-      gtk_widget_add_accelerator (item, "activate_item",
-				  accel_group, accel_key, 0, 0);
-    }
-  g_free (converted_label);
-
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  if (r_label)
-    {
-      box = gtk_hbox_new (0, 0);
-      gtk_box_pack_start (GTK_BOX (box), label, 0, 1, 0);
-      label = gtk_label_new (r_label);
-      gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
-      gtk_box_pack_end (GTK_BOX (box), label, 0, 1, 0);
-      gtk_container_add (GTK_CONTAINER (item), box);
-      gtk_widget_show_all (box);
-    }
-  else
-    {
-      gtk_container_add (GTK_CONTAINER (item), label);
-      gtk_widget_show (label);
-    }
-
   return item;
 }
 
diff -urN fvwm-orig/modules/FvwmGtk/TODO fvwm/modules/FvwmGtk/TODO
--- fvwm-orig/modules/FvwmGtk/TODO	1999-03-16 03:02:15.000000000 +0200
+++ fvwm/modules/FvwmGtk/TODO	2004-06-19 12:27:50.050314832 +0300
@@ -7,3 +7,5 @@
 
 turn FvwmGtk into a Gnome application. does this need more than
 calling gnome-init instead of gtk-init ?
+
+add initial window size

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 19 Jun 2004 15:56:47 +0000

> for cvs version of fvwm, make some cleanups and add new widget StockButton.

Nice, but I hope you have read all replies in the mentioned thread too.

I would not remove the gtk version 1 support, and support both versions
instead. This is a bit harder, but will make existing systems happy.
Can you try to do this? Version 2 may be preferred if both are found.
If you can't do this, then maybe we need FvwmGtk2 module in addition to
FvwmGtk, with both built when available.

>        gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (item), FALSE);

Please do not remove block brackets for consistency with the rest of
the fvwm code.

> +  gtk_rc_parse (argv[0]);

Please stay with K&R style, with tabs, no spaces after the function name
and so on. At least do not undo this style that is the main in fvwm.

Thanks.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Victor Ananjevsky <[email-masked]>
Date: Sat, 19 Jun 2004 21:08:10 +0300

> FvwmGtk, with both built when available.

I think, separate modules for Version 1 and 2 of GTK would be a batter
solution, because i plane add some new widgets (primary - GtkTree).
Imho, code will be more easy for maintain in case of two differnet modules.

[skip]
> and so on. At least do not undo this style that is the main in fvwm.

Is that enough to use option "-kr" for indent?

> Mikhael.

wbr

--