From: wittend99 Date: Tue, 4 Dec 2012 21:27:23 +0000 (+0000) Subject: Improve layout of PTT dialog layout under Linux X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=aa91880074581a5e898b8bb4deff1ba40fc8c11a;p=freetel-svn-tracking.git Improve layout of PTT dialog layout under Linux git-svn-id: https://svn.code.sf.net/p/freetel/code@1119 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/build/fdmdv2.mk b/fdmdv2/build/fdmdv2.mk index e71d76a6..d1060da1 100644 --- a/fdmdv2/build/fdmdv2.mk +++ b/fdmdv2/build/fdmdv2.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=wittend -Date :=12/3/2012 +Date :=12/4/2012 CodeLitePath :="D:\bin\CodeLite" LinkerName :=g++ SharedObjectLinkerName :=g++ -shared -fPIC @@ -52,8 +52,8 @@ LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/ AR := ar rcus CXX := g++ CC := gcc -CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1111\" $(Preprocessors) -CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1111\" $(Preprocessors) +CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1114\" $(Preprocessors) +CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1114\" $(Preprocessors) ## diff --git a/fdmdv2/src/dlg_comports.cpp b/fdmdv2/src/dlg_comports.cpp index 8d6ae4c7..e6dba5a1 100644 --- a/fdmdv2/src/dlg_comports.cpp +++ b/fdmdv2/src/dlg_comports.cpp @@ -45,10 +45,14 @@ ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, wxStaticBoxSizer* staticBoxSizer31 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("PTT Port")), wxVERTICAL); staticBoxSizer17->Add(staticBoxSizer31, 1, wxEXPAND, 5); +// m_ckUseSerialPTT = new wxCheckBox(this, wxID_ANY, _("Use Serial Port PTT"), wxDefaultPosition, wxSize(-1,-1), 0); +// m_ckUseSerialPTT->SetValue(false); +// staticBoxSizer31->Add(m_ckUseSerialPTT, 0, wxALIGN_LEFT, 20); +#ifdef __WXMSW__ m_ckUseSerialPTT = new wxCheckBox(this, wxID_ANY, _("Use Serial Port PTT"), wxDefaultPosition, wxSize(-1,-1), 0); m_ckUseSerialPTT->SetValue(false); staticBoxSizer31->Add(m_ckUseSerialPTT, 0, wxALIGN_LEFT, 20); -#ifdef __WXMSW__ + wxArrayString m_listCtrlPortsArr; m_listCtrlPorts = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,45), m_listCtrlPortsArr, wxLB_SINGLE); staticBoxSizer31->Add(m_listCtrlPorts, 1, wxALIGN_CENTER, 0); @@ -56,11 +60,25 @@ ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, #ifdef __WXGTK__ wxBoxSizer* bSizer83; bSizer83 = new wxBoxSizer(wxHORIZONTAL); - m_staticText12 = new wxStaticText(this, wxID_ANY, _("Device:"), wxDefaultPosition, wxDefaultSize, 0); + + wxGridSizer* gridSizer200 = new wxGridSizer(1, 3, 0, 0); + + m_ckUseSerialPTT = new wxCheckBox(this, wxID_ANY, _("Use Serial Port PTT"), wxDefaultPosition, wxSize(-1,-1), 0); + m_ckUseSerialPTT->SetValue(false); + gridSizer200->Add(m_ckUseSerialPTT, 1, wxALIGN_CENTER|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2); + + m_staticText12 = new wxStaticText(this, wxID_ANY, _("Device: "), wxDefaultPosition, wxDefaultSize, 0); m_staticText12->Wrap(-1); - staticBoxSizer31->Add(m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + gridSizer200->Add(m_staticText12, 1,wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2); +// gridSizer200->Add(m_staticText12, 1, wxEXPAND|wxALIGN_CENTER|wxALIGN_RIGHT, 2); + m_txtCtlDevicePath = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); - staticBoxSizer31->Add(m_txtCtlDevicePath, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); +// gridSizer200->Add(m_txtCtlDevicePath, 1, wxALIGN_CENTER|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 2); + gridSizer200->Add(m_txtCtlDevicePath, 1, wxEXPAND|wxALIGN_CENTER|wxALIGN_RIGHT, 2); + + bSizer83->Add(gridSizer200, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 2); + staticBoxSizer31->Add(bSizer83, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); + #endif wxBoxSizer* boxSizer19 = new wxBoxSizer(wxVERTICAL); staticBoxSizer17->Add(boxSizer19, 1, wxEXPAND, 5); diff --git a/fdmdv2/src/dlg_comports.h b/fdmdv2/src/dlg_comports.h index a5a05e80..28b65588 100644 --- a/fdmdv2/src/dlg_comports.h +++ b/fdmdv2/src/dlg_comports.h @@ -39,7 +39,7 @@ //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= class ComPortsDlg : public wxDialog { - public: + public: ComPortsDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hardware PTT"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER); virtual ~ComPortsDlg(); void ExchangeData(int inout);