[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6366] Redesign group-quote GUI
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6366] Redesign group-quote GUI |
Date: |
Tue, 20 Oct 2015 21:05:34 +0000 |
Revision: 6366
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6366
Author: chicares
Date: 2015-10-20 21:05:33 +0000 (Tue, 20 Oct 2015)
Log Message:
-----------
Redesign group-quote GUI
Modified Paths:
--------------
lmi/trunk/census_view.cpp
lmi/trunk/census_view.hpp
lmi/trunk/gpt_view.cpp
lmi/trunk/illustration_view.cpp
lmi/trunk/mec_view.cpp
lmi/trunk/menus.xrc
lmi/trunk/skeleton.cpp
lmi/trunk/toolbar.xrc
Modified: lmi/trunk/census_view.cpp
===================================================================
--- lmi/trunk/census_view.cpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/census_view.cpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -43,6 +43,7 @@
#include "miscellany.hpp" // is_ok_for_cctype()
#include "path_utility.hpp"
#include "safely_dereference_as.hpp"
+#include "single_choice_popup_menu.hpp"
#include "timer.hpp"
#include "wx_new.hpp"
#include "wx_utility.hpp" // class ClipboardEx
@@ -825,7 +826,6 @@
EVT_MENU(XRCID("print_case_to_disk"
),CensusView::UponPrintCaseToDisk )
EVT_MENU(XRCID("print_spreadsheet"
),CensusView::UponRunCaseToSpreadsheet )
EVT_MENU(XRCID("print_group_roster"
),CensusView::UponRunCaseToGroupRoster )
- EVT_MENU(XRCID("print_group_quote"
),CensusView::UponRunCaseToGroupQuote )
EVT_MENU(XRCID("paste_census" ),CensusView::UponPasteCensus
)
EVT_MENU(XRCID("add_cell" ),CensusView::UponAddCell
)
EVT_MENU(XRCID("delete_cells" ),CensusView::UponDeleteCells
)
@@ -841,8 +841,6 @@
EVT_UPDATE_UI(XRCID("print_case_to_disk"
),CensusView::UponUpdateAlwaysEnabled )
EVT_UPDATE_UI(XRCID("print_spreadsheet"
),CensusView::UponUpdateAlwaysEnabled )
EVT_UPDATE_UI(XRCID("print_group_roster"
),CensusView::UponUpdateAlwaysEnabled )
- EVT_UPDATE_UI(XRCID("print_group_quote"
),CensusView::UponUpdateAlwaysEnabled )
- EVT_UPDATE_UI(XRCID("print_group"
),CensusView::UponUpdateAlwaysEnabled )
EVT_UPDATE_UI(XRCID("paste_census"
),CensusView::UponUpdateAlwaysEnabled )
EVT_UPDATE_UI(XRCID("add_cell"
),CensusView::UponUpdateAlwaysEnabled )
EVT_UPDATE_UI(XRCID("delete_cells"
),CensusView::UponUpdateNonemptySelection)
@@ -1551,20 +1549,40 @@
DoAllCells(mce_emit_spreadsheet);
}
-/// Print tab-delimited roster to file loadable in spreadsheet programs.
+/// Print group roster in an interactively-chosen format.
void CensusView::UponRunCaseToGroupRoster(wxCommandEvent&)
{
- DoAllCells(mce_emit_group_roster);
+ wxArrayString strings;
+ strings.Add("Print r&oster to spreadsheet");
+ strings.Add("Print group premium """e to PDF");
+ int const selection = SingleChoicePopupMenu(strings).Choose();
+ switch(selection)
+ {
+ case -1:
+ {
+ // No selection: do nothing; let the popup just vanish.
+ }
+ break;
+ case 0:
+ {
+ // Print tab-delimited roster to file loadable in spreadsheet
programs.
+ DoAllCells(mce_emit_group_roster);
+ }
+ break;
+ case 1:
+ {
+ // Print group quote to a PDF file.
+ DoAllCells(mce_emit_group_quote);
+ }
+ break;
+ default:
+ {
+ fatal_error() << "Case " << selection << " not found." <<
LMI_FLUSH;
+ }
+ }
}
-/// Print group quote to PDF file.
-
-void CensusView::UponRunCaseToGroupQuote(wxCommandEvent&)
-{
- DoAllCells(mce_emit_group_quote);
-}
-
/// Paste a census from the clipboard.
///
/// See unit tests in Skeleton::UponTestPasting().
Modified: lmi/trunk/census_view.hpp
===================================================================
--- lmi/trunk/census_view.hpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/census_view.hpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -84,7 +84,6 @@
void UponRunCase (wxCommandEvent&);
void UponRunCaseToSpreadsheet (wxCommandEvent&);
void UponRunCaseToGroupRoster (wxCommandEvent&);
- void UponRunCaseToGroupQuote (wxCommandEvent&);
void UponUpdateAlwaysDisabled (wxUpdateUIEvent&);
void UponUpdateAlwaysEnabled (wxUpdateUIEvent&);
void UponUpdateSingleSelection (wxUpdateUIEvent&);
Modified: lmi/trunk/gpt_view.cpp
===================================================================
--- lmi/trunk/gpt_view.cpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/gpt_view.cpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -84,8 +84,6 @@
EVT_UPDATE_UI(XRCID("print_case_to_disk"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("print_spreadsheet"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("print_group_roster"
),gpt_view::UponUpdateInapplicable)
- EVT_UPDATE_UI(XRCID("print_group_quote"
),gpt_view::UponUpdateInapplicable)
- EVT_UPDATE_UI(XRCID("print_group"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("paste_census"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("add_cell"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("delete_cells"
),gpt_view::UponUpdateInapplicable)
Modified: lmi/trunk/illustration_view.cpp
===================================================================
--- lmi/trunk/illustration_view.cpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/illustration_view.cpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -96,7 +96,6 @@
EVT_UPDATE_UI(XRCID("print_case_to_disk"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("print_spreadsheet"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("print_group_roster"
),IllustrationView::UponUpdateInapplicable )
- EVT_UPDATE_UI(XRCID("print_group"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("paste_census"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("add_cell"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("delete_cells"
),IllustrationView::UponUpdateInapplicable )
Modified: lmi/trunk/mec_view.cpp
===================================================================
--- lmi/trunk/mec_view.cpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/mec_view.cpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -84,8 +84,6 @@
EVT_UPDATE_UI(XRCID("print_case_to_disk"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("print_spreadsheet"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("print_group_roster"
),mec_view::UponUpdateInapplicable)
- EVT_UPDATE_UI(XRCID("print_group_quote"
),mec_view::UponUpdateInapplicable)
- EVT_UPDATE_UI(XRCID("print_group"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("paste_census"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("add_cell"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("delete_cells"
),mec_view::UponUpdateInapplicable)
Modified: lmi/trunk/menus.xrc
===================================================================
--- lmi/trunk/menus.xrc 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/menus.xrc 2015-10-20 21:05:33 UTC (rev 6366)
@@ -361,17 +361,10 @@
<bitmap platform="win" stock_id="write-spreadsheet"/>
<help>Run and print all cells to a spreadsheet file</help>
</object>
- <object class="wxMenu">
- <label>Print r_oster</label>
- <object class="wxMenuItem" name="print_group_roster">
- <label>Print r_oster to spreadsheet\tCtrl-Shift-O</label>
- <bitmap platform="win" stock_id="roster"/>
- <help>Run and print group roster to a spreadsheet file</help>
- </object>
- <object class="wxMenuItem" name="print_group_quote">
- <label>Print group premium _quote\tCtrl-Shift-Q</label>
- <help>Run and print group premium quote to a PDF file</help>
- </object>
+ <object class="wxMenuItem" name="print_group_roster">
+ <label>Print group r_oster\tCtrl-Shift-O</label>
+ <bitmap platform="win" stock_id="roster"/>
+ <help>Run and print all cells to a group roster</help>
</object>
<object class="separator"/>
<object class="wxMenuItem" name="paste_census">
Modified: lmi/trunk/skeleton.cpp
===================================================================
--- lmi/trunk/skeleton.cpp 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/skeleton.cpp 2015-10-20 21:05:33 UTC (rev 6366)
@@ -159,8 +159,6 @@
EVT_UPDATE_UI(XRCID("print_case_to_disk"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("print_spreadsheet"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("print_group_roster"
),Skeleton::UponUpdateInapplicable )
- EVT_UPDATE_UI(XRCID("print_group_quote"
),Skeleton::UponUpdateInapplicable )
- EVT_UPDATE_UI(XRCID("print_group"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("paste_census"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("add_cell"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("delete_cells"
),Skeleton::UponUpdateInapplicable )
Modified: lmi/trunk/toolbar.xrc
===================================================================
--- lmi/trunk/toolbar.xrc 2015-10-19 02:26:16 UTC (rev 6365)
+++ lmi/trunk/toolbar.xrc 2015-10-20 21:05:33 UTC (rev 6366)
@@ -115,21 +115,10 @@
<bitmap stock_id="write-spreadsheet"/>
<longhelp>Run and print all cells to a spreadsheet file</longhelp>
</object>
- <object class="tool" name="print_group">
- <tooltip>Print roster</tooltip>
+ <object class="tool" name="print_group_roster">
+ <tooltip>Print group roster</tooltip>
<bitmap stock_id="roster"/>
- <dropdown>
- <object class="wxMenu">
- <object class="wxMenuItem" name="print_group_roster">
- <label>Print r_oster to spreadsheet</label>
- <help>Run and print group roster to a spreadsheet
file</help>
- </object>
- <object class="wxMenuItem" name="print_group_quote">
- <label>Print group premium _quote</label>
- <help>Run and print group premium quote to a PDF
file</help>
- </object>
- </object>
- </dropdown>
+ <longhelp>Run and print all cells to a group roster</longhelp>
</object>
<object class="separator"/>
<object class="tool" name="paste_census">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6366] Redesign group-quote GUI,
Greg Chicares <=