Mercurial > hg > xemacs-beta
comparison src/menubar-gtk.c @ 2168:95fee4a1420e
[xemacs-hg @ 2004-07-07 12:00:58 by malcolmp]
Working GK tab_control widget. Other GTK widgets drawn with the correct
location and size.
author | malcolmp |
---|---|
date | Wed, 07 Jul 2004 12:01:07 +0000 |
parents | e8db6a10ad42 |
children | 04bc9d2f42c7 |
comparison
equal
deleted
inserted
replaced
2167:54e1ecdc5778 | 2168:95fee4a1420e |
---|---|
732 } | 732 } |
733 | 733 |
734 return (menu_item); | 734 return (menu_item); |
735 } | 735 } |
736 | 736 |
737 static struct frame * | |
738 __get_channel (GtkWidget *w) | |
739 { | |
740 struct frame *f = NULL; | |
741 | |
742 for (; w; w = w->parent) | |
743 { | |
744 if ((f = (struct frame *) gtk_object_get_data (GTK_OBJECT (w), "xemacs::frame"))) | |
745 return (f); | |
746 } | |
747 | |
748 return (selected_frame()); | |
749 } | |
750 | |
751 | |
752 /* Called whenever a button, radio, or toggle is selected in the menu */ | 737 /* Called whenever a button, radio, or toggle is selected in the menu */ |
753 static void | 738 static void |
754 __generic_button_callback (GtkMenuItem *item, gpointer user_data) | 739 __generic_button_callback (GtkMenuItem *item, gpointer user_data) |
755 { | 740 { |
756 Lisp_Object callback, function, data, channel; | 741 Lisp_Object callback, function, data, channel; |
757 | 742 |
758 channel = wrap_frame (__get_channel (GTK_WIDGET (item))); | 743 channel = wrap_frame (gtk_widget_to_frame (GTK_WIDGET (item))); |
759 | 744 |
760 callback = VOID_TO_LISP (user_data); | 745 callback = VOID_TO_LISP (user_data); |
761 | 746 |
762 get_gui_callback (callback, &function, &data); | 747 get_gui_callback (callback, &function, &data); |
763 | 748 |