Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18015/src/gui
Modified Files:
wxMimeDialog.cpp
Log Message:
added history for the command entry field (at expense of browse button)
Index: wxMimeDialog.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMimeDialog.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -2 -r1.2 -r1.3
--- wxMimeDialog.cpp 27 Sep 2004 14:12:37 -0000 1.2
+++ wxMimeDialog.cpp 27 Sep 2004 19:07:26 -0000 1.3
@@ -67,5 +67,6 @@
// the GUI controls
- wxTextCtrl *m_txtCommand;
+ wxStaticText *m_labelCommand;
+ wxPTextEntry *m_txtCommand;
wxCheckBox *m_chkOpenAsMsg;
@@ -111,5 +112,5 @@
"\n"
"The command may contain the string \"%%s\" which will "
- "be replaced by the file name and if you don't specify it,\n"
+ "be replaced by the file name and if you don't specify it, "
"the file name will be appended at the end."),
mimetype.c_str()
@@ -124,17 +125,33 @@
wxStaticText *help = CreateMessage(this, msg, box);
- wxArrayString labels;
- labels.Add(_("Open &with:"));
- labels.Add(_("Open as &mail message"));
- const long widthMax = GetMaxLabelWidth(labels, this);
+ m_labelCommand = new wxStaticText(this, wxID_ANY, _("Open &with:"));
+
+ wxLayoutConstraints *c = new wxLayoutConstraints;
+ c->left.SameAs(this, wxLeft, LAYOUT_X_MARGIN);
+ c->top.Below(help, 2*LAYOUT_Y_MARGIN);
+ c->width.AsIs();
+ c->height.AsIs();
+ m_labelCommand->SetConstraints(c);
+
+ m_txtCommand = new wxPTextEntry(_T("OpenWith"), this, wxID_ANY);
+ c = new wxLayoutConstraints;
+ c->centreY.SameAs(m_labelCommand, wxCentreY);
+ c->left.RightOf(m_labelCommand, LAYOUT_X_MARGIN);
+ c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
+ c->height.AsIs();
+ m_txtCommand->SetConstraints(c);
- const wxCoord MARGIN = 2*LAYOUT_X_MARGIN;
- m_txtCommand = CreateFileEntry(this, labels[0], widthMax, help, MARGIN);
// finally the optional checkbox
if ( m_openAsMsg )
{
- m_chkOpenAsMsg = CreateCheckBox(this, labels[1], widthMax,
- m_txtCommand, MARGIN);
+ m_chkOpenAsMsg = new wxCheckBox(this, wxID_ANY, _("Open as &mail message"));
+ wxLayoutConstraints *c = new wxLayoutConstraints;
+ c->top.Below(m_txtCommand, 3*LAYOUT_Y_MARGIN);
+ c->centreX.SameAs(this, wxCentreX);
+ c->width.AsIs();
+ c->height.AsIs();
+
+ m_chkOpenAsMsg->SetConstraints(c);
}
@@ -199,5 +216,8 @@
void wxMimeOpenWithDialog::OnCheckBox(wxCommandEvent& event)
{
- EnableTextWithButton(this, m_txtCommand, !event.IsChecked());
+ bool enableText = !event.IsChecked();
+
+ m_labelCommand->Enable(enableText);
+ m_txtCommand->Enable(enableText);
}
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates