Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv2139/src/gui
Modified Files:
wxFolderView.cpp wxOptionsDlg.cpp
Log Message:
layout of the main window is now somewhat customizable (bug 145)
Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.646
retrieving revision 1.647
diff -b -u -2 -r1.646 -r1.647
--- wxFolderView.cpp 1 Oct 2003 22:10:46 -0000 1.646
+++ wxFolderView.cpp 7 Oct 2003 11:01:22 -0000 1.647
@@ -136,4 +136,5 @@
extern const MOption MP_FVIEW_FONT_SIZE;
extern const MOption MP_FVIEW_FROM_REPLACE;
+extern const MOption MP_FVIEW_FVIEW_TOP;
extern const MOption MP_FVIEW_NAMES_ONLY;
extern const MOption MP_FVIEW_NEWCOLOUR;
@@ -144,4 +145,5 @@
extern const MOption MP_FVIEW_STATUS_UPDATE;
extern const MOption MP_FVIEW_UNREADCOLOUR;
+extern const MOption MP_FVIEW_VERTICAL_SPLIT;
extern const MOption MP_LASTSELECTED_MESSAGE;
extern const MOption MP_MSGS_SORTBY;
@@ -3230,8 +3232,7 @@
m_FolderCtrl->SetPreviewDelay(m_settings.previewDelay);
- m_SplitterWindow->SplitHorizontally(m_FolderCtrl,
- m_MessageWindow,
- m_Parent->GetClientSize().y/3);
- m_SplitterWindow->SetMinimumPaneSize(10);
+ // don't split it right now, will be done in ApplyOptions() later when we
+ // have anything to show
+ m_SplitterWindow->SetMinimumPaneSize(50);
}
@@ -3529,4 +3530,6 @@
senderOnlyNames =
replaceFromWithTo =
+ splitVert =
+ folderOnTop =
focusOnMouse = false;
@@ -3607,4 +3610,7 @@
settings->usingTrash = READ_CONFIG_BOOL(profile, MP_USE_TRASH_FOLDER);
+ settings->splitVert = READ_CONFIG_BOOL(profile, MP_FVIEW_VERTICAL_SPLIT);
+ settings->folderOnTop = READ_CONFIG_BOOL(profile, MP_FVIEW_FVIEW_TOP);
+
settings->updateStatus = READ_CONFIG_BOOL(profile, MP_FVIEW_STATUS_UPDATE);
if ( settings->updateStatus )
@@ -3619,4 +3625,46 @@
wxFolderView::ApplyOptions()
{
+ // has the split mode changed?
+ if ( m_settings.splitVert !=
+ (m_SplitterWindow->GetSplitMode() == wxSPLIT_VERTICAL) ||
+ m_settings.folderOnTop !=
+ (m_SplitterWindow->GetWindow1() == m_FolderCtrl) )
+ {
+ if ( m_SplitterWindow->IsSplit() )
+ {
+ // must unsplit it first before splitting again
+ m_SplitterWindow->Unsplit();
+ }
+
+ // get the order of windows
+ wxWindow *win1,
+ *win2;
+ if ( READ_APPCONFIG_BOOL(MP_FVIEW_FVIEW_TOP) )
+ {
+ win1 = m_FolderCtrl;
+ win2 = m_MessageWindow;
+ }
+ else // folder view to the right/bottom
+ {
+ win1 = m_MessageWindow;
+ win2 = m_FolderCtrl;
+ }
+
+ // show them if they had been previously hidden by Unsplit()
+ m_FolderCtrl->Show();
+ m_MessageWindow->Show();
+
+ // and (re)split in the right direction
+ const wxSize size = m_Parent->GetClientSize();
+ if ( READ_APPCONFIG_BOOL(MP_FVIEW_VERTICAL_SPLIT) )
+ {
+ m_SplitterWindow->SplitVertically(win1, win2, size.x/2);
+ }
+ else
+ {
+ m_SplitterWindow->SplitHorizontally(win1, win2, size.y/3);
+ }
+ }
+
m_FolderCtrl->DeleteAllItems();
@@ -5467,5 +5515,7 @@
showSize == other.showSize &&
memcmp(columns, other.columns, sizeof(columns)) == 0 &&
- returnAddresses == other.returnAddresses;
+ returnAddresses == other.returnAddresses &&
+ splitVert == other.splitVert &&
+ folderOnTop == other.folderOnTop;
}
Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.390
retrieving revision 1.391
diff -b -u -2 -r1.390 -r1.391
--- wxOptionsDlg.cpp 4 Oct 2003 00:39:22 -0000 1.390
+++ wxOptionsDlg.cpp 7 Oct 2003 11:01:24 -0000 1.391
@@ -393,4 +393,8 @@
ConfigField_FolderViewAutoNextFolder,
+ ConfigField_FolderViewHelpLayout,
+ ConfigField_FolderViewSplitVertically,
+ ConfigField_FolderViewFoldersOnTop,
+
ConfigField_FolderViewHelpText2,
ConfigField_FolderViewOnlyNames,
@@ -426,4 +430,5 @@
// folder tree options
ConfigField_FolderTreeFirst = ConfigField_FolderViewLast,
+ ConfigField_FolderTreeIsOnLeft,
ConfigField_FolderTreeColourHelp,
ConfigField_FolderTreeFgColour,
@@ -1421,4 +1426,10 @@
{ gettext_noop(" next unread &folder"), Field_Bool,
ConfigField_FolderViewAutoNextMsg},
+ { gettext_noop("\nThe settings below specify how should the two windows\n"
+ "(folder and message view) arranged inside the folder view."),
+ Field_Message, -1 },
+ { gettext_noop("Split the view vertically"), Field_Bool, -1 },
+ { gettext_noop("Put folder view on top/to the left"), Field_Bool |
+ Field_Restart, -1 },
{ gettext_noop("\nThe following settings control appearance of the messages
list:"), Field_Message, -1 },
{ gettext_noop("Show only sender's name, not &e-mail"), Field_Bool, -1 },
@@ -1467,4 +1478,5 @@
// folder tree
+ { gettext_noop("Put folder tree on the left side"), Field_Bool | Field_AppWide, -1
},
{ gettext_noop("The two options below are common for all folders,\n"
"but note that the first of them may be overridden by setting\n"
@@ -1951,4 +1963,8 @@
CONFIG_ENTRY(MP_FVIEW_AUTONEXT_UNREAD_FOLDER),
+ CONFIG_NONE(), // layout help
+ CONFIG_ENTRY(MP_FVIEW_VERTICAL_SPLIT),
+ CONFIG_ENTRY(MP_FVIEW_FVIEW_TOP),
+
CONFIG_NONE(),
CONFIG_ENTRY(MP_FVIEW_NAMES_ONLY),
@@ -1981,4 +1997,5 @@
// folder tree
+ CONFIG_ENTRY(MP_FTREE_LEFT),
CONFIG_NONE(),
CONFIG_ENTRY(MP_FTREE_FGCOLOUR),
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates