Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv14005/src/gui
Modified Files:
wxFolderView.cpp wxColumnsDlg.cpp
Log Message:
show the name of the folder the columns are edited for in the dialog title
Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.572
retrieving revision 1.573
diff -b -u -2 -r1.572 -r1.573
--- wxFolderView.cpp 16 Mar 2002 15:53:31 -0000 1.572
+++ wxFolderView.cpp 19 Mar 2002 17:36:12 -0000 1.573
@@ -988,4 +988,32 @@
}
+static String GetShortFolderNameFromProfile(const Profile *profile)
+{
+ String name = profile->GetName();
+ if ( !name.StartsWith(String(M_PROFILE_CONFIG_SECTION) + '/', &name) )
+ {
+ if ( name != M_PROFILE_CONFIG_SECTION )
+ {
+ FAIL_MSG( "unexpected profile - what folder does it correspond to?" );
+ }
+ else
+ {
+ // editing global settings
+ name.clear();
+ }
+ }
+
+ if ( name.empty() )
+ {
+ name = _("Default");
+ }
+ else // we're changing options for some folder
+ {
+ name = name.AfterLast('/');
+ }
+
+ return name;
+}
+
// ============================================================================
// wxFolderMsgWindow and wxFolderMsgViewerEvtHandler implementation
@@ -1751,29 +1779,5 @@
Profile_obj profile(m_FolderView->GetFolderProfile());
- String name = profile->GetName();
- if ( !name.StartsWith(String(M_PROFILE_CONFIG_SECTION) + '/', &name) )
- {
- if ( name != M_PROFILE_CONFIG_SECTION )
- {
- FAIL_MSG( "unexpected profile - what folder does it correspond to?" );
- }
- else
- {
- // editing global settings
- name.clear();
- }
- }
-
- wxString menuTitle;
- if ( name.empty() )
- {
- menuTitle = _("Default");
- }
- else // we're changing options for some folder
- {
- menuTitle = name.AfterLast('/');
- }
-
- wxMenu menu(menuTitle);
+ wxMenu menu(GetShortFolderNameFromProfile(profile));
// add items to sort by this column in direct/reverse order if we have a
@@ -4993,5 +4997,6 @@
extern
-bool ShowFolderViewColumnDialog(wxArrayString *names,
+bool ShowFolderViewColumnDialog(const String& folderName,
+ wxArrayString *names,
wxArrayInt *status,
wxArrayInt *widths,
@@ -5060,5 +5065,6 @@
// do show the dialog
bool def;
- if ( !ShowFolderViewColumnDialog(&colNames, &status, &widths, &def, parent) )
+ if ( !ShowFolderViewColumnDialog(GetShortFolderNameFromProfile(profile),
+ &colNames, &status, &widths, &def, parent) )
{
// nothing changed
Index: wxColumnsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxColumnsDlg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -2 -r1.3 -r1.4
--- wxColumnsDlg.cpp 13 Mar 2002 15:50:32 -0000 1.3
+++ wxColumnsDlg.cpp 19 Mar 2002 17:36:13 -0000 1.4
@@ -55,5 +55,6 @@
{
public:
- wxFolderViewColumnsDialog(wxArrayString *names,
+ wxFolderViewColumnsDialog(const String& folderName,
+ wxArrayString *names,
wxArrayInt *status,
wxArrayInt *widths,
@@ -132,16 +133,20 @@
// ----------------------------------------------------------------------------
-wxFolderViewColumnsDialog::wxFolderViewColumnsDialog(wxArrayString* names,
+wxFolderViewColumnsDialog::
+wxFolderViewColumnsDialog(const String& folderName,
+ wxArrayString* names,
wxArrayInt* status,
wxArrayInt* widths,
bool *asDefault,
wxWindow *parent)
- : wxSelectionsOrderDialogSimple(_("&Select the columns to show:"),
- // TODO: show folder name in the caption
- _("Configure folder view columns"),
+ : wxSelectionsOrderDialogSimple
+ (
+ _("&Select the columns to show:"),
+ String::Format(_("Configure columns for '%s'"), folderName.c_str()),
names,
status,
"FolderViewCol",
- parent)
+ parent
+ )
{
m_countCol = m_choices->GetCount();
@@ -357,5 +362,6 @@
extern
-bool ShowFolderViewColumnDialog(wxArrayString *names,
+bool ShowFolderViewColumnDialog(const String& folderName,
+ wxArrayString *names,
wxArrayInt *status,
wxArrayInt *widths,
@@ -366,5 +372,6 @@
"NULL pointer in ShowFolderViewColumnDialog" );
- wxFolderViewColumnsDialog dlg(names, status, widths, asDefault, parent);
+ wxFolderViewColumnsDialog dlg(folderName, names, status, widths,
+ asDefault, parent);
// don't return false if either checkbox was checked as otherwise
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates