]> git.neil.brown.name Git - edlib.git/commitdiff
Respell "Window:" as "Tile:".
authorNeilBrown <neil@brown.name>
Tue, 17 Oct 2023 05:48:31 +0000 (16:48 +1100)
committerNeilBrown <neil@brown.name>
Thu, 19 Oct 2023 08:53:44 +0000 (19:53 +1100)
A "Display" is a module for drawing.
A "Window" is one particular instance of a Display
A "Tile" is a rectangle within a Window. It might overlap
 other Tiles, it might now.

Signed-off-by: NeilBrown <neil@brown.name>
13 files changed:
DOC/TODO.md
lib-autosave.c
lib-popup.c
lib-tile.c
lib-view.c
lib-viewer.c
mode-basic.c
mode-emacs.c
python/lib-compose-email.py
python/lib-server.py
python/module-notmuch.py
python/render-present.py
render-imageview.c

index a1ab4b73c5de9353c93e53dfe2bc7e9e7f9344dd..9048c77a3ae1404a75f64717c0a089958173c5e9 100644 (file)
@@ -15,7 +15,7 @@ the file.
       then get confused.
 - [X] when search succeeds on final line then trying again loops back to
       there, redraw is strange
-- [ ] There is a "window:close" and a "Window:close" and they are
+- [X] There is a "window:close" and a "Window:close" and they are
       different.  Fix this!
 - [X] unknown keysequence should be reported so e.g. if keyboard
       is is Greek mode, then I will be told that Cx-b doesn't work
index c22cc124c3a57e0343002592ed22f0b1304202a9..86bd77c17346fc6ea8034f54c84fbad6d5d94d73 100644 (file)
@@ -100,7 +100,7 @@ DEF_CMD(autosave_dir_ignore)
        doc_next(ci->home->parent, m);
        if (call("doc:render-line", ci->focus, 0, m) < 0 ||
            m->ref.p == NULL)
-               call("Window:bury", ci->focus);
+               call("Tile:bury", ci->focus);
        mark_free(m);
        /* Ask viewer to move forward */
        return 2;
@@ -134,7 +134,7 @@ DEF_CMD(autosave_dir_delete)
 
 DEF_CMD(autosave_dir_empty)
 {
-       call("Window:bury", ci->focus);
+       call("Tile:bury", ci->focus);
        return 1;
 }
 
index ee48fc5138db1afe52dc66306cc3ef0c3c518317..328b666eddb839bc2bba8294e69495f75a9aa964 100644 (file)
@@ -562,14 +562,14 @@ void edlib_init(struct pane *ed safe)
        key_add(popup_map, "OtherPane", &popup_other);
        key_add(popup_map, "ThisPopup", &popup_this);
 
-       key_add(popup_map, "Window:bury", &popup_do_close);
-       key_add(popup_map, "Window:close", &popup_abort);
-       key_add(popup_map, "Window:split-x", &popup_split);
-       key_add(popup_map, "Window:split-y", &popup_split);
-       key_add(popup_map, "Window:x+", &popup_ignore);
-       key_add(popup_map, "Window:x-", &popup_ignore);
-       key_add(popup_map, "Window:y+", &popup_ignore);
-       key_add(popup_map, "Window:y-", &popup_ignore);
-       key_add(popup_map, "Window:close-others", &popup_close_others);
+       key_add(popup_map, "Tile:bury", &popup_do_close);
+       key_add(popup_map, "Tile:close", &popup_abort);
+       key_add(popup_map, "Tile:split-x", &popup_split);
+       key_add(popup_map, "Tile:split-y", &popup_split);
+       key_add(popup_map, "Tile:x+", &popup_ignore);
+       key_add(popup_map, "Tile:x-", &popup_ignore);
+       key_add(popup_map, "Tile:y+", &popup_ignore);
+       key_add(popup_map, "Tile:y-", &popup_ignore);
+       key_add(popup_map, "Tile:close-others", &popup_close_others);
        key_add(popup_map, "pane:defocus", &popup_defocus);
 }
index 89008c511fc6b404bb96ee1ca7946010eb591f96..f6e56a21ddf806a86721d05f41f87323846eb88a 100644 (file)
@@ -106,7 +106,7 @@ DEF_CMD(tile_clone)
                return Efail;
        ti->p = p2;
        /* Remove borders as our children will provide their own. */
-       call("Window:border", p2);
+       call("Tile:border", p2);
        attr_set_str(&p2->attrs, "borders", "BL");
        while (!cti->leaf && child->focus) {
                child = child->focus;
@@ -130,7 +130,7 @@ DEF_CMD(tile_attach)
        struct pane *p;
 
        /* Remove borders as our children will provide their own. */
-       call("Window:border", display);
+       call("Tile:border", display);
 
        alloc(ti, pane);
        p = pane_register(display, 0, &tile_handle.c, ti);
@@ -1039,17 +1039,17 @@ void edlib_init(struct pane *ed safe)
 {
        tile_map = key_alloc();
 
-       key_add(tile_map, "Window:next", &tile_window_next);
-       key_add(tile_map, "Window:prev", &tile_window_prev);
-       key_add(tile_map, "Window:x+", &tile_window_xplus);
-       key_add(tile_map, "Window:x-", &tile_window_xminus);
-       key_add(tile_map, "Window:y+", &tile_window_yplus);
-       key_add(tile_map, "Window:y-", &tile_window_yminus);
-       key_add(tile_map, "Window:split-x", &tile_window_splitx);
-       key_add(tile_map, "Window:split-y", &tile_window_splity);
-       key_add(tile_map, "Window:close", &tile_window_close);
-       key_add(tile_map, "Window:close-others", &tile_window_close_others);
-       key_add(tile_map, "Window:bury", &tile_window_bury);
+       key_add(tile_map, "Tile:next", &tile_window_next);
+       key_add(tile_map, "Tile:prev", &tile_window_prev);
+       key_add(tile_map, "Tile:x+", &tile_window_xplus);
+       key_add(tile_map, "Tile:x-", &tile_window_xminus);
+       key_add(tile_map, "Tile:y+", &tile_window_yplus);
+       key_add(tile_map, "Tile:y-", &tile_window_yminus);
+       key_add(tile_map, "Tile:split-x", &tile_window_splitx);
+       key_add(tile_map, "Tile:split-y", &tile_window_splity);
+       key_add(tile_map, "Tile:close", &tile_window_close);
+       key_add(tile_map, "Tile:close-others", &tile_window_close_others);
+       key_add(tile_map, "Tile:bury", &tile_window_bury);
 
        key_add(tile_map, "OtherPane", &tile_other);
        key_add(tile_map, "ThisPane", &tile_this);
index f64b61277aa2818bf03f49604cc027e88e603d31..99523277043a8082a3666b5743d5113ee7b7d328 100644 (file)
@@ -557,7 +557,7 @@ void edlib_init(struct pane *ed safe)
        key_add(view_map, "M:TPress-1", &view_click);
        key_add(view_map, "M:Press-4", &view_scroll);
        key_add(view_map, "M:Press-5", &view_scroll);
-       key_add(view_map, "Window:border", &view_border);
+       key_add(view_map, "Tile:border", &view_border);
        key_add(view_map, "Refresh:view", &view_refresh_view);
        key_add(view_map, "Close", &view_close);
        key_add(view_map, "Clone", &view_clone);
index e313bd36fc141fd06eadb8e22888fb73c737a6a7..8e3685d28e159264c5ee82eb56c49a654db5bd04 100644 (file)
@@ -115,7 +115,7 @@ DEF_CMD(viewer_bury)
        ret = call("doc:cmd-q", ci->focus, ci->num, ci->mark);
        switch (ret) {
        case 0:
-               call("Window:bury", ci->focus);
+               call("Tile:bury", ci->focus);
                break;
        case 2: /* request to move to next line */
                call("K:Down", ci->focus, ci->num, ci->mark);
index acdf5cf0fecaea49215541959859fe4682b15a1b..ee31d3d9d213c261134d5f48479f94674dda7510 100644 (file)
@@ -570,7 +570,7 @@ DEF_CMD(basic_interactive_delete)
 
 DEF_CMD(basic_close)
 {
-       call("Window:close", ci->focus);
+       call("Tile:close", ci->focus);
        return 1;
 }
 
index 1294cec9fd1049cca4ccaf4013db89bffd0ff98f..d5b37d0badab970b344e763fc1a89c0ee16160d9 100644 (file)
@@ -474,13 +474,13 @@ static struct simple_command {
        char            *type safe;
        char            *k safe;
 } simple_commands[] = {
-       {CMD(emacs_simple), "Window:next", "K:CX-o"},
-       {CMD(emacs_simple), "Window:prev", "K:CX-O"},
-       {CMD(emacs_simple), "Window:y+", "K:CX-^"},
-       {CMD(emacs_simple), "Window:split-y", "K:CX-2"},
-       {CMD(emacs_simple), "Window:split-x", "K:CX-3"},
-       {CMD(emacs_simple), "Window:close", "K:CX-0"},
-       {CMD(emacs_simple), "Window:bury", "K:A-B"},
+       {CMD(emacs_simple), "Tile:next", "K:CX-o"},
+       {CMD(emacs_simple), "Tile:prev", "K:CX-O"},
+       {CMD(emacs_simple), "Tile:y+", "K:CX-^"},
+       {CMD(emacs_simple), "Tile:split-y", "K:CX-2"},
+       {CMD(emacs_simple), "Tile:split-x", "K:CX-3"},
+       {CMD(emacs_simple), "Tile:close", "K:CX-0"},
+       {CMD(emacs_simple), "Tile:bury", "K:A-B"},
        {CMD(emacs_simple), "window:new", "K:CX5-2"},
        {CMD(emacs_simple), "window:close", "K:CX5-0"},
        {CMD(emacs_simple), "lib-server:done", "K:CX-#"},
@@ -538,7 +538,7 @@ DEF_CMD(emacs_close_others)
        if (strcmp(ci->key, "K-1") == 0 && N2(ci) != N2_close_others)
                return Efallthrough;
 
-       if (call("Window:close-others", ci->focus) <= 0)
+       if (call("Tile:close-others", ci->focus) <= 0)
                return Efalse;
        call("Mode:set-num2", ci->focus, N2_close_others);
        call("Message:modal", ci->focus, 0, NULL, "Type 1 to close more");
@@ -2279,9 +2279,9 @@ DEF_CMD(emacs_shift_again)
 DEF_CMD(emacs_growx)
 {
        if (ci->key[strlen(ci->key)-1] == '}')
-               call("Window:x+", ci->focus, ci->num);
+               call("Tile:x+", ci->focus, ci->num);
        else
-               call("Window:x-", ci->focus, ci->num);
+               call("Tile:x-", ci->focus, ci->num);
        call("Mode:set-num2", ci->focus, N2_growx);
        call("Message:modal", ci->focus, 0, NULL, "Type { or } to grow again");
        return 1;
index 17eef8bfaea93cb23916e5ec7d909836bad5cd3b..439a9a1709412a98d67d598536c9995ddd63b6d7 100644 (file)
@@ -423,7 +423,7 @@ class compose_email(edlib.Pane):
         self.complete_start = None
         self.complete_end = None
         if self.complete_menu:
-            self.complete_menu("Window:Close")
+            self.complete_menu("Tile:Close")
         self.complete_menu = None
         if not mark:
             mark = focus.call("doc:point", ret='mark')
@@ -556,7 +556,7 @@ class compose_email(edlib.Pane):
         self.complete_start = None
         self.complete_end = None
         if self.complete_menu:
-            self.complete_menu.call("Window:Close")
+            self.complete_menu.call("Tile:Close")
         self.complete_menu = None
         st = pt.dup()
         word = self.prev_addr(st)
@@ -884,7 +884,7 @@ class compose_email(edlib.Pane):
             root.call("event:read", p.stdout.fileno(),
                       lambda key, **a: read_status(p, key, **a))
             focus.call("Message", "Queueing message to %s." % whoto)
-            focus.call("Window:bury")
+            focus.call("Tile:bury")
             return 1
 
         # Cannot find pane to report status on, so do it sync
@@ -895,7 +895,7 @@ class compose_email(edlib.Pane):
             focus.call("Message", "Email submission gives err: " +
                        err.decode('utf-8','ignore'))
         focus.call("Message", "Email message to %s queued." % whoto)
-        focus.call("Window:bury")
+        focus.call("Tile:bury")
 
         return 1
 
index 686b9d86b7df92aeb3168d5c523adcbe5127beec..5fb8e4cfaea30248621676751b852d70d7bc719f 100755 (executable)
@@ -130,7 +130,7 @@ if sys.argv[0] == "":
                 if  cmd == "request-close":
                     if self.term:
                         # trigger finding a new document
-                        self.term.call("Window:bury")
+                        self.term.call("Tile:bury")
                     self.want_close = True
                     self.sock.send(b"OK")
                     return 1
@@ -140,7 +140,7 @@ if sys.argv[0] == "":
                     if p:
                         for v in env:
                             p.call("window:set:", env[v], v)
-                        p.call("Window:bury")
+                        p.call("Tile:bury")
 
                     self.term = p
                     self.sock.send(b'OK')
@@ -269,7 +269,7 @@ if sys.argv[0] == "":
                 focus.call("doc:notify:doc:done")
                 # FIXME need something better than 'bury'
                 # If it was already visible, it should stay that way
-                focus.call("Window:bury")
+                focus.call("Tile:bury")
         else:
             # Find and visit a doc waiting to be done
             choice = []
index cd86747e68e2e97be04dfdcf4ef036c8dbd5bfd2..aaf5fd0c5f0dc163a943feb8a267a577282365a3 100644 (file)
@@ -1877,7 +1877,7 @@ class notmuch_master_view(edlib.Pane):
             else:
                 w = ch * 10 * max / 1000
             if tile.w != w:
-                tile.call("Window:x+", "notmuch", int(w - tile.w))
+                tile.call("Tile:x+", "notmuch", int(w - tile.w))
         if self.query_pane and self.message_pane:
             # query_pane must be at least 4 lines, else 1/4 height
             # but never more than 1/2 the height
@@ -1892,7 +1892,7 @@ class notmuch_master_view(edlib.Pane):
                 if h > space / 2:
                     h = space / 2
             if tile.h != h:
-                tile.call("Window:y+", "notmuch", int(h - tile.h))
+                tile.call("Tile:y+", "notmuch", int(h - tile.h))
 
     def handle_getattr(self, key, focus, str, comm2, **a):
         "handle:get-attr"
@@ -2430,7 +2430,7 @@ class notmuch_master_view(edlib.Pane):
                 self.mark_read()
             p = self.message_pane
             self("notmuch-close-message", 1)
-            p.call("Window:close", "notmuch")
+            p.call("Tile:close", "notmuch")
         elif self.query_pane:
             if (self.query_pane.call("notmuch:close-whole-thread") == 1 and
                 key != "doc:char-Q"):
@@ -2450,7 +2450,7 @@ class notmuch_master_view(edlib.Pane):
             pnt['notmuch:query-name'] = ""
             self.list_pane.call("view:changed")
 
-            p.call("Window:close", "notmuch")
+            p.call("Tile:close", "notmuch")
         elif key == "doc:char-Q":
             p = self.call("ThisPane", ret='pane')
             if p and p.focus:
@@ -2477,13 +2477,13 @@ class notmuch_master_view(edlib.Pane):
     def handle_o(self, key, focus, **a):
         "handle:doc:char-o"
         # focus to next window
-        focus.call("Window:next", "notmuch")
+        focus.call("Tile:next", "notmuch")
         return 1
 
     def handle_O(self, key, focus, **a):
         "handle:doc:char-O"
         # focus to prev window
-        focus.call("Window:prev", "notmuch")
+        focus.call("Tile:prev", "notmuch")
         return 1
 
     def handle_g(self, key, focus, **a):
@@ -2504,7 +2504,7 @@ class notmuch_master_view(edlib.Pane):
         if self.message_pane:
             p = self.message_pane
             self("notmuch-close-message", 1)
-            p.call("Window:close", "notmuch")
+            p.call("Tile:close", "notmuch")
             self.message_pane = None
 
         # doc:notmuch:query might auto-select a message, which will
index eeed49111afa04189f94e8e473c0958e7048e28e..9a5e46205de9385fbc20c0cb81e635dc47fdf626 100644 (file)
@@ -681,12 +681,12 @@ class PresenterPane(edlib.Pane):
     def handle_M_f(self, key, **a):
         "handle:K:A-f"
         if self.borderless:
-            self.call("Window:border", 1)
+            self.call("Tile:border", 1)
             self.call("window:border", 1)
             self.call("window:fullscreen", -1)
             self.borderless = False
         else:
-            self.call("Window:border", -1)
+            self.call("Tile:border", -1)
             self.call("window:border", -1)
             self.call("window:fullscreen", 1)
             self.borderless = True
index 161514befcebed32dccee12276db26092c186d56..d062d48f61cc7994ac8c4675ac873374cfd07a1c 100644 (file)
@@ -185,7 +185,7 @@ DEF_CMD(imageview_reset)
 
 DEF_CMD(imageview_quit)
 {
-       call("Window:close", ci->focus);
+       call("Tile:close", ci->focus);
        return 1;
 }