changeset 833:ee2d33cfc3c1

[xemacs-hg @ 2002-05-09 13:49:39 by wmperry] A few minor GTK fixes.
author wmperry
date Thu, 09 May 2002 13:49:42 +0000
parents f3244b2b4053
children 9c4fcc216a5f
files lisp/gtk-marshal.el src/emacs-marshals.c src/menubar-gtk.c
diffstat 3 files changed, 37 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gtk-marshal.el	Thu May 09 08:33:46 2002 +0000
+++ b/lisp/gtk-marshal.el	Thu May 09 13:49:42 2002 +0000
@@ -186,8 +186,8 @@
 		("NONE" "OBJECT" "STRING" "STRING")
 		("NONE" "OBJECT" "STRING")
 		("NONE" "OBJECT")
+		("NONE" "POINTER" "INT" "INT")
 		("NONE" "POINTER" "INT")
-		("NONE" "POINTER" "INT" "INT")
 		("NONE" "POINTER" "POINTER" "BOOL" "INT" "INT" "INT" "INT" "INT" "INT")
 		("NONE" "POINTER" "POINTER" "BOOL" "INT" "INT" "INT" "INT")
 		("NONE" "POINTER" "POINTER" "INT" "INT" "INT" "INT")
@@ -239,6 +239,7 @@
 		("POINTER" "OBJECT" "POINTER")
 		("POINTER" "OBJECT")
 		("POINTER" "POINTER")
+		("POINTER" "STRING" "INT")
 		("POINTER")
 		("STRING" "INT" "INT" "INT")
 		("STRING" "INT")
@@ -268,7 +269,7 @@
     return !strcmp ( (const char *) st1, (const char *) st2);
 }
 
-unsigned long
+static unsigned long
 our_string_hash (const void *xv)
 {
   unsigned int h = 0;
--- a/src/emacs-marshals.c	Thu May 09 08:33:46 2002 +0000
+++ b/src/emacs-marshals.c	Thu May 09 13:49:42 2002 +0000
@@ -851,6 +851,13 @@
 }
 
 static void
+emacs_gtk_marshal_NONE__POINTER_INT_INT (ffi_actual_function func, GtkArg *args)
+{
+  __NONE_fn rfunc = (__NONE_fn) func;
+  (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT (args[2]));
+}
+
+static void
 emacs_gtk_marshal_NONE__POINTER_INT (ffi_actual_function func, GtkArg *args)
 {
   __NONE_fn rfunc = (__NONE_fn) func;
@@ -858,13 +865,6 @@
 }
 
 static void
-emacs_gtk_marshal_NONE__POINTER_INT_INT (ffi_actual_function func, GtkArg *args)
-{
-  __NONE_fn rfunc = (__NONE_fn) func;
-  (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT (args[2]));
-}
-
-static void
 emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT (ffi_actual_function func, GtkArg *args)
 {
   __NONE_fn rfunc = (__NONE_fn) func;
@@ -1344,6 +1344,16 @@
 }
 
 static void
+emacs_gtk_marshal_POINTER__STRING_INT (ffi_actual_function func, GtkArg *args)
+{
+  __POINTER_fn rfunc = (__POINTER_fn) func;
+  void * *return_val;
+
+  return_val = GTK_RETLOC_POINTER (args[2]);
+  *return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_INT (args[1]));
+}
+
+static void
 emacs_gtk_marshal_POINTER__NONE (ffi_actual_function func, GtkArg *args)
 {
   __POINTER_fn rfunc = (__POINTER_fn) func;
@@ -1598,8 +1608,8 @@
 		puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_STRING", (void *) emacs_gtk_marshal_NONE__OBJECT_STRING_STRING, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING", (void *) emacs_gtk_marshal_NONE__OBJECT_STRING, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__OBJECT", (void *) emacs_gtk_marshal_NONE__OBJECT, marshaller_hashtable);
+		puthash ("emacs_gtk_marshal_NONE__POINTER_INT_INT", (void *) emacs_gtk_marshal_NONE__POINTER_INT_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__POINTER_INT", (void *) emacs_gtk_marshal_NONE__POINTER_INT, marshaller_hashtable);
-		puthash ("emacs_gtk_marshal_NONE__POINTER_INT_INT", (void *) emacs_gtk_marshal_NONE__POINTER_INT_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT", (void *) emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT", (void *) emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT", (void *) emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT, marshaller_hashtable);
@@ -1651,6 +1661,7 @@
 		puthash ("emacs_gtk_marshal_POINTER__OBJECT_POINTER", (void *) emacs_gtk_marshal_POINTER__OBJECT_POINTER, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_POINTER__OBJECT", (void *) emacs_gtk_marshal_POINTER__OBJECT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_POINTER__POINTER", (void *) emacs_gtk_marshal_POINTER__POINTER, marshaller_hashtable);
+		puthash ("emacs_gtk_marshal_POINTER__STRING_INT", (void *) emacs_gtk_marshal_POINTER__STRING_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_POINTER__NONE", (void *) emacs_gtk_marshal_POINTER__NONE, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_STRING__INT_INT_INT", (void *) emacs_gtk_marshal_STRING__INT_INT_INT, marshaller_hashtable);
 		puthash ("emacs_gtk_marshal_STRING__INT", (void *) emacs_gtk_marshal_STRING__INT, marshaller_hashtable);
--- a/src/menubar-gtk.c	Thu May 09 08:33:46 2002 +0000
+++ b/src/menubar-gtk.c	Thu May 09 13:49:42 2002 +0000
@@ -754,7 +754,14 @@
 	      /* #### Warning, dependency here on current_buffer and point */
 	      where_is_to_char (callback, buf);
 
-	      keys = eimake_string (buf);
+	      if (eilen (buf) > 0)
+		keys = eimake_string (buf);
+	      else
+		{
+		  
+		  keys = Qnil;
+		}
+
 	      eifree (buf);
 	    }
 	}
@@ -852,7 +859,13 @@
 
 	  if (STRINGP (keys) && XSTRING_LENGTH (keys))
 	    {
-	      l->accel_string = g_strdup (XSTRING_DATA (keys));
+	      C_STRING_TO_EXTERNAL_MALLOC (XSTRING_DATA (keys), l->accel_string,
+					   Qctext);
+	      stderr_out ("accel: %s\n", l->accel_string);
+	    }
+	  else
+	    {
+	      // l->accel_string = "";
 	    }
 	}