This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 5/6] Simplify view mode indication
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Fri, 26 Aug 2016 15:42:51 +0100
- Subject: [PATCH setup 5/6] Simplify view mode indication
- Authentication-results: sourceware.org; auth=none
- References: <efd6ff6f-1fc3-9622-b6e9-5b849747e5e3@dronecode.org.uk>
We don't really need a bit of text saying what the current view mode is,
when it's indicated in the pop-up menu, so remove that control.
This makes PickView::mode_caption() unused, so remove that as well.
---
PickView.cc | 22 ----------------------
PickView.h | 1 -
choose.cc | 8 --------
res.rc | 6 +-----
resource.h | 1 -
5 files changed, 1 insertion(+), 37 deletions(-)
diff --git a/PickView.cc b/PickView.cc
index 3702b92..b079b08 100644
--- a/PickView.cc
+++ b/PickView.cc
@@ -223,28 +223,6 @@ PickView::getViewMode ()
return view_mode;
}
-const char *
-PickView::mode_caption ()
-{
- switch (view_mode)
- {
- case views::PackageFull:
- return "Full";
- case views::PackagePending:
- return "Pending";
- case views::PackageKeeps:
- return "Up To Date";
- case views::PackageSkips:
- return "Not Installed";
- case views::PackageUserPicked:
- return "Picked";
- case views::Category:
- return "Category";
- default:
- return "";
- }
-}
-
/* meant to be called on packagemeta::categories */
bool
isObsolete (set <std::string, casecompare_lt_op> &categories)
diff --git a/PickView.h b/PickView.h
index 332383a..fc4fbad 100644
--- a/PickView.h
+++ b/PickView.h
@@ -57,7 +57,6 @@ public:
PickView (Category & cat);
void init(views _mode);
~PickView();
- const char *mode_caption ();
void setObsolete (bool doit);
void insert_pkg (packagemeta &);
void insert_category (Category *, bool);
diff --git a/choose.cc b/choose.cc
index 180c788..19c1fc9 100644
--- a/choose.cc
+++ b/choose.cc
@@ -85,7 +85,6 @@ static ControlAdjuster::ControlInfo ChooserControlsInfo[] = {
{IDC_CHOOSE_EXP, CP_RIGHT, CP_TOP},
{IDC_CHOOSE_VIEW, CP_LEFT, CP_TOP},
{IDC_LISTVIEW_POS, CP_RIGHT, CP_TOP},
- {IDC_CHOOSE_VIEWCAPTION, CP_LEFT, CP_TOP},
{IDC_CHOOSE_LIST, CP_STRETCH, CP_STRETCH},
{IDC_CHOOSE_HIDE, CP_LEFT, CP_BOTTOM},
{0, CP_LEFT, CP_TOP}
@@ -153,9 +152,6 @@ ChooserPage::createListview ()
chooser->Show(SW_SHOW);
chooser->setViewMode (UpgradeAlsoOption || hasManualSelections ?
PickView::views::PackagePending : PickView::views::Category);
- if (!SetDlgItemText (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption ()))
- Log (LOG_BABBLE) << "Failed to set View button caption %ld" <<
- GetLastError () << endLog;
/* FIXME: do we need to init the desired fields ? */
static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP, 0 };
@@ -534,10 +530,6 @@ ChooserPage::selectView (void)
}
chooser->setViewMode (view_mode);
- if (!SetDlgItemText
- (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption ()))
- Log (LOG_BABBLE) << "Failed to set View button caption " <<
- GetLastError () << endLog;
}
INT_PTR CALLBACK
diff --git a/res.rc b/res.rc
index 10ec375..0d124a6 100644
--- a/res.rc
+++ b/res.rc
@@ -319,9 +319,7 @@ END
// Left-aligned controls.
#define SETUP_VIEW_X (7)
#define SETUP_VIEW_W (26)
-#define SETUP_VIEWCAP_X (SETUP_VIEW_X + SETUP_VIEW_W +5)
-#define SETUP_VIEWCAP_W (40)
-#define SETUP_SEARCH_X (SETUP_VIEWCAP_X + SETUP_VIEWCAP_W + 80)
+#define SETUP_SEARCH_X (SETUP_VIEW_X + SETUP_VIEW_W + 125)
#define SETUP_SEARCH_W (32)
#define SETUP_SEARCHTEXT_X (SETUP_SEARCH_X + SETUP_SEARCH_W + 2)
#define SETUP_SEARCHTEXT_W (60)
@@ -336,8 +334,6 @@ FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "&View", IDC_CHOOSE_VIEW, SETUP_VIEW_X, 30, SETUP_VIEW_W,
14, WS_EX_RIGHT
- LTEXT "", IDC_CHOOSE_VIEWCAPTION, SETUP_VIEWCAP_X, 33,
- SETUP_VIEWCAP_W, 10
RTEXT "&Search", IDC_STATIC, SETUP_SEARCH_X, 33, SETUP_SEARCH_W,
10, SS_CENTERIMAGE, WS_EX_RIGHT
EDITTEXT IDC_CHOOSE_SEARCH_EDIT, SETUP_SEARCHTEXT_X, 30,
diff --git a/resource.h b/resource.h
index e2312ac..91b5b52 100644
--- a/resource.h
+++ b/resource.h
@@ -132,7 +132,6 @@
#define IDC_DLS_PPROGRESS_TEXT 544
#define IDC_DLS_IPROGRESS_TEXT 545
#define IDC_CHOOSE_INST_TEXT 546
-#define IDC_CHOOSE_VIEWCAPTION 547
#define IDC_CHOOSE_LISTHEADER 548
#define IDC_INS_BL_PACKAGE 549
#define IDC_INS_BL_TOTAL 550
--
2.8.3