diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-08-27 15:17:51 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-08-27 15:17:51 +0000 |
commit | 807c619d8247be0dfdaadcaaf7a5fd5ea798b057 (patch) | |
tree | b0b2aa979cd8204779fbfe1878ac73d3c7c2739a | |
parent | b5857e558b3c2dd9c930d1c9257fe89edd328cf8 (diff) | |
download | gtk+-807c619d8247be0dfdaadcaaf7a5fd5ea798b057.tar.gz |
Use autoconf 2.13/2.50 compat macro.
Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com>
* configure.in acinclude.m4: Use autoconf 2.13/2.50 compat
macro.
(patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920)
* gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change
interface to be a standard setter from gtk_menu_item_right_justify.
(gtk_menu_item_get_right_justified): a getter to go with the setter
* gtk/gtkmenuitem.h: Add a deprecated compat macro for
gtk_menu_item_right_justify.
* demos/gtk-demo/menus.c tests/testgtk.c: Switch to
gtk_menu_item_set_right_justified.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 17 | ||||
-rw-r--r-- | acinclude.m4 | 14 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | demos/gtk-demo/menus.c | 2 | ||||
-rw-r--r-- | docs/Changes-2.0.txt | 10 | ||||
-rw-r--r-- | gtk/gtkitemfactory.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenuitem.c | 43 | ||||
-rw-r--r-- | gtk/gtkmenuitem.h | 8 | ||||
-rw-r--r-- | tests/testgtk.c | 2 |
15 files changed, 195 insertions, 13 deletions
@@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b1e05f8aea..f1902b0277 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,20 @@ +Sun Aug 26 20:00:00 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in acinclude.m4: Use autoconf 2.13/2.50 compat + macro. + + (patch from ERDI Gergo <cactus@cactus.rulez.org>, #58920) + + * gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change + interface to be a standard setter from gtk_menu_item_right_justify. + (gtk_menu_item_get_right_justified): a getter to go with the setter + + * gtk/gtkmenuitem.h: Add a deprecated compat macro for + gtk_menu_item_right_justify. + + * demos/gtk-demo/menus.c tests/testgtk.c: Switch to + gtk_menu_item_set_right_justified. + 2001-08-27 Jens Finke <jens@gnome.org> * gtk+.spec.in: Updated to match gpp requirements, reworked the diff --git a/acinclude.m4 b/acinclude.m4 index c3ab3f0824..b7d7fd53ab 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,3 +1,17 @@ +# autoconf 2.13 / 2.50 compatibility macro + +# GLIB_AC_DIVERT_BEFORE_HELP(STUFF) +# --------------------------------- +# Put STUFF early enough so that they are available for $ac_help expansion. +# Handle both classic (<= v2.13) and modern autoconf +AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP], +[ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])], + [ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +$1 +AC_DIVERT_POP()])])]) + + # Macro to add for using GNU gettext. # Ulrich Drepper <drepper@cygnus.com>, 1995. # diff --git a/configure.in b/configure.in index 9a0fc098ad..db0738b14a 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ cflags_set=${CFLAGS+set} dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they dnl are available for $ac_help expansion (don't we all *love* autoconf?) -AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +GLIB_AC_DIVERT_BEFORE_HELP([ # # Making releases: # GTK_MICRO_VERSION += 1; @@ -39,7 +39,7 @@ GTK_INTERFACE_AGE=0 GTK_BINARY_AGE=0 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION dnl -AC_DIVERT_POP()dnl +])dnl AC_SUBST(GTK_MAJOR_VERSION) AC_SUBST(GTK_MINOR_VERSION) @@ -98,13 +98,13 @@ AC_CANONICAL_HOST dnl figure debugging default, prior to $ac_help setup dnl -AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +GLIB_AC_DIVERT_BEFORE_HELP([ if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then debug_default=yes else debug_default=minimum fi -AC_DIVERT_POP()dnl +])dnl dnl declare --enable-* args and collect ac_help strings AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default) diff --git a/demos/gtk-demo/menus.c b/demos/gtk-demo/menus.c index 71ecfca0bc..6dba405d78 100644 --- a/demos/gtk-demo/menus.c +++ b/demos/gtk-demo/menus.c @@ -128,7 +128,7 @@ do_menus (void) menuitem = gtk_menu_item_new_with_label ("bar"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (4, TRUE)); - gtk_menu_item_right_justify (GTK_MENU_ITEM (menuitem)); + gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem); gtk_widget_show (menuitem); diff --git a/docs/Changes-2.0.txt b/docs/Changes-2.0.txt index 7d4ce76205..9b2371f07d 100644 --- a/docs/Changes-2.0.txt +++ b/docs/Changes-2.0.txt @@ -443,6 +443,14 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0: - For NO_WINDOW widgets, if you create windows in your realize() method, you must map then in map() and unmap them in unmap(). +* gtk_widget_set_default_style (), gtk_widget_push_style (), + and gtk_widget_pop_style () have been removed, since they + did not work properly with themes and there were better + alternatives for modifying the appearance of widgets. + + You should generally use gtk_widget_modify_fg/bg/base/text/font + instead. + * gtk_image_new() now takes no arguments and creates an empty GtkImage widget. To create a GtkImage widget from a GdkImage (the least - common usage of GdkImage), use gtk_image_new_from_image.
\ No newline at end of file + common usage of GdkImage), use gtk_image_new_from_image. diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index 3aa134183e..f14612a3f3 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1288,7 +1288,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, entry->path); if (type_id == quark_type_last_branch) - gtk_menu_item_right_justify (GTK_MENU_ITEM (widget)); + gtk_menu_item_set_right_justified (GTK_MENU_ITEM (widget), TRUE); parent = widget; widget = gtk_widget_new (GTK_TYPE_MENU, diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index b334d26e2e..2fbb220219 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -817,12 +817,49 @@ gtk_menu_item_position_menu (GtkMenu *menu, *y = ty; } +/** + * gtk_menu_item_set_right_justified: + * @menu_item: a #GtkMenuItem. + * @right_justified: if %TRUE the menu item will appear at the + * far right if added to a menu bar. + * + * Sets whether the menu item appears justified at the right + * side of a menu bar. This was traditionally done for "Help" menu + * items, but is now considered a bad idea. (If the widget + * layout is reversed for a right-to-left language like Hebrew + * or Arabic, right-justified-menu-items appear at the left.) + **/ void -gtk_menu_item_right_justify (GtkMenuItem *menuitem) +gtk_menu_item_set_right_justified (GtkMenuItem *menu_item, + gboolean right_justified) { - g_return_if_fail (GTK_IS_MENU_ITEM (menuitem)); + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + + right_justified = right_justified != FALSE; - menuitem->right_justify = 1; + if (right_justified != menu_item->right_justify) + { + menu_item->right_justify = right_justified; + gtk_widget_queue_resize (GTK_MENU_ITEM (menu_item)); + } +} + +/** + * gtk_menu_item_get_right_justified: + * @menu_item: a #GtkMenuItem + * + * Gets whether the menu item appears justified at the right + * side of the menu bar. + * + * Return value: %TRUE if the menu item will appear at the + * far right if added to a menu bar. + **/ +gboolean +gtk_menu_item_get_right_justified (GtkMenuItem *menu_item) +{ + g_return_val_if_fail (GTK_IS_MENU_ITEM (menu_item), FALSE); + + return menu_item->right_justify; } diff --git a/gtk/gtkmenuitem.h b/gtk/gtkmenuitem.h index d2cd71078c..90005d81f1 100644 --- a/gtk/gtkmenuitem.h +++ b/gtk/gtkmenuitem.h @@ -103,9 +103,13 @@ void gtk_menu_item_toggle_size_request (GtkMenuItem *menu_item, gint *requisition); void gtk_menu_item_toggle_size_allocate (GtkMenuItem *menu_item, gint allocation); -void gtk_menu_item_right_justify (GtkMenuItem *menu_item); - +void gtk_menu_item_set_right_justified (GtkMenuItem *menu_item, + gboolean right_justified); +gboolean gtk_menu_item_get_right_justified (GtkMenuItem *menu_item); +#ifndef GTK_DISABLE_DEPRECATED +#define gtk_menu_item_right_justify(menu_item) gtk_menu_item_set_right_justified ((menu_item), TRUE) +#endif /* GTK_DISABLE_DEPRECATED */ #ifdef __cplusplus } diff --git a/tests/testgtk.c b/tests/testgtk.c index 3784953629..233a4b5c39 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -2864,7 +2864,7 @@ create_menus (void) menuitem = gtk_image_menu_item_new_with_label ("Help"); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (4, 5, TRUE)); - gtk_menu_item_right_justify (GTK_MENU_ITEM (menuitem)); + gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE); gtk_menu_bar_append (GTK_MENU_BAR (menubar), menuitem); gtk_widget_show (menuitem); |