At 10:30 02.11.00 +0800, James Henstridge wrote:
>On Tue, 31 Oct 2000, Hans Breuer wrote:
>> At 09:14 31.10.00 +0800, James Henstridge wrote:
>> >On Fri, 27 Oct 2000, Hans Breuer wrote:
>> >
>> >> the recent NLS patch has triggered a bug related to every menu
>> >> callback functions.
>> >>
>> >> [...]
>> >Ugh. This is going to cause some problems.
>> >
>> >The GNOME version of the menus use the same set of callbacks, and the
>> >signature they require is (GtkWidget *, gpointer). In all cases, we don't
>> >care about the GtkWidget* argument, so we just need to make sure that
>> >the action (item factory) / user_data (gnome menus) is the second
>> >argument. Is there any particular reasons to switch to the other ordering
>> >for the callback arguments for the item factory based code?
>> >
>> The small sollution could be to adapt only the two (?) functions requiring
>> the action parameter and #ifdef GNOME there declaration. Should I commit
>> such a sollution?
>>
>> void
>> #ifdef GNOME
>> view_zoom_set_callback(GtkWidget *widget, gpointer data)
>> #else
>> view_zoom_set_callback(GtkWidget *widget, gpointer data, guint action)
>> #endif
>
>I will have to think about this a bit more.
>
Hi James,
For the records: I have just committed the minimum patch descried above.
2001-01-05 Hans Breuer <[EMAIL PROTECTED]>
* app/commands.[hc] : corrected the signature for gtk menu callback
functions, which actually use the second or third parameter. This
is the absolute minimum change to make these functions/menu entries
work again. Using the other possible gtk menu callback signature
would have required one more function to change. (see mailing list
thread "Objects/Align/Equal Distance" for more information.
These are the reasons:
Setting the 2 to 1 in the following call (menus.c) :
menus_create_items (display_item_factory,
display_nmenu_items,
display_menu_items,
NULL, 2);
would require the following functions to be treated special,
cause they are using the widget parameter.
view_aa_callback
view_visible_grid_callback
view_snap_to_grid_callback
view_toggle_rulers_callback
I still think the much cleaner way to do all this, would be to change *all*
menu call back functions, as suggested in my previous patch. But the
changes described here, are the absolute minimum to make Dia work as expected
again.
Regards,
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert