Skip to content

Commit

Permalink
Add navigation to the 1st & last tab abilities
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Dec 16, 2023
1 parent 58d8043 commit 24d7777
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 10 deletions.
6 changes: 4 additions & 2 deletions PowerEditor/installer/nativeLang/english.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ Translation note:
<Item id="44092" name="7th Tab"/>
<Item id="44093" name="8th Tab"/>
<Item id="44094" name="9th Tab"/>
<Item id="44116" name="First Tab"/>
<Item id="44117" name="Last Tab"/>
<Item id="44095" name="Next Tab"/>
<Item id="44096" name="Previous Tab"/>
<Item id="44097" name="Monitoring (tail -f)"/>
Expand Down Expand Up @@ -346,12 +348,12 @@ Translation note:
<Item id="45057" name="OEM 865: Nordic"/>
<Item id="45053" name="OEM 860: Portuguese"/>
<Item id="45056" name="OEM 863: French"/>

<Item id="10001" name="Move to Other View"/>
<Item id="10002" name="Clone to Other View"/>
<Item id="10003" name="Move to New Instance"/>
<Item id="10004" name="Open in New Instance"/>

<Item id="10005" name="Move to Start"/>
<Item id="10006" name="Move to End"/>
<Item id="46001" name="Style Configurator..."/>
<Item id="46250" name="Define your language..."/>
<Item id="46300" name="Open User Defined Language folder..."/>
Expand Down
6 changes: 4 additions & 2 deletions PowerEditor/installer/nativeLang/english_customizable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ Translation note:
<Item id="44092" name="7th Tab"/>
<Item id="44093" name="8th Tab"/>
<Item id="44094" name="9th Tab"/>
<Item id="44116" name="First Tab"/>
<Item id="44117" name="Last Tab"/>
<Item id="44095" name="Next Tab"/>
<Item id="44096" name="Previous Tab"/>
<Item id="44097" name="Monitoring (tail -f)"/>
Expand Down Expand Up @@ -346,12 +348,12 @@ Translation note:
<Item id="45057" name="OEM 865: Nordic"/>
<Item id="45053" name="OEM 860: Portuguese"/>
<Item id="45056" name="OEM 863: French"/>

<Item id="10001" name="Move to Other View"/>
<Item id="10002" name="Clone to Other View"/>
<Item id="10003" name="Move to New Instance"/>
<Item id="10004" name="Open in New Instance"/>

<Item id="10005" name="Move to Start"/>
<Item id="10006" name="Move to End"/>
<Item id="46001" name="Style Configurator..."/>
<Item id="46250" name="Define your language..."/>
<Item id="46300" name="Open User Defined Language folder..."/>
Expand Down
5 changes: 4 additions & 1 deletion PowerEditor/installer/nativeLang/french.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ Translation note:
<Item id="44092" name="Onglet 7"/>
<Item id="44093" name="Onglet 8"/>
<Item id="44094" name="Onglet 9"/>
<Item id="44116" name="Premier Onglet"/>
<Item id="44117" name="Dernier Onglet"/>
<Item id="44095" name="Onglet suivant"/>
<Item id="44096" name="Onglet précédent"/>
<Item id="44097" name="Surveillance de Log (tail -f)"/>
Expand Down Expand Up @@ -351,7 +353,8 @@ Translation note:
<Item id="10002" name="Cloner dans l'autre vue"/>
<Item id="10003" name="Déplacer vers une nouvelle fenêtre"/>
<Item id="10004" name="Ouvrir dans une nouvelle fenêtre"/>

<Item id="10005" name="Déplacer au début"/>
<Item id="10006" name="Déplacer à la fin"/>
<Item id="46001" name="Configurateur de coloration syntaxique..."/>
<Item id="46250" name="Définir votre langage..."/>
<Item id="46300" name="Ouvrir le dossier des Langages utilisateur..."/>
Expand Down
6 changes: 4 additions & 2 deletions PowerEditor/installer/nativeLang/taiwaneseMandarin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@
<Item id="44092" name="頁籤7"/>
<Item id="44093" name="頁籤8"/>
<Item id="44094" name="頁籤9"/>
<Item id="44116" name="車頭頁籤"/>
<Item id="44117" name="車尾頁籤"/>
<Item id="44095" name="下一頁籤"/>
<Item id="44096" name="上一頁籤"/>
<Item id="44110" name="移除顏色"/>
Expand Down Expand Up @@ -321,12 +323,12 @@
<Item id="45057" name="OEM 865: 北歐文"/>
<Item id="45053" name="OEM 860: 葡萄牙文"/>
<Item id="45056" name="OEM 863: 法文"/>

<Item id="10001" name="移動到另一檢視"/>
<Item id="10002" name="仿製到另一檢視"/>
<Item id="10003" name="移到新執行個體"/>
<Item id="10004" name="在新執行個體開啟"/>

<Item id="10005" name="移動至車頭"/>
<Item id="10006" name="移動至車尾"/>
<Item id="46001" name="語法樣式配置器..."/>
<Item id="46250" name="定義你的語法樣式..."/>
<Item id="46300" name="開啟自訂語法樣式資料夾..."/>
Expand Down
7 changes: 4 additions & 3 deletions PowerEditor/src/Notepad_plus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,6 @@ BEGIN
END
POPUP "Move/Clone Current Document"
BEGIN
MENUITEM "Move to Start", IDM_VIEW_GOTO_START
MENUITEM "Move to End", IDM_VIEW_GOTO_END
MENUITEM SEPARATOR
MENUITEM "Move to Other View", IDM_VIEW_GOTO_ANOTHER_VIEW
MENUITEM "Clone to Other View", IDM_VIEW_CLONE_TO_ANOTHER_VIEW
MENUITEM "Move to New Instance", IDM_VIEW_GOTO_NEW_INSTANCE
Expand All @@ -729,9 +726,13 @@ BEGIN
MENUITEM "8th Tab", IDM_VIEW_TAB8
MENUITEM "9th Tab", IDM_VIEW_TAB9
MENUITEM SEPARATOR
MENUITEM "First Tab", IDM_VIEW_TAB_START
MENUITEM "Last Tab", IDM_VIEW_TAB_END
MENUITEM "Next Tab", IDM_VIEW_TAB_NEXT
MENUITEM "Previous Tab", IDM_VIEW_TAB_PREV
MENUITEM SEPARATOR
MENUITEM "Move to Start", IDM_VIEW_GOTO_START
MENUITEM "Move to End", IDM_VIEW_GOTO_END
MENUITEM "Move Tab Forward", IDM_VIEW_TAB_MOVEFORWARD
MENUITEM "Move Tab Backward", IDM_VIEW_TAB_MOVEBACKWARD
MENUITEM SEPARATOR
Expand Down
8 changes: 8 additions & 0 deletions PowerEditor/src/NppCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,14 @@ void Notepad_plus::command(int id)
}
break;

case IDM_VIEW_TAB_START:
case IDM_VIEW_TAB_END:
{
size_t index = id == IDM_VIEW_TAB_START ? 0 : _pDocTab->nbItem() - 1;
switchToFile(_pDocTab->getBufferByIndex(index));
}
break;

case IDM_VIEW_TAB_NEXT:
{
const int current_index = _pDocTab->getCurrentTabIndex();
Expand Down
2 changes: 2 additions & 0 deletions PowerEditor/src/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_NUMPAD7, IDM_VIEW_TAB7, true, false, false, nullptr },
{ VK_NUMPAD8, IDM_VIEW_TAB8, true, false, false, nullptr },
{ VK_NUMPAD9, IDM_VIEW_TAB9, true, false, false, nullptr },
{ VK_NULL, IDM_VIEW_TAB_START, false, false, false, nullptr },
{ VK_NULL, IDM_VIEW_TAB_END, false, false, false, nullptr },
{ VK_NEXT, IDM_VIEW_TAB_NEXT, true, false, false, nullptr },
{ VK_PRIOR, IDM_VIEW_TAB_PREV, true, false, false, nullptr },
{ VK_NEXT, IDM_VIEW_TAB_MOVEFORWARD, true, false, true, nullptr },
Expand Down
2 changes: 2 additions & 0 deletions PowerEditor/src/menuCmdID.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@
#define IDM_VIEW_TAB_COLOUR_3 (IDM_VIEW + 113)
#define IDM_VIEW_TAB_COLOUR_4 (IDM_VIEW + 114)
#define IDM_VIEW_TAB_COLOUR_5 (IDM_VIEW + 115)
#define IDM_VIEW_TAB_START (IDM_VIEW + 116)
#define IDM_VIEW_TAB_END (IDM_VIEW + 117)

#define IDM_VIEW_NPC (IDM_VIEW + 130)
#define IDM_VIEW_NPC_CCUNIEOL (IDM_VIEW + 131)
Expand Down

0 comments on commit 24d7777

Please sign in to comment.