]> Pileus Git - ~andy/gtk/commitdiff
don't try and store pointers in ints. Fixes 64-bit build.
authorMark McLoughlin <mark@skynet.ie>
Wed, 3 Mar 2004 19:03:19 +0000 (19:03 +0000)
committerMark McLoughlin <markmc@src.gnome.org>
Wed, 3 Mar 2004 19:03:19 +0000 (19:03 +0000)
2004-03-03  Mark McLoughlin  <mark@skynet.ie>

        * tests/testsocket_common.c: (print_hello): don't try and store
        pointers in ints. Fixes 64-bit build.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/testsocket_common.c

index 3fb14275eedf2169406d7b46c7f00659629eea21..27ab8bb86861d1d999dee9804dd8265f66862dea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-03  Mark McLoughlin  <mark@skynet.ie>
+
+       * tests/testsocket_common.c: (print_hello): don't try and store
+       pointers in ints. Fixes 64-bit build.
+
 2004-03-03  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilesystem.c (gtk_file_system_get_parent): Simplify by
index 3fb14275eedf2169406d7b46c7f00659629eea21..27ab8bb86861d1d999dee9804dd8265f66862dea 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-03  Mark McLoughlin  <mark@skynet.ie>
+
+       * tests/testsocket_common.c: (print_hello): don't try and store
+       pointers in ints. Fixes 64-bit build.
+
 2004-03-03  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilesystem.c (gtk_file_system_get_parent): Simplify by
index 3fb14275eedf2169406d7b46c7f00659629eea21..27ab8bb86861d1d999dee9804dd8265f66862dea 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-03  Mark McLoughlin  <mark@skynet.ie>
+
+       * tests/testsocket_common.c: (print_hello): don't try and store
+       pointers in ints. Fixes 64-bit build.
+
 2004-03-03  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilesystem.c (gtk_file_system_get_parent): Simplify by
index 3fb14275eedf2169406d7b46c7f00659629eea21..27ab8bb86861d1d999dee9804dd8265f66862dea 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-03  Mark McLoughlin  <mark@skynet.ie>
+
+       * tests/testsocket_common.c: (print_hello): don't try and store
+       pointers in ints. Fixes 64-bit build.
+
 2004-03-03  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilesystem.c (gtk_file_system_get_parent): Simplify by
index 3fb14275eedf2169406d7b46c7f00659629eea21..27ab8bb86861d1d999dee9804dd8265f66862dea 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-03  Mark McLoughlin  <mark@skynet.ie>
+
+       * tests/testsocket_common.c: (print_hello): don't try and store
+       pointers in ints. Fixes 64-bit build.
+
 2004-03-03  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilesystem.c (gtk_file_system_get_parent): Simplify by
index 6e96d35cd9ee14121d11ae72f1ab766367fcfbfd..2e2aa0532873daa6097a2a300ee161f4dc976dfc 100644 (file)
@@ -3,21 +3,47 @@
 #include "x11/gdkx.h"
 #include <gtk/gtk.h>
 
+enum
+{
+  ACTION_FILE_NEW,
+  ACTION_FILE_OPEN,
+  ACTION_OK,
+  ACTION_HELP_ABOUT
+};
+
 static void
-print_hello (GtkWidget *w, gpointer data)
+print_hello (GtkWidget *w,
+            guint      action)
 {
-  g_message (data);
+  switch (action)
+    {
+    case ACTION_FILE_NEW:
+      g_message ("File New activated");
+      break;
+    case ACTION_FILE_OPEN:
+      g_message ("File Open activated");
+      break;
+    case ACTION_OK:
+      g_message ("OK activated");
+      break;
+    case ACTION_HELP_ABOUT:
+      g_message ("Help About activated ");
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
 }
 
 static GtkItemFactoryEntry menu_items[] = {
   { "/_File",         NULL,         NULL,           0, "<Branch>" },
-  { "/File/_New",     "<control>N", print_hello,    GPOINTER_TO_INT("File New activated"), "<Item>" },
-  { "/File/_Open",    "<control>O", print_hello,    GPOINTER_TO_INT("File Open activated"), "<Item>" },
+  { "/File/_New",     "<control>N", print_hello,    ACTION_FILE_NEW, "<Item>" },
+  { "/File/_Open",    "<control>O", print_hello,    ACTION_FILE_OPEN, "<Item>" },
   { "/File/sep1",     NULL,         NULL,           0, "<Separator>" },
   { "/File/Quit",     "<control>Q", gtk_main_quit,  0, "<Item>" },
-  { "/O_K",            "<control>K",print_hello,    GPOINTER_TO_INT("OK activated"), "<Item>" },
+  { "/O_K",            "<control>K",print_hello,    ACTION_OK, "<Item>" },
   { "/_Help",         NULL,         NULL,           0, "<LastBranch>" },
-  { "/_Help/About",   NULL,         print_hello,    GPOINTER_TO_INT("Help About activated "), "<Item>" },
+  { "/_Help/About",   NULL,         print_hello,    ACTION_HELP_ABOUT, "<Item>" },
 };
 
 static void