Commit Graph

168 Commits

Author SHA1 Message Date
Owen Taylor
3895bea4df #136672, reported by Christian Persch; fixes based on a patch by Soeren
Sun Mar 14 19:26:48 2004  Owen Taylor  <otaylor@redhat.com>

        #136672, reported by Christian Persch; fixes based
        on a patch by Soeren Sandmann.

        * gtk/gtkmenu.c: Change the handling of mixed gridded
        and non-gridded menu items; the old method was causing
        major performance problems even with the "avoid relayout
        on destruction" hack put in recently.

        Now we first lay out the gridded items and then put the
        non-gridded items into empty rows / after the gridded items.
        Layout is done in a central menu_shell_ensure_layout(). Also
        avoid emitting property notifications when we initially
        insert or attach items.

        * gtk/gtkmenushell.[ch] gtk/gtkmenu.c: Stop setting the
        unused menu_shell->menu_flag, and document it as unused
        in the header.

        * tests/testactions.c: Add a test of creating/removing
        lots of items.

        * test/testgtk.c: Add some more cruft to the menu test.
2004-03-15 02:03:59 +00:00
Owen Taylor
5c2b9546d6 Fix attach/attach->parent type. (#136919, Tim Mooney)
Thu Mar 11 16:28:15 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_get_toplevel): Fix attach/attach->parent
        type. (#136919, Tim Mooney)
2004-03-11 21:38:21 +00:00
Soeren Sandmann
db6cc5f788 Add boolean destroying (gtk_menu_destroy): Set priv->destroying
Tue Mar  9 02:11:50 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c Fix bug 136446.
	(struct _GtkMenuPrivate): Add boolean destroying
	(gtk_menu_destroy): Set priv->destroying
	(gtk_menu_remove): don't update the table information when the
	menu is being destroyed.

	* gtk/gtkmenu.c (gtk_menu_set_monitor): Formatting fix

	* gtk/gtktoolbar.[ch]: Some formatting fixes
2004-03-09 01:21:45 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Soeren Sandmann
cddfd994ef Patch from Frederic Crozat, test code from Jean-Philippe Chancelier. Fixes
Tue Mar  2 21:23:30 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Patch from Frederic Crozat, test code from Jean-Philippe
	Chancelier. Fixes bug #120479.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make sure popup belongs
	to the right window group.

	* gtk/gtkmenu.c (gtk_menu_popup): Same

	* tests/testsocket.c (main): Pack the plugs into an hbox instead
	of a vbox.

	* tests/testsocket_common.c: Add a GtkMenuBar, a GtkCombo and a
	GtkComboBox to the children.
2004-03-02 20:49:15 +00:00
Soeren Sandmann
41dfb5ec46 New internal function returning a good step value for the mouse wheel. For
Sun Feb 29 19:04:33 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkrange.c (_gtk_range_get_wheel_delta): New internal
	function returning a good step value for the mouse wheel. For
	scrollbars, base the step on page_size^(2/3), for other ranges,
	use 2 * step_increment.

	* gtk/gtkrange.c (gtk_range_scroll_event): Use it here ...

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event):
	... and here.

	* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix a warning.
2004-02-29 18:21:57 +00:00
Matthias Clasen
b1f74e779d Bug 112647 (Bill Haneman, patch by Narayana Pattipati):
Sun Feb 22 00:23:40 2004  Matthias Clasen  <maclas@gmx.de>

	Bug 112647 (Bill Haneman, patch by Narayana Pattipati):

	* gtk/gtkcheckmenuitem.c: Introduce a new style property
	indicator_size and use it instead of the hardcoded value.

	* gtk/gtkmenu.c (gtk_menu_size_request): Make sure each menu
	item gets enough vertical space for the label and the indicator.
2004-02-21 23:25:29 +00:00
Soeren Sandmann
d49a0c52bc Bug 132502
Sat Feb 21 19:18:26 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 132502

	* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
	if we enter a non-selectable menu item.

	* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
	when the user has left the item.
2004-02-21 18:20:59 +00:00
Matthias Clasen
9397b0dc0a ...and don't forget to initalize priv->columns to 1.
Tue Feb 17 23:28:33 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_init): ...and don't forget to initalize
	priv->columns to 1.
2004-02-17 22:25:13 +00:00
Matthias Clasen
c1d9c02b09 Make sure that we keep priv->columns >= 1 even for empty menus, since we
Tue Feb 17 23:11:21 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_do_remove): Make sure that we keep
	priv->columns >= 1 even for empty menus, since we divide by it
	somewhere else.  (#133428, Vincent Noel)
2004-02-17 22:16:02 +00:00
Matthias Clasen
519a586ac4 Make menus work better on Xinerama (#126150):
Tue Jan 27 01:46:54 2004  Matthias Clasen  <maclas@gmx.de>

	Make menus work better on Xinerama (#126150):

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Calculate the
	monitor_num on the screen of the menu, not of the attach widget.

	* gtk/gtkmenu.c (menu_change_screen): Forget the stored monitor_num.
	(gtk_menu_window_size_request): Remember the monitor_num.
2004-01-27 00:49:03 +00:00
Soeren Sandmann
e133455aa7 Changing to 200 was a mistake. Change back to 225.
Fri Jan 23 16:58:28 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (DEFAULT_POPUP_DELAY): Changing to 200 was a
	mistake. Change back to 225.
2004-01-23 16:00:20 +00:00
Matthias Clasen
d49500e4b7 Remove the attach info after calling gtk_menu_do_remove(), since that
Thu Jan 22 21:45:24 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_remove): Remove the attach
	info after calling gtk_menu_do_remove(), since that function
	uses the attach info. Doh!

	* gtk/gtkmenu.c (gtk_menu_do_remove): Don't check priv->columns
	for being 1 directly after setting it to 0.
2004-01-22 20:45:36 +00:00
Matthias Clasen
d7bfabebdb Fixes for #130370, based on a patch by Michael Meeks:
Tue Jan 20 22:11:31 2004  Matthias Clasen  <maclas@gmx.de>

	Fixes for #130370, based on a patch by Michael Meeks:

	* gtk/gtkmenu.c (gtk_menu_do_remove): New auxiliary function to
	adjust cell positions and recalculate row and column counts after
	removing an item.

	* gtk/gtkmenu.c (gtk_menu_remove): Call gtk_menu_do_remove.

	* gtk/gtkmenu.c (gtk_menu_do_insert): Don't leave empty rows when
	appending items.

	* gtk/gtkmenu.c (gtk_menu_attach): Don't call gtk_menu_shell_append,
	to avoid an unintended recursion.
2004-01-20 21:11:30 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Matthias Clasen
b21fe1745c New function to emit the "cancel" signal on a menu shell.
Sun Dec 21 01:54:40 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenushell.h:
	* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
	to emit the "cancel" signal on a menu shell.

	* gtk/gtkmenu.c (gtk_menu_key_press):
	* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
	* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
	new function instead of directly emitting the
	signal.  (#81803, Owen Taylor)
2003-12-21 00:59:46 +00:00
Kristian Rietveld
8a834dce94 move item insertion logic here from gtk_menu_real_insert(),
Fri Dec 19 21:52:46 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkmenu.c (gtk_menu_do_insert): move item insertion logic
	here from gtk_menu_real_insert(),
	(gtk_menu_real_insert): just call gtk_menu_do_insert(),
	(gtk_menu_reorder_child): run _do_insert after inserting the child
	(unbreaks _reorder_child, reported by Tim Janik).
2003-12-19 20:56:19 +00:00
Owen Taylor
85c05a86c0 === Released 2.3.1 ===
Mon Dec  8 10:54:44 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.3.1 ===

        * NEWS: Updates for 2.3.1

        * configure.in: Version 2.3.1, interface age 0, binary age 301.

        * gtk/gtkmenuitem.c (gtk_menu_item_can_activate_accel):
        Rename from gtk_menu_item_real_can_activate_accel() to
        match GTK+ convention, improve comment.

        * gtk/gtkwidget.c: Document gtk_widget_can_activate_accel(),
        can ::can-activate-accel signal.

        * gtk/gtkwidget.c (closure_accel_activate): Fix spelling
        in comment.

        * gtk/gtkmenu.c (gtk_menu_real_can_activate_accel): Clean
        up comment.

        * gtk/gtkcellview{,menuitem}.[ch]: Move GET_PRIVATE() macros
        into the .c file.

Mon Dec  8 12:09:21 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkicontheme.c (find_builtin_icon): Fix a
        missing 'else'. (#128816, Jorn Baayen)
2003-12-08 22:55:03 +00:00
Tim Janik
47f63b8cb2 fix comment typo 2003-12-08 16:02:25 +00:00
Tim Janik
448b576dc1 allow accel activation depending on sensitivity and the attach widget.
Thu Nov 27 16:19:03 2003  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.c: allow accel activation depending on sensitivity
        and the attach widget.

        * gtk/gtkmenuitem.c: allow accel activation depending on visibility,
        sensitivity and the parent menu.

        * gtk/gtkwidget.[hc]: introduced ::can-activate-accel signal which
        checks whether accelerators may activate a widget. the default handler
        demands the widget be sensitive and visible+viewable.

        * gtk/gtkaccelgroup.[hc]: export gtk_accel_group_activate().
2003-11-27 15:51:32 +00:00
Manish Singh
d263d0bcc0 cast to GTK_WIDGET() for the gtk_widget_hide() call.
Thu Nov 20 15:41:56 2003  Manish Singh  <yosh@gimp.org>

        * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): cast to GTK_WIDGET()
        for the gtk_widget_hide() call.
2003-11-20 23:42:08 +00:00
Soeren Sandmann
907483c615 set to 200 instead of 225 Impose a minimum width on items that have a
Wed Nov 19 18:15:00 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (DEFAULT_POPUP_DELAY): set to 200 instead of 225
	* gtk/gtkmenuitem.c (get_minimum_width): Impose a minimum width
	on items that have a submenu. (#120104).

Wed Nov 19 18:11:08 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoolbar.c (struct _ToolbarContent): Add a new
	"ItemState" field indicating the overflowed-ness etc. of the item.
	(gtk_toolbar_size_allocate): update the field here.
2003-11-19 19:44:45 +00:00
Matthias Clasen
80bb353808 Call gtk_widget_hide(menu) when reattaching the menu. (#126057)
Wed Nov 19 02:18:37 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_set_tearoff_state): Call
	gtk_widget_hide(menu) when reattaching the menu.  (#126057)
2003-11-19 01:21:46 +00:00
Matthias Clasen
e71bcc8487 Changes to improve menu positioning on Xinerama (#108328):
Wed Nov 12 21:40:10 2003  Matthias Clasen  <maclas@gmx.de>

	Changes to improve menu positioning on Xinerama (#108328):

	* gtk/gtkmenu.c (struct _GtkMenuPrivate): Add a menu_num field
	to store the monitor on which the menu is to be positioned.

	* gtk/gtkmenu.[hc] (gtk_menu_position): Store the monitor number
	in the GtkMenuPrivate struct and fetch the monitor geometry after
	calling the position_func, in case it has been changed.

	* gtk/gtkmenu.c (gtk_menu_set_monitor): New function
	to be used in GtkMenuPositionFunc implementations for setting
	the monitor_num field in GtkMenuPrivate.

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Call
	gtk_menu_set_monitor.
2003-11-12 20:53:03 +00:00
Padraig O'Briain
9d84901592 Do not let pointer position affect window menu position when popped from
2003-11-12  Padraig O'Briain  <padraig.obriain@sun.com>

	* gtk/gtkmenu.c (gtk_menu_popup): Do not let pointer position
	affect window menu position when popped from keyboard. (#102660)
2003-11-12 09:09:25 +00:00
Matthias Clasen
3110ca2f17 Set torn off menus to be transient for the toplevel they were torn off
Wed Nov  5 22:49:36 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenu.c (gtk_menu_set_tearoff_state): Set torn off
	menus to be transient for the toplevel they were torn off from.
	(gtk_menu_get_toplevel): Auxiliary function to find the
	toplevel of a menu.  (#54775, Jon-Kare Hellan)
2003-11-05 21:50:51 +00:00
Matthias Clasen
d381967d5c Changes to make cross-process merging feasible:
2003-09-21  Matthias Clasen  <maclas@gmx.de>

	Changes to make cross-process merging feasible:

	* gtk/gtkuimanager.[hc]: Add a readonly "ui" property which holds the
	merged UI definition. Remove the "changed" signal, since its role
	is now filled by "notify::ui". Instead add a "actions-changed" signal
	which gets emitted when the set of actions changes.

	* gtk/gtktoggleactionprivate.h:
	* gtk/gtktoggleaction.[hc] (gtk_toggle_action_[sg]et_draw_as_radio):
	Add a "draw_as_radio" property to toggle actions so that they can be
	used as proxies for radio actions much like the "draw_as_radio"
	property on check menu items enables them to operate as proxies for
	radio actions.

	Prevent the "show_all" trap for action-based menus (see
	http://mail.gnome.org/archives/gtk-devel-list/2003-September/
	msg00260.html):

	* gtk/gtkmenu.c (gtk_menu_{hide,show}_all): Remove g_return_if_fail()
	calls from static functions.

	* gtk/gtkuimanager.c (update_node):
	* gtk/gtkaction.c (connect_proxy): Set "no_show_all" on constructed
	widgets whose visibility is externally controlled.

	* gtk/gtkwidget.[hc] (gtk_widget_[gs]et_no_show_all): Add a boolean
	"no_show_all" property with setter and getter. When TRUE, it keeps
	gtk_widget_{hide,show}_all() from modifying the visibility of the
	widget and its children.
2003-09-21 22:04:48 +00:00
Matthias Clasen
6f81c10a54 Add table menu tests.
2003-09-11  Matthias Clasen  <maclas@gmx.de>

	* tests/testgtk.c: Add table menu tests.

	* gtk/gtkmenu.c (gtk_menu_free_private): Don't forget to free the
	GtkMenuPrivate struct itself. Pointed out by valgrind.

	* gtk/gtkuimanager.c (gtk_ui_manager_finalize): Clean up
	properly.  (#121998)
2003-09-11 21:02:24 +00:00
Kristian Rietveld
e23ed60782 The table menu patch! Turns GtkMenu into a table, so you can attach menu
Wed Sep 10 22:25:04 2003  Kristian Rietveld  <kris@gtk.org>

	The table menu patch! Turns GtkMenu into a table, so you can attach
	menu items in numerous new ways! Be creative!

	Contains some bug fixes and RTL adaptions from Matthias Clasen.

	* gtk/gtkmenu.c [toplevel]: introduce ATTACH_INFO_KEY, extend
	GtkMenuPrivate, introduce AttachInfo, add child properties enum,
	(gtk_menu_free_private), (gtk_menu_get_private): we have to free
	the heights array in the private struct,
	(gtk_menu_class_init): reorder code a bit, install child properties,
	(get_attach_info), (get_child_attach): new utility functions,
	(gtk_menu_set_child_property), (gtk_menu_get_child_property): introduce
	child properties, for the attach info,
	(gtk_menu_remove): remove AttachInfo from menu item,
	(gtk_menu_real_insert): implemented algorithm to automagically place
	inserted menu items at the correct place in the table,
	(gtk_menu_size_request), (gtk_menu_size_allocate),
	(compute_child_offset): reworked/rewritten to support table menus,
	(gtk_menu_attach): new function,
	(find_child_containing), (gtk_menu_move_current): new functions to
	get table menu keynav right.

	* gtk/gtkmenu.h: add gtk_menu_attach() prototype.
2003-09-10 20:32:33 +00:00
Kristian Rietveld
bc61e7233b Merge from stable.
Wed Sep  3 23:18:17 2003  Kristian Rietveld  <kris@gtk.org>

	Merge from stable.

	* gtk/gtkmenu.c (gtk_menu_real_move_scroll): for the END case,
	use end_position - page_size instead of G_MAXINT, since
	gtk_menu_scroll_to doesn't CLAMP anymore internally. (Fixes #121237,
	reported by Havoc Pennington).
2003-09-03 21:26:13 +00:00
Kristian Rietveld
eccc733f29 brooooooooken pipe. 2003-09-03 19:57:05 +00:00
Kristian Rietveld
0321556d15 Thu Aug 21 21:27:45 2003 Kristian Rietveld <kris@gtk.org>A
Merge from stable.

	Fix option menu scrolling (#119821, Owen Taylor).

	* gtk/gtkmenu.c (gtk_menu_scroll_to): remove logic introduced
	by #80484 and the CLAMP,
	(get_menu_height): new function,
	(gtk_menu_real_move_scroll): sort of moved the CLAMP here to correct
	new_offset to handle page up/down right.
2003-08-21 19:42:44 +00:00
Owen Taylor
91d3768017 Fix some places that weren't properly Xinerama-ified.
Wed Aug 13 16:32:43 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
        Fix some places that weren't properly Xinerama-ified.

        * gtk/gtkmenu.c: Fix problem with windows that scroll
        at the top of the screen.
2003-08-13 20:45:37 +00:00
Soeren Sandmann
094657e85b New positioning algorithm.(#116649)
Tue Aug  5 00:24:13 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_position): New positioning
	algorithm.(#116649)
2003-08-04 22:09:02 +00:00
Søren Sandmann Pedersen
1a5a17d629 Revert accidentally committed changes. 2003-07-13 02:42:40 +00:00
Søren Sandmann Pedersen
31d6d0aab6 Broken pipe 2003-07-13 02:33:25 +00:00
Soeren Sandmann
d77b4c1448 new properties "horizontal-offset" and "vertical-offset" that determines
Sun Jul 13 01:37:51 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_class_init): new properties
	"horizontal-offset" and "vertical-offset" that determines the
	position of the menu when it is a submenu.

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): position
	submenus according to new vertical- and horizontal-offset
	properties.
2003-07-12 23:25:14 +00:00
Soeren Sandmann
c8515b2f8d add vertical_padding style property.
Sat Jul  5 10:34:00 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

        * gtk/gtkmenu.c: add vertical_padding style property.

        * gtk/gtkmenuitem.c: add style properties toggle_spacing,
        arrow_spacing and horizontal_padding. Also center separators and
        make them a bit taller.

        * gtk/*menuitem.c: use new style properties.

        * docs/widget_geometry.txt: Add note about GtkMenuItem

        * gtk/gtkstyle.c
        (gtk_default_draw_vline, gtk_default_draw_hline):
        fix +/-1 errors.

        (gtk_default_draw_shadow): draw a black border around menus.

        * gtk/gtkvseparator, gtk/gtkhseparator.c, gtk/gtkmenuitem.c: fix
        calls to gtk_paint_hline() and gtk_paint_vline() (they take x1,
        x2 and y1, y2 respectively, not x, width and y, height).
2003-07-06 13:14:28 +00:00
Manish Singh
dd74be94c6 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 17:44:24 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 01:45:51 +00:00
Matthias Clasen
b414adc897 Replace uses of gtk_timeout_* and gtk_idle_* by their non-deprecated
GLib counterparts. Fully deprecate gtk_timeout_* and gtk_idle_*.
2003-02-05 23:48:11 +00:00
Owen Taylor
08a08cf1b5 Add a new binding signal, "move_scroll", and use it to hook up
Sat Dec 14 14:19:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c: Add a new binding signal, "move_scroll",
        and use it to hook up Home/End/Page_Up/Page_Down keybindings.
        (#80484, Narayana Pattipati, Marius Andreiana)

        * gtk/gtkmenu.c (gtk_menu_scroll_item_visible): Fix some
        bugs in the computation of when an item is visible. (#99545)

        * gtk/gtkbindings.[ch] (_gtk_binding_signal_new) gtk/gtkmenushell.c:
        Move here, export privately.

        * gtk/gtkmenushell.c (_gtk_menu_shell_select_last): Export
        privately.

        * gtk/gtkmenushell.c (gtk_menu_shell_select_item): Don't
        select the item if it is already selected.
2002-12-14 22:43:52 +00:00
Owen Taylor
ad3ca8430d Handle the case where the pointer isn't on the same screen as the widget
Sat Dec 14 01:00:12 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_position): Handle the case
        where the pointer isn't on the same screen as the widget
        by centering the menu on the widget's screen. (#94563)
2002-12-14 06:05:00 +00:00
Owen Taylor
d8bc318151 gdk/gdkscreen.c (gdk_screen_get_monitor_at_point) Provide a useful
Fri Dec 13 23:58:06 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkscreen.c (gdk_screen_get_monitor_at_point)
	* gdk/gdkscreen.c (gdk_screen_get_monitor_at_window):
	Provide a useful fallback on failure - return a monitor
	close to the point or window. (#79991)

	* gtk/gtkmenu.c (gtk_menu_position): Remove a now
	unneeded check for failure of
	gdk_screen_get_monitor_at_point()
2002-12-14 05:27:23 +00:00
Owen Taylor
4f14fc15e6 If the screen for the menu changes while the menu is torn off, move the
Fri Dec 13 22:55:27 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (menu_change_screen): If the screen
        for the menu changes while the menu is torn off, move
        the tearoff along with it. (#85669)

        * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
        reattaching, get rid of the get rid of the tearoff window.
2002-12-14 04:07:08 +00:00
Owen Taylor
17bbbde74a Use the correct screen for getting the height. (Fix from Stephen Browne,
Fri Dec  6 17:46:42 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_window_size_request): Use
        the correct screen for getting the height.
        (Fix from Stephen Browne, #96777)
2002-12-06 22:49:56 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Matthias Clasen
7d62f9ed78 Fix doc comment typos. (#98480, Vitaly Tishkov)
* gtk/gtkmenu.c (gtk_menu_set_screen): Fix doc comment
	typos.  (#98480, Vitaly Tishkov)
2002-11-21 19:12:43 +00:00
Owen Taylor
c26787be57 Monitor the screen of the attach widget continually, rather than only
Thu Nov 14 00:33:26 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (attach_widget_screen_changed): Monitor
        the screen of the attach widget continually, rather than only
        setting the screen only on popup (#85710)

        * gtk/gtkmenu.c (gtk_menu_set_screen): Allow %NULL to
        go back to getting the screen from the attach widget.
2002-11-14 05:46:34 +00:00
Soeren Sandmann
3b5d33adc7 Do not return when menu_shell->ignore_enter is TRUE.
Tue Nov 12 14:20:53 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_enter_notify): Do not return when
	menu_shell->ignore_enter is TRUE.
2002-11-12 13:25:04 +00:00
Soeren Sandmann
a9cd971729 Don't return after calling gtk_menu_handle_scrolling() when
Sun Nov 10 22:55:39 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_enter_notify): Don't return after
	calling gtk_menu_handle_scrolling() when
	!menu_shell->ignore_enter.
2002-11-10 22:04:16 +00:00