This patch implements a missing member in the generic
version of the wxTreeCtrl. The GetEditControl member is
currently not implemented in the generic tree control
used by wxGTK. This patch implements the feature by
1. adding a pointer to the wxTextTreeControl as a
member (m_textCtrl) of the wxGenericTreeCtrl class
2. making sure pointer was initialized to 0
3. using the member variable instead of the stack
variable in the wxGenericTreeCtrl::Edit member
4. making sure the new wxGenericTreeCtrl class
member is set to 0 when the control is set up for
deletion in Finish by calling a new protected member
(ResetTextControl) of the wxGenericTreeCtrl class.
These modification were discussed on the wx-dev list
under the "wxGTK - wxTreeCtrl::GetEditControl status?"
subject.
I have tested, but I certainly welcome comments and
further testing.
Julian Smart [Tue, 10 Dec 2002 21:50:11 +0000 (21:50 +0000)]
Applied patch [ 651649 ] Scrollbar not updated without resizing
I always wondered why the scrollbar of the listbox or
the log window (textctrl) never showed a thumb in the
control sample while the combobox does. The
AdjustScrollbars gets called through a size event and
this happens before the listbox (textctrl) can set the
values for the scrollbar. So always an empty scrollbar
is shown. This patch calls AdjustScrollbars at the end
of SetScrollbars in scrlwing.cpp.
I'm not sure if this is the best fix but it works
nicely. I've only tested it with wxUniv but it should
be okay in any generic case.
(applied for __WXUNIVERSAL__ only for now -- JACS)
Julian Smart [Tue, 10 Dec 2002 21:41:31 +0000 (21:41 +0000)]
Applied patch [ 651640 ] Toolbar sizing fix
This patch fixes the problem discussed on wx-dev
mailing list. (Message title "wxUniversal: How is the
parent notified when a child changes its size")
In short:
- This patch makes sure the toolbar notifies the parent of
any size change, this will give the parent the opportunity
to resize the frame client size and to make sure the
toolbar is in the right place.
Julian Smart [Mon, 9 Dec 2002 11:22:43 +0000 (11:22 +0000)]
Applied patch [ 632115 ] Fixed internationalization on tooltips
wxMac's wxTooltip assumed that text was always PC encoded,
and always converted the string using
wxMacMakeMacStringFromPC(). This worked fine for English
characters, but multi-byte encoded languages such as Japanese
(SJIS) because garbled. I've added a check for
"wxApp::s_macDefaultEncodingIsPC" before performing the
conversion similar to other controls.
Julian Smart [Mon, 9 Dec 2002 11:14:04 +0000 (11:14 +0000)]
Applied patches by Scott Pleiter:
[ 643866 ] small wxGrid API changes
adds GetValue to the gridcelleditors to facilitate
querying values from the editors, also changes several
methods to virtuals to simplify inheritance.
[ 643867 ] wxGrid cell LNF & behaviour patch
Enables the grid to render its cells grey when the grid
control is disabled. Also fixes several problems when
making the gridcelleditors visible. Improves the layout
of multi-line row/column labels. Changes the CellEditor
show from a MOUSE_DOWN to a MOUSE_UP, this
stops the editor starting when creating a selection
beginging in the currently selected cell.
Draw the row/column using system colours. Change the
default wxGrid settings to have a more neutral starting
point - grey lines, non-bold label font, black/white
selection etc.
Julian Smart [Mon, 9 Dec 2002 10:50:14 +0000 (10:50 +0000)]
Applied patch [ 649284 ] Fix wxODBC to work with MySQL 2.x
The current sample/db fails to build indexes with
MyODBC v2.50.39
This is due to two problems:
(1) wxDb::ModifyColumn() created a SQL statement that
was not correctly formed for MySQL. This problem
caused wxDbTable::CreateIndex() to fail to set the
columns that are going to indexes to be NOT NULL. I
fixed this by added a special case for MySQL.
(2) When creating an Index on a VARCHAR column,
MySQL requires a key length to be specified.
wxDbTable::CreateIndex() current does not do this. I
fixed this problem by adding code to do this.
The attached patch file patches dbtable.cpp and db.cpp
on the 2.5 branch.
In bug 611264 I reported that typing a filename into a
multiple selection file dialog failed. The file
returned was "..".
I discovered that this was because the previous
directory folder came up automatically selected when
the dialog was created. Then, I discovered a related
bug. If any file or folder was selected, then that was
the file which was returned regardless of what was
typed in.
To fix the problem I added an EVT_TEXT handler which
deselects everything that is selected when the user
types. The handler does not deselect anything unless
the user actually types something.
When frames with the wxFRAME_TOOL_WINDOW
style ( i.e. a floating toolbar frame) is shown it is
activated, taking focus from the main application
window. This patch stops frames with the
wxFRAME_TOOL_WINDOW from being activated when
shown.
Julian Smart [Mon, 9 Dec 2002 10:26:21 +0000 (10:26 +0000)]
Applied patch [ 650078 ] Add better checking to wxComboBox
This patch adds extra checks, checks to see and report
if the provided item index is valid.
An other thing:
- IMHO wxComboBox::GetSelection() was wrong, I
corrected this (now it behaves the same as wxMSW,
don't know about wxGTK and others...).
Julian Smart [Mon, 9 Dec 2002 10:20:44 +0000 (10:20 +0000)]
Applied patch [ 648042 ] Erase background error
When erasing the background with a transparent
background the logical origin of the provided DC is (re)
set, but not restored to the old value. Restoring the old
value is needed because the DC is/can be shared with
the real draw code...
This patch solves problems like mentioned in bug report
#635217 and problems like controls (like radio controls
etc) that disappear when moving the mouse over them or
clicking on them...
Julian Smart [Mon, 9 Dec 2002 10:15:00 +0000 (10:15 +0000)]
Applied patch [ 642172 ] Fix menu accelerators in ownerdrw
Fixed bug when updating menu text to inform the
ownerdrw code of the new menu accelerator attached to
the menu item.
Improved the layout of the owenerdrw menu ownerdrw to
correctly account for menu accelerators, submenu
arrows etc.
Scott Pleiter
(Note from JACS: I've also changed the sample to show the Quit item
correctly aligned; it needs to have the font set before wxWin knows
it's an ownerdrawn item.)
Restore the wxWizard wxEVT_WIZARD_FINISHED
event, which was sent when the FINISHED button was
pressed and the wizard was finished. When the
wxWizard is modal this event is not needed. However,
when the wizard is non-modal this is the only way to
determine that the wizard has finished.
Julian Smart [Mon, 9 Dec 2002 09:21:23 +0000 (09:21 +0000)]
Applied [ 639060 ] Individual bar floating in contrib/fl
In the current contrib/fl implementation, all control bars
in the frame layout either float or they don't. I added
code to allow the bar floating to be determined on a bar-
by-bar basis. That is, this patch enables some control
bars to float while keeping others locked.
Julian Smart [Sun, 8 Dec 2002 21:43:43 +0000 (21:43 +0000)]
Applied patch [ 637982 ] wxComboBox needs margin
wxComboBox doesn't have a margin between the text and
the dropdown button when the default size is used.
Since wxTextctrl currently returns a rather long minmal
size, this error is only visible if a long text (around
20 chars) is used. This patch introduces a margin
(analog wxSpinctrl).
Mattia Barbon [Sun, 8 Dec 2002 18:48:05 +0000 (18:48 +0000)]
Refactored & cleaned up wxChoice & wxComboBox code, fixed client data
handling, implemented wxControlWIthItems' methods correctly, fixed a
couple of other bugs.
Robert Roebling [Sun, 8 Dec 2002 18:02:30 +0000 (18:02 +0000)]
Catching dclick event from a spinbutton or spin control
crashes GTK 1.2 sooner or later. Just disable this
event for now. Should also be in 2.4, actually.