Commit Graph

299 Commits

Author SHA1 Message Date
Vadim Zeitlin
6abf7b639c Don't use invoking window in wxGTK wxMenuBar implementation.
wxGTK wxMenuBar used its own SetInvokingWindow/UnsetInvokingWindow() and
related functions instead of reusing the base class Attach/Detach() which
exist for exactly the same purpose. This resulted in unnecessary code
duplication and confusion and, since the changes of r64104, resulted in
asserts due to use of SetInvokingWindow() for non-popup menus.

Fix this by removing the wxGTK-specific functions and doing the work they used
to do in (now overridden) Attach() and Detach(). Also call Attach/Detach()
instead of these functions from wxGTK wxFrame and wxMDIParentFrame code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 15:08:00 +00:00
Vadim Zeitlin
341d8cb2cf Avoid code duplication in wxGTK menu events generation code.
Reuse the existing DoCommonMenuCallbackCode() function instead of duplicating
its code in menuitem_select() and menuitem_deselect() GTK callbacks.

No changes in behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 15:07:51 +00:00
Vadim Zeitlin
6ea0139862 No real changes, just remove empty wxMenuBar dtor in wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 15:07:47 +00:00
Julian Smart
426d19f139 Applied patch #9058 (add Hildon 2.0 support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 12:36:34 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Robert Roebling
496e7ec647 More GTK prefixing for internal methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-13 10:25:38 +00:00
Vadim Zeitlin
d3b9f782ef don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:55:27 +00:00
Paul Cornett
9065953545 make sure update UI handlers are called for accelerators, #10130
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-31 05:25:59 +00:00
Václav Slavík
352cd79f63 reverted broken changes from r56345 and r56349
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-16 08:15:56 +00:00
Václav Slavík
01603d4396 don't use deprecated gtk_object_sink(), replace it with g_object_ref_sink()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-15 19:14:46 +00:00
Paul Cornett
9ff9d30c0a Hold a reference on m_widget for the life of the associated wxWindow object.
This allows removing some ugly hacks, and leaking of GtkWidgets by wxNotebook.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-26 16:19:23 +00:00
Vadim Zeitlin
6b1eedc1bb add more stock items (#9799)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-01 14:38:02 +00:00
Paul Cornett
4a4a02acd1 fix masking of disabled bitmaps with some themes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-18 02:45:48 +00:00
Robert Roebling
e98c065545 Use wxMenuBase:SendEvent() to emit event, shoudl also fix #801: Menu cmd events: Inconsistent GetEventObject()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-21 15:03:44 +00:00
Paul Cornett
e2147e6d3c simplify menu item callbacks by passing in wxMenuItem instead of wxMenu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 17:07:07 +00:00
Paul Cornett
cabb286d30 move 8 copies of the same function to common code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 05:23:53 +00:00
Paul Cornett
1deef99727 wxMenuItem code cleanup, removing duplicate and unneccessary code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-10 03:54:43 +00:00
Robert Roebling
92159e3d76 Separate label with wx mnemonics (&) and with gtk mnemonics (_) into m_text and m_gtkText, fixes #4409
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-02 21:46:29 +00:00
Paul Cornett
aac7dbf3aa remove unused/unneeded menuitem cruft
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-29 04:41:37 +00:00
Paul Cornett
efebabb7ff mark long-deprecated ctor as such
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-29 04:26:29 +00:00
Paul Cornett
e828d3fc80 fix leak introduced by r53753
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-28 06:15:35 +00:00
Paul Cornett
afd83fb797 fix removing menu item, ticket 3387
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-26 17:28:41 +00:00
Paul Cornett
bcf7614cf3 move wxWindowGTK::DoPopupMenu back to window.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-18 03:32:27 +00:00
Paul Cornett
3ed946f283 simplify wxEVT_MENU_OPEN/CLOSE generation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-18 03:01:30 +00:00
Paul Cornett
8ef9a526ce minimize searching for tlw parent, remove useless code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-14 16:51:14 +00:00
Paul Cornett
f03789294f fix for glib critical errors when closing an mdi child
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-11 17:39:06 +00:00
Paul Cornett
e3041f4af0 add missing ! accidentally dropped in last commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 19:04:57 +00:00
Paul Cornett
6f536f31df Remove remnants of GTK1 accelerator code.
Change deprecated gtk_menu_item_remove_submenu() to gtk_menu_item_set_submenu().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 04:12:14 +00:00
Paul Cornett
16487a6fde remove unused wxMenuBar::m_style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 02:43:48 +00:00
Paul Cornett
3fd7b18a61 remove redundant WX_CLEAR_LIST, it's done by base dtor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-24 18:13:12 +00:00
Paul Cornett
0f35e441b0 fix memory leak when wxMenu is used as a popup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-24 17:59:11 +00:00
Robert Roebling
45813bada2 [ 1836794 ] gtk menu: radiogroup and separator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-08 11:53:07 +00:00
Václav Slavík
937013e0fd 1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to correctly handle exceptions in even handlers in wxGTK
2. use HandleWindowEvent() everywhere as more obvious and convenient shortcut for GetEventHandler()->ProcessEvent(); also for consistency with wxGTK where it's required

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 17:00:58 +00:00
Vadim Zeitlin
8d7490018a don't keep dangling m_prevRadio pointer (2nd part of patch 1836644)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-28 02:54:14 +00:00
Paul Cornett
19abd352e8 remove unused/unneeded stuff from gtk/private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-25 03:33:26 +00:00
Vadim Zeitlin
5e6f2fe921 compilation fix for g++ 4 after last commit (why was 3.3 happy with this?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 21:36:52 +00:00
Vadim Zeitlin
6c76d1ce59 flatten the single item submenus under Maemo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 20:55:18 +00:00
Vadim Zeitlin
b1f17bf00f refactor wxGTK mnemonics conversion functions in a separate file to be able to reuse them from wxMenu too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 19:41:38 +00:00
Vadim Zeitlin
e2f3bc4110 some Hildon integration work: use HildonProgram (for integration with the OS), HildonWindow (which has native appearance) and more native-like menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 00:25:09 +00:00
Vadim Zeitlin
6c30965353 compilation fixes for wxUSE_ACCEL=0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-11 13:08:13 +00:00
Vadim Zeitlin
ff654490b7 removed all compile- and run-time checks for GTK+ < 2.4; don't include the generic files which are now never used in wxGTK in the build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-05 22:31:24 +00:00
Vadim Zeitlin
7db0d5feb8 set the event object of the menu events to the frame the menu is attached to instead of the menu itself for compatibility with wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-03 21:48:47 +00:00
Paul Cornett
cca410b336 Use a GtkVBox to do TLW layout. Rework some of the remaining sizing code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-24 18:07:24 +00:00
Vadim Zeitlin
e4161a2a08 use -Wunused-parameter with gcc for consistency with MSVC and other compilers which warn about this; fix the uncovered warnings in wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-23 22:19:34 +00:00
Robert Roebling
05b743ba80 [ 1816944 ] GTK - wxMenuBar bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-20 14:55:55 +00:00
Julian Smart
a738f87cae Add accelerator back to label in GetItemLabel
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-13 14:43:39 +00:00
Julian Smart
387c7b3eef Removed a misleading comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-13 14:02:25 +00:00
Julian Smart
84c5131950 Menu fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-11 19:07:41 +00:00
Julian Smart
52af3158e9 Menu label consistency changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-11 17:54:59 +00:00
Vadim Zeitlin
28fcfbfe09 added missing wxUSE_XXX checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-10 23:59:42 +00:00