the recent NLS patch has triggered a bug related to every menu
callback functions.
The bug shows up with Object/Align */* and every View/Zoom/*
menu operation.
Looking in the current Gtk sources shows two valid declarations
for the menu callback functions:
typedef void (*GtkItemFactoryCallback1)
(gpointer callback_data,
guint callback_action,
GtkWidget *widget);
typedef void (*GtkItemFactoryCallback2)
(GtkWidget *widget,
gpointer callback_data,
guint callback_action);
Dias callback function were declared as (e.g.):
void view_zoom_set_callback(GtkWidget *widget, gpointer data);
which - by chance - worked with the first callback declaration
(as long as the additional parameter was meant as the action
parameter), but since the NLS patch the second form is required.
If someone with an older version of gtk could check it on *ix, or
noone objects I could commit to cvs. The patch is rather huge
(so not included here) but simple like:
-void view_zoom_set_callback(GtkWidget *widget, gpointer data);
+void view_zoom_set_callback(GtkWidget *widget, gpointer data, guint action);
...
void
-view_zoom_set_callback(GtkWidget *widget, gpointer data)
+view_zoom_set_callback(GtkWidget *widget, gpointer data, guint action)
{
DDisplay *ddisp;
#ifndef GNOME
@@ -594,7 +594,7 @@
scale = ((real) v)/100.0 * DDISPLAY_NORMAL_ZOOM;
}
# else
- percent = (int) data;
+ percent = (int) action;
scale = ((real) percent)/1000.0 * DDISPLAY_NORMAL_ZOOM;
# endif
BTW: the error shows up with recent Helix Gnome's Dia 0.86, too.
BTW2: app/pixmaps/snap-to-grid.xpm and mask are missing in cvs.
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert