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.
This commit is contained in:
Owen Taylor 2001-08-27 15:17:51 +00:00 committed by Owen Taylor
parent b5857e558b
commit 807c619d82
15 changed files with 195 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.
#

View File

@ -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)

View File

@ -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);

View File

@ -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.
common usage of GdkImage), use gtk_image_new_from_image.

View File

@ -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,

View File

@ -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));
menuitem->right_justify = 1;
right_justified = right_justified != FALSE;
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;
}

View File

@ -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
}

View File

@ -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);