=> a6353f70558553bfada274147a82997d4c79ab08
[1mdiff --git a/po/en.po b/po/en.po[m [1mindex a4433caa..e429e327 100644[m [1m--- a/po/en.po[m [1m+++ b/po/en.po[m [36m@@ -172,6 +172,12 @@[m [mmsgstr "Close Tabs To Right"[m msgid "menu.duptab"[m msgstr "Duplicate Tab"[m [m [32m+[m[32mmsgid "menu.movetab.left"[m [32m+[m[32mmsgstr "Move Tab Left"[m [32m+[m [32m+[m[32mmsgid "menu.movetab.right"[m [32m+[m[32mmsgstr "Move Tab Right"[m [32m+[m msgid "menu.split.merge"[m msgstr "Unsplit"[m [m [1mdiff --git a/res/lang/cs.bin b/res/lang/cs.bin[m [1mindex 8cdbed59..8dfd137f 100644[m Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ [1mdiff --git a/res/lang/de.bin b/res/lang/de.bin[m [1mindex 8a294ca4..c7e8b6fd 100644[m Binary files a/res/lang/de.bin and b/res/lang/de.bin differ [1mdiff --git a/res/lang/en.bin b/res/lang/en.bin[m [1mindex 9a4029f1..1156d3a2 100644[m Binary files a/res/lang/en.bin and b/res/lang/en.bin differ [1mdiff --git a/res/lang/eo.bin b/res/lang/eo.bin[m [1mindex 4daa72a7..1cb1dff7 100644[m Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ [1mdiff --git a/res/lang/es.bin b/res/lang/es.bin[m [1mindex aab45c44..55c03194 100644[m Binary files a/res/lang/es.bin and b/res/lang/es.bin differ [1mdiff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin[m [1mindex 10188964..e19a556e 100644[m Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ [1mdiff --git a/res/lang/fi.bin b/res/lang/fi.bin[m [1mindex bccc98b6..c70c4037 100644[m Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ [1mdiff --git a/res/lang/fr.bin b/res/lang/fr.bin[m [1mindex c50caa4d..af586967 100644[m Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ [1mdiff --git a/res/lang/gl.bin b/res/lang/gl.bin[m [1mindex 1ab16b46..64c831ee 100644[m Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ [1mdiff --git a/res/lang/hu.bin b/res/lang/hu.bin[m [1mindex 4ec109fc..fdbf3118 100644[m Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ [1mdiff --git a/res/lang/ia.bin b/res/lang/ia.bin[m [1mindex e3c34beb..91677f87 100644[m Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ [1mdiff --git a/res/lang/ie.bin b/res/lang/ie.bin[m [1mindex 5570e349..fd4d0b45 100644[m Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ [1mdiff --git a/res/lang/isv.bin b/res/lang/isv.bin[m [1mindex ce6aac3b..ca609204 100644[m Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ [1mdiff --git a/res/lang/it.bin b/res/lang/it.bin[m [1mindex ce5a10c9..97fbb74a 100644[m Binary files a/res/lang/it.bin and b/res/lang/it.bin differ [1mdiff --git a/res/lang/nl.bin b/res/lang/nl.bin[m [1mindex 21d1cd3a..41878135 100644[m Binary files a/res/lang/nl.bin and b/res/lang/nl.bin differ [1mdiff --git a/res/lang/pl.bin b/res/lang/pl.bin[m [1mindex 34d9dcb3..3b3afe12 100644[m Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ [1mdiff --git a/res/lang/ru.bin b/res/lang/ru.bin[m [1mindex c0f06c15..1dddec90 100644[m Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ [1mdiff --git a/res/lang/sk.bin b/res/lang/sk.bin[m [1mindex c067b156..e37a947b 100644[m Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ [1mdiff --git a/res/lang/sr.bin b/res/lang/sr.bin[m [1mindex 525b90f3..ea472b4c 100644[m Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ [1mdiff --git a/res/lang/tok.bin b/res/lang/tok.bin[m [1mindex 461b2ad5..3329bb80 100644[m Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ [1mdiff --git a/res/lang/tr.bin b/res/lang/tr.bin[m [1mindex 448350b9..a40dcac0 100644[m Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ [1mdiff --git a/res/lang/uk.bin b/res/lang/uk.bin[m [1mindex 622dc980..3aef2d8c 100644[m Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ [1mdiff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin[m [1mindex fe0f2b42..cb990f8a 100644[m Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ [1mdiff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin[m [1mindex 4668a81f..5058e09d 100644[m Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex c6f99bb2..9c40329d 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -4190,6 +4190,15 @@[m [mstatic iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)[m removeTicker_App(prerender_DocumentWidget_, d);[m return iFalse;[m }[m [32m+[m[32m else if (equal_Command(cmd, "tabs.move") && d == document_App()) {[m [32m+[m[32m int dir = iSign(arg_Command(cmd));[m [32m+[m[32m if (dir) {[m [32m+[m[32m iWidget *tabs = findWidget_App("doctabs");[m [32m+[m[32m size_t tabPos = tabPageIndex_Widget(tabs, d);[m [32m+[m[32m moveTabPage_Widget(tabs, tabPos, tabPos + dir);[m [32m+[m[32m }[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m else if (equal_Command(cmd, "tab.created")) {[m /* Space for tab buttons has changed. */[m updateWindowTitle_DocumentWidget_(d);[m [1mdiff --git a/src/ui/keys.c b/src/ui/keys.c[m [1mindex 663fc49d..8aa80e1c 100644[m [1m--- a/src/ui/keys.c[m [1m+++ b/src/ui/keys.c[m [36m@@ -232,6 +232,8 @@[m [mstatic const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =[m { 79, { "${LC:menu.reopentab}", SDLK_t, KMOD_SECONDARY, "tabs.new reopen:1" }, 0 }, [m { 80, { "${keys.tab.prev}", prevTab_KeyShortcut, "tabs.prev" }, 0 },[m { 81, { "${keys.tab.next}", nextTab_KeyShortcut, "tabs.next" }, 0 },[m [32m+[m[32m { 84, { "${LC:menu.movetab.left}", moveTabLeft_KeyShortcut, "tabs.move arg:-1" }, 0 },[m [32m+[m[32m { 85, { "${LC:menu.movetab.right}", moveTabRight_KeyShortcut, "tabs.move arg:1" }, 0 },[m { 90, { "${keys.split.menu}", SDLK_j, KMOD_PRIMARY, "splitmenu.open" }, 0 },[m { 91, { "${keys.split.next}", SDLK_TAB, KMOD_CTRL, "keyroot.next", }, 0 },[m { 92, { "${keys.split.item} ${menu.split.merge}", '1', 0, "ui.split arg:0", }, noDirectTrigger_BindFlag },[m [1mdiff --git a/src/ui/keys.h b/src/ui/keys.h[m [1mindex 205bd0d8..170f92f9 100644[m [1m--- a/src/ui/keys.h[m [1m+++ b/src/ui/keys.h[m [36m@@ -39,6 +39,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m # define closeTab_KeyShortcut SDLK_w, KMOD_PRIMARY[m # define prevTab_KeyShortcut SDLK_LEFTBRACKET, 0[m # define nextTab_KeyShortcut SDLK_RIGHTBRACKET, 0[m [32m+[m[32m# define moveTabLeft_KeyShortcut SDLK_LEFTBRACKET, KMOD_ALT[m [32m+[m[32m# define moveTabRight_KeyShortcut SDLK_RIGHTBRACKET, KMOD_ALT[m # define navigateBack_KeyShortcut SDLK_LEFT, 0[m # define navigateForward_KeyShortcut SDLK_RIGHT, 0[m # define navigateParent_KeyShortcut SDLK_r, KMOD_SHIFT[m [36m@@ -61,6 +63,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m # define closeTab_KeyShortcut SDLK_w, KMOD_PRIMARY[m # define prevTab_KeyShortcut SDLK_LEFTBRACKET, KMOD_SECONDARY[m # define nextTab_KeyShortcut SDLK_RIGHTBRACKET, KMOD_SECONDARY[m [32m+[m[32m# define moveTabLeft_KeyShortcut SDLK_LEFTBRACKET, KMOD_TERTIARY[m [32m+[m[32m# define moveTabRight_KeyShortcut SDLK_RIGHTBRACKET, KMOD_TERTIARY[m # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_PRIMARY[m # define navigateForward_KeyShortcut SDLK_RIGHT, KMOD_PRIMARY[m # define navigateParent_KeyShortcut SDLK_UP, KMOD_PRIMARY[m [36m@@ -83,6 +87,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m # define closeTab_KeyShortcut SDLK_w, KMOD_PRIMARY[m # define prevTab_KeyShortcut SDLK_PAGEUP, KMOD_PRIMARY[m # define nextTab_KeyShortcut SDLK_PAGEDOWN, KMOD_PRIMARY[m [32m+[m[32m# define moveTabLeft_KeyShortcut SDLK_PAGEUP, KMOD_SECONDARY[m [32m+[m[32m# define moveTabRight_KeyShortcut SDLK_PAGEDOWN, KMOD_SECONDARY[m # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_ALT[m # define navigateForward_KeyShortcut SDLK_RIGHT, KMOD_ALT[m # define navigateParent_KeyShortcut SDLK_UP, KMOD_ALT[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex e93adc57..5422e676 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -1840,8 +1840,11 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m { "${menu.closetab.other}", 0, 0, "tabs.close toleft:1 toright:1" },[m { barLeftArrow_Icon " ${menu.closetab.left}", 0, 0, "tabs.close toleft:1" },[m { barRightArrow_Icon " ${menu.closetab.right}", 0, 0, "tabs.close toright:1" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { leftAngle_Icon " ${menu.movetab.left}", 0, 0, "tabs.move arg:-1" },[m [32m+[m[32m { rightAngle_Icon " ${menu.movetab.right}", 0, 0, "tabs.move arg:1" },[m },[m [31m- 6);[m [32m+[m[32m 9);[m iWidget *barMenu =[m makeMenu_Widget(root,[m (iMenuItem[]){[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 3bbf0d73..b212f817 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -1818,6 +1818,20 @@[m [miWidget *removeTabPage_Widget(iWidget *tabs, size_t index) {[m return page;[m }[m [m [32m+[m[32mvoid moveTabPage_Widget(iWidget *tabs, size_t index, size_t newIndex) {[m [32m+[m[32m const size_t count = tabCount_Widget(tabs);[m [32m+[m[32m if (index == newIndex || newIndex >= count) {[m [32m+[m[32m return;[m [32m+[m[32m }[m [32m+[m[32m iWidget *buttons = findChild_Widget(tabs, "tabs.buttons");[m [32m+[m[32m iWidget *pages = findChild_Widget(tabs, "tabs.pages");[m [32m+[m[32m iWidget *button = child_Widget(buttons, index);[m [32m+[m[32m iWidget *page = child_Widget(pages, index);[m [32m+[m[32m changeChildIndex_Widget(buttons, button, newIndex);[m [32m+[m[32m changeChildIndex_Widget(pages, page, newIndex);[m [32m+[m[32m arrange_Widget(tabs);[m [32m+[m[32m}[m [32m+[m void resizeToLargestPage_Widget(iWidget *tabs) {[m if (!tabs) return;[m // puts("RESIZE TO LARGEST PAGE ...");[m [1mdiff --git a/src/ui/util.h b/src/ui/util.h[m [1mindex 12c91ee0..bccf0455 100644[m [1m--- a/src/ui/util.h[m [1m+++ b/src/ui/util.h[m [36m@@ -89,18 +89,21 @@[m [miInt2 coord_MouseWheelEvent (const SDL_MouseWheelEvent *);[m #if defined (iPlatformTerminal)[m # define KMOD_PRIMARY KMOD_CTRL[m # define KMOD_SECONDARY KMOD_ALT[m [32m+[m[32m# define KMOD_TERTIARY KMOD_CTRL | KMOD_ALT /* TODO: does this work? */[m # define KMOD_ACCEPT KMOD_ALT[m # define KMOD_UNDO KMOD_ALT[m # define KMOD_ZOOM 0[m #elif defined (iPlatformApple)[m # define KMOD_PRIMARY KMOD_GUI[m # define KMOD_SECONDARY KMOD_GUI | KMOD_SHIFT[m [32m+[m[32m# define KMOD_TERTIARY KMOD_GUI | KMOD_SHIFT | KMOD_ALT[m # define KMOD_ACCEPT KMOD_PRIMARY[m # define KMOD_UNDO KMOD_PRIMARY[m # define KMOD_ZOOM KMOD_PRIMARY[m #else[m # define KMOD_PRIMARY KMOD_CTRL[m # define KMOD_SECONDARY KMOD_CTRL | KMOD_SHIFT[m [32m+[m[32m# define KMOD_TERTIARY KMOD_CTRL | KMOD_SHIFT | KMOD_ALT[m # define KMOD_ACCEPT KMOD_PRIMARY[m # define KMOD_UNDO KMOD_PRIMARY[m # define KMOD_ZOOM KMOD_PRIMARY[m [36m@@ -338,6 +341,7 @@[m [miWidget * appendTwoColumnTabPage_Widget(iWidget *tabs, const char *title,[m iWidget **headings, iWidget **values);[m void prependTabPage_Widget (iWidget *tabs, iWidget *page, const char *label, int key, int kmods);[m iWidget * removeTabPage_Widget (iWidget *tabs, size_t index); /* returns the page */[m [32m+[m[32mvoid moveTabPage_Widget (iWidget *tabs, size_t index, size_t newIndex);[m void resizeToLargestPage_Widget (iWidget *tabs);[m void showTabPage_Widget (iWidget *tabs, const iAnyObject *page);[m void addTabCloseButton_Widget(iWidget *tabs, const iWidget *page, const char *command);[m [1mdiff --git a/src/ui/widget.c b/src/ui/widget.c[m [1mindex a11eaa64..e39208bc 100644[m [1m--- a/src/ui/widget.c[m [1m+++ b/src/ui/widget.c[m [36m@@ -2014,6 +2014,29 @@[m [msize_t indexOfChild_Widget(const iWidget *d, const iAnyObject *child) {[m return iInvalidPos;[m }[m [m [32m+[m[32mvoid changeChildIndex_Widget(iWidget *d, iAnyObject *child, size_t newIndex) {[m [32m+[m[32m size_t oldIndex = 0;[m [32m+[m[32m iForEach(ObjectList, i, d->children) {[m [32m+[m[32m if (i.object == child) {[m [32m+[m[32m ref_Object(child); /* we keep a reference */[m [32m+[m[32m remove_ObjectListIterator(&i);[m [32m+[m[32m break;[m [32m+[m[32m }[m [32m+[m[32m oldIndex++;[m [32m+[m[32m }[m [32m+[m[32m iAssert(oldIndex <= size_ObjectList(d->children));[m [32m+[m[32m if (isEmpty_ObjectList(d->children) || newIndex == 0) {[m [32m+[m[32m pushFront_ObjectList(d->children, child);[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m iObjectListIterator iter;[m [32m+[m[32m init_ObjectListIterator(&iter, d->children);[m [32m+[m[32m for (size_t i = 1; i < newIndex; i++, next_ObjectListIterator(&iter)) {}[m [32m+[m[32m insertAfter_ObjectList(d->children, iter.value, child);[m [32m+[m[32m }[m [32m+[m[32m deref_Object(child); /* ObjectList has taken a reference */[m [32m+[m[32m}[m [32m+[m iAny *hitChild_Widget(const iWidget *d, iInt2 coord) {[m if (isHidden_Widget_(d)) {[m return NULL;[m [1mdiff --git a/src/ui/widget.h b/src/ui/widget.h[m [1mindex 82a51151..fc6f4161 100644[m [1m--- a/src/ui/widget.h[m [1m+++ b/src/ui/widget.h[m [36m@@ -317,6 +317,7 @@[m [miAny * insertChildAfterFlags_Widget(iWidget *, iAnyObject *child, size_t afterI[m iAny * removeChild_Widget (iWidget *, iAnyObject *child); /* returns a ref */[m iAny * child_Widget (iWidget *, size_t index); /* O(n) */[m size_t indexOfChild_Widget (const iWidget *, const iAnyObject *child); /* O(n) */[m [32m+[m[32mvoid changeChildIndex_Widget (iWidget *, iAnyObject *child, size_t newIndex); /* O(n) */[m void arrange_Widget (iWidget *);[m iBool scrollOverflow_Widget (iWidget *, int delta); /* moves the widget */[m iBool dispatchEvent_Widget (iWidget *, const SDL_Event *);[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).