Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/gui
Modified Files:
wxFolderTree.cpp
Log Message:
select the home folder initially in the tree
Index: wxFolderTree.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderTree.cpp,v
retrieving revision 1.233
retrieving revision 1.234
diff -b -u -2 -r1.233 -r1.234
--- wxFolderTree.cpp 18 Mar 2004 16:38:00 -0000 1.233
+++ wxFolderTree.cpp 28 Apr 2004 11:05:13 -0000 1.234
@@ -319,6 +319,9 @@
bool GoToNextUnreadFolder(bool next = true);
- // go to the home folder, if any
- bool GoToHomeFolder();
+ // go to home folder, give an error message if there is none
+ void GoToHomeFolder();
+
+ // go to the home folder, if any (return true in this case)
+ bool GoToHomeFolderIfAny();
// go to the given tree item: select it and ensure it is visible
@@ -1810,4 +1813,9 @@
FAIL_MSG( _T("Failed to register folder tree with event manager") );
}
+
+ // preselect the home folder: this is probably better then returning the
+ // selection to the last selected item although we could still do this if
+ // there is no home folder...
+ GoToHomeFolderIfAny();
}
@@ -2334,5 +2342,5 @@
}
-bool wxFolderTreeImpl::GoToHomeFolder()
+bool wxFolderTreeImpl::GoToHomeFolderIfAny()
{
String folderHome = READ_APPCONFIG_TEXT(MP_FTREE_HOME);
@@ -2348,9 +2356,15 @@
}
- wxLogStatus(GetFrame(this), _("No home folder configured."));
-
return false;
}
+void wxFolderTreeImpl::GoToHomeFolder()
+{
+ if ( !GoToHomeFolderIfAny() )
+ {
+ wxLogStatus(GetFrame(this), _("No home folder configured."));
+ }
+}
+
// ----------------------------------------------------------------------------
// label in place editing stuff
@@ -3033,5 +3047,5 @@
case WXK_HOME:
- (void)GoToHomeFolder();
+ GoToHomeFolder();
break;
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates