Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Some UI refactoring/tidy up
MortenMacFly:
--- Quote from: dmoore on September 06, 2012, 05:23:27 pm ---Seems to be a problem after the XRC rename, morten?
--- End quote ---
I doubt... Why would that cause such a strange issue?
dmoore:
--- Quote from: MortenMacFly on September 06, 2012, 06:02:29 pm ---
--- Quote from: dmoore on September 06, 2012, 05:23:27 pm ---Seems to be a problem after the XRC rename, morten?
--- End quote ---
I doubt... Why would that cause such a strange issue?
--- End quote ---
You're right! nevermind, I found the (stupid) bug and will commit a fix.
dmoore:
Ok, I fixed the bug, tested carefully (but only on windows) and committed the fix in rev 8369. Let me know if there are any other issues.
daniloz:
--- Quote from: dmoore on September 06, 2012, 06:37:15 pm ---Ok, I fixed the bug, tested carefully (but only on windows) and committed the fix in rev 8369. Let me know if there are any other issues.
--- End quote ---
Fix confirmed here as well (win7).
Thanks!!
Alpha:
Focus does not shift correctly when switching tabs in wxgtk (due to tab events being generated on mouse down instead of mouse up); the following can address this:
--- Code: ---Index: src/sdk/findreplacedlg.cpp
===================================================================
--- src/sdk/findreplacedlg.cpp (revision 8376)
+++ src/sdk/findreplacedlg.cpp (working copy)
@@ -34,6 +34,9 @@
BEGIN_EVENT_TABLE(FindReplaceDlg, wxScrollingDialog)
EVT_ACTIVATE( FindReplaceDlg::OnActivate)
EVT_CHECKBOX(XRCID("chkRegEx1"), FindReplaceDlg::OnRegEx)
+#ifdef __WXGTK__
+ EVT_IDLE( FindReplaceDlg::OnIdle)
+#endif
// Special events for Replace
EVT_CHECKBOX(XRCID("chkMultiLine1"), FindReplaceDlg::OnMultiChange)
@@ -50,6 +53,9 @@
: FindReplaceBase(parent, initial, hasSelection),
m_findReplaceInFilesActive(findReplaceInFilesActive),
m_findMode(findMode)
+#ifdef __WXGTK__
+ ,m_setFocus(false)
+#endif
{
wxXmlResource::Get()->LoadObject(this, parent, _T("dlgFindReplace"),_T("wxScrollingDialog"));
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("editor"));
@@ -552,7 +558,9 @@
m_findReplaceInFilesActive = true;
}
}
-
+#ifdef __WXGTK__
+ m_setFocus = true;
+#endif
Refresh();
event.Skip();
}
@@ -672,3 +680,26 @@
values.Insert(find, 0);
Manager::Get()->GetConfigManager(_T("editor"))->Write(configKey, values);
}
+
+#ifdef __WXGTK__
+void FindReplaceDlg::OnIdle(wxIdleEvent& event)
+{
+ if (m_setFocus && !wxGetMouseState().LeftIsDown())
+ {
+ m_setFocus = false;
+ if ( IsMultiLine() )
+ {
+ wxTextCtrl* tcp = ( IsFindInFiles() ? XRCCTRL(*this, "txtMultiLineFind2", wxTextCtrl)
+ : XRCCTRL(*this, "txtMultiLineFind1", wxTextCtrl) );
+ if (tcp) tcp->SetFocus();
+ }
+ else
+ {
+ wxComboBox* cbp = ( IsFindInFiles() ? XRCCTRL(*this, "cmbFind2", wxComboBox)
+ : XRCCTRL(*this, "cmbFind1", wxComboBox) );
+ if (cbp) cbp->SetFocus();
+ }
+ }
+ event.Skip();
+}
+#endif
Index: src/include/findreplacedlg.h
===================================================================
--- src/include/findreplacedlg.h (revision 8376)
+++ src/include/findreplacedlg.h (working copy)
@@ -62,6 +62,10 @@
void SaveComboValues(wxComboBox* combo, const wxString& configKey);
bool m_findReplaceInFilesActive;
bool m_findMode;
+#ifdef __WXGTK__
+ void OnIdle(wxIdleEvent& event);
+ bool m_setFocus;
+#endif
wxWindow *m_findPage;
DECLARE_EVENT_TABLE()
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version