lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] PATCH: wxGrid-based census view


From: Greg Chicares
Subject: Re: [lmi] PATCH: wxGrid-based census view
Date: Wed, 19 Aug 2020 21:50:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 2020-08-19 10:49, Vadim Zeitlin wrote:
[...]
>  It's nice to be ahead of schedule for once (apparently removing code is
> faster than adding it, who would have thought) -- Ilya has already done and
> tested the changes and here is the PR with them:
> 
>       https://github.com/vadz/lmi/pull/148

I've cherry-picked and pushed that single-commit PR. Thanks.

>  It's best viewed with "-w" (or option to ignore whitespace in GitHub web
> UI if you use it),

I simply did
  git diff 3e9f8af6^ -- census_document.* [other affected files likewise]
to compare it to the original base for the census-view dvc-to-grid changes.

BTW, I'm glad to see that the number of grid rows or columns is a regular
'int'. A grid really did benefit by allowing 2^16-1 rows instead of 2^15-1
in the old 16-bit days, but today 2^63-1 is quite sufficient.

I only have the minutest question--as for this change:
  git diff 3e9f8af6^ -- wx_test_validate_output.cpp
would the following patch be a (very slight) improvement?

--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
diff --git a/wx_test_validate_output.cpp b/wx_test_validate_output.cpp
index c527848d..7b730731 100644
--- a/wx_test_validate_output.cpp
+++ b/wx_test_validate_output.cpp
@@ -344,9 +344,8 @@ void validate_run_cell_and_copy_output
 
     wxUIActionSimulator ui;
 
-    ui.Char(WXK_UP);                  // Clear the current selection if any.
+    ui.Char(WXK_ESCAPE);              // Clear selection; end editing.
     ui.Char(WXK_HOME, wxMOD_CONTROL); // Go to the left top cell.
-    ui.Char(WXK_RIGHT, wxMOD_SHIFT);  // Select the first row.
 
     ui.Char('r', wxMOD_CONTROL);      // "Census|Run cell"
     wxYield();
--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

WXK_ESCAPE seems to fulfill the purpose of the WXK_UP above,
and it also aborts editing of any text control that might be
open for editing (e.g., due to failure of some future test
that hasn't been written yet).

And I don't think it's necessary explicitly to select any row,
because Ctrl-Home already implicitly selects the first row.

Here's a question in the same vein, which has nothing to do
with any recent changes. Here:

        // There could be an existing comment in this field, delete it first.
        // This does assume MSW-like key bindings.
        ui.Char(WXK_HOME);
        ui.Char(WXK_END, wxMOD_SHIFT);
        ui.Char(WXK_BACK);

what would GTK-like key bindings look like? AFAICT, the
{Home; Shift-End; Backspace} sequence above should work
there, too. For instance, I clicked on the XFCE rat icon...
  Settings --> Settings Manager
  XFCE terminal
  General -- Title -- Initial title
and typed "abc"; tabbed away; then did each of these things:
  (1) tabbed back (that highlights the contents);
  (2) left-clicked the field; clicked elsewhere; clicked
      the "Initial title" field again (nothing highlighted);
and in both cases that keystroke-sequence cleared the field.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]