diff --git a/grepWinNP3/src/Resources/grepWin.rc b/grepWinNP3/src/Resources/grepWin.rc index 2c97378e3..54607e1c6 100644 --- a/grepWinNP3/src/Resources/grepWin.rc +++ b/grepWinNP3/src/Resources/grepWin.rc @@ -418,6 +418,9 @@ BEGIN IDS_EXPORTMATCHLINECONTENT "include match line text" IDS_UPDATEAVAILABLE "grepWinNP3 %s is available" IDS_CAPTURESEARCH "Capture search" + IDS_CLONE "Start new grepWinNP3 window" + IDS_NEWINSTANCE_TT "Start new grepWinNP3 window" + IDS_STAY_ON_TOP "Stay On Top" END #endif // Neutral resources diff --git a/grepWinNP3/src/SearchDlg.cpp b/grepWinNP3/src/SearchDlg.cpp index 8851699f6..dabb52a58 100644 --- a/grepWinNP3/src/SearchDlg.cpp +++ b/grepWinNP3/src/SearchDlg.cpp @@ -177,6 +177,8 @@ CSearchDlg::CSearchDlg(HWND hParent) , m_pBookmarksDlg(nullptr) , m_showContent(false) , m_showContentSet(false) + , m_stayOnTop(false) + , m_OpacityNoFocus(100) , m_themeCallbackId(0) { } @@ -330,6 +332,8 @@ LRESULT CSearchDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara int menuItemsCount = GetMenuItemCount(hSysMenu); if (menuItemsCount > 2) { + InsertMenu(hSysMenu, menuItemsCount - 2, MF_STRING | MF_BYPOSITION, ID_STAY_ON_TOP, TranslatedString(hResource, IDS_STAY_ON_TOP).c_str()); + InsertMenu(hSysMenu, menuItemsCount - 2, MF_SEPARATOR | MF_BYPOSITION, NULL, NULL); InsertMenu(hSysMenu, menuItemsCount - 2, MF_STRING | MF_BYPOSITION, ID_ABOUTBOX, TranslatedString(hResource, IDS_ABOUT).c_str()); InsertMenu(hSysMenu, menuItemsCount - 2, MF_STRING | MF_BYPOSITION, ID_CLONE, TranslatedString(hResource, IDS_CLONE).c_str()); InsertMenu(hSysMenu, menuItemsCount - 2, MF_SEPARATOR | MF_BYPOSITION, NULL, NULL); @@ -339,6 +343,8 @@ LRESULT CSearchDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara AppendMenu(hSysMenu, MF_SEPARATOR, NULL, NULL); AppendMenu(hSysMenu, MF_STRING, ID_CLONE, TranslatedString(hResource, IDS_CLONE).c_str()); AppendMenu(hSysMenu, MF_STRING, ID_ABOUTBOX, TranslatedString(hResource, IDS_ABOUT).c_str()); + AppendMenu(hSysMenu, MF_SEPARATOR, NULL, NULL); + AppendMenu(hSysMenu, MF_STRING, ID_STAY_ON_TOP, TranslatedString(hResource, IDS_STAY_ON_TOP).c_str()); } } @@ -801,6 +807,13 @@ LRESULT CSearchDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara CloneWindow(); } break; + case ID_STAY_ON_TOP: + { + m_stayOnTop = !m_stayOnTop; // toggle + SetWindowPos(*this, m_stayOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + CheckMenuItem(GetSystemMenu(*this, FALSE), ID_STAY_ON_TOP, m_stayOnTop ? MF_BYCOMMAND | MF_CHECKED : MF_BYCOMMAND | MF_UNCHECKED); + } + break; } } break; diff --git a/grepWinNP3/src/SearchDlg.h b/grepWinNP3/src/SearchDlg.h index 936ea85ad..d95a01056 100644 --- a/grepWinNP3/src/SearchDlg.h +++ b/grepWinNP3/src/SearchDlg.h @@ -42,6 +42,8 @@ #define ID_ABOUTBOX 0x0010 #define ID_CLONE 0x0011 +#define ID_STAY_ON_TOP 0x0022 + #define ALPHA_OPAQUE (255) enum ExecuteAction @@ -205,6 +207,7 @@ private: bool m_bConfirmationOnReplace; bool m_showContent; bool m_showContentSet; + bool m_stayOnTop; BYTE m_OpacityNoFocus; std::vector m_items; diff --git a/grepWinNP3/src/resource.h b/grepWinNP3/src/resource.h index 6a1e50f62..fe567ab7b 100644 --- a/grepWinNP3/src/resource.h +++ b/grepWinNP3/src/resource.h @@ -185,6 +185,7 @@ #define IDC_MAXNUMWORKER 3003 #define IDC_TEXT_NUMOFWORKER 3004 #define IDC_ENTRYCONTEXTMENU 3005 +#define IDS_STAY_ON_TOP 3006 #define ID_REMOVEBOOKMARK 32771 diff --git a/grepWinNP3/translationsNP3/Deutsch (Deutschland) [de-DE].lang b/grepWinNP3/translationsNP3/Deutsch (Deutschland) [de-DE].lang index 155d5e70b..586412f8f 100644 --- a/grepWinNP3/translationsNP3/Deutsch (Deutschland) [de-DE].lang +++ b/grepWinNP3/translationsNP3/Deutsch (Deutschland) [de-DE].lang @@ -574,6 +574,10 @@ msgstr "Scanning der Datei '%s'" msgid "search string is empty" msgstr "Suchstring ist leer" +#. Resource IDs: (170, 171) +msgid "Start new grepWinNP3 window" +msgstr "Starte neues grepWinNP3 Fenster" + #. Resource IDs: (114) msgid "the path(s) which is searched recursively.\nSeparate paths with the '|' symbol.\nExample: c:\\temp|d:\\logs" msgstr "Der Pfad bzw. die Pfade, der bzw. die rekursiv gesucht wird bzw. werden.\nSeparieren Sie Pfade mit dem '|' Symbol.\nBeispiel: c:\\temp|d:\\logs" @@ -598,3 +602,7 @@ msgstr "Max # an gleichz. Worker" msgid "This adds a new entry to the context menu named 'Open with Editor'" msgstr "Dies fügt dem Kontextmenü einen neuen Eintrag hinzu, benannt 'Mit Editor öffnen'." +#. Resource IDs: (3006) +msgid "Stay On Top" +msgstr "Immer als oberstes Fenster" + diff --git a/grepWinNP3/translationsNP3/English (United States) [en-US].lang b/grepWinNP3/translationsNP3/English (United States) [en-US].lang index 229f882fc..a2e860562 100644 --- a/grepWinNP3/translationsNP3/English (United States) [en-US].lang +++ b/grepWinNP3/translationsNP3/English (United States) [en-US].lang @@ -574,6 +574,10 @@ msgstr "" msgid "search string is empty" msgstr "" +#. Resource IDs: (170, 171) +msgid "Start new grepWinNP3 window" +msgstr "" + #. Resource IDs: (114) msgid "the path(s) which is searched recursively.\nSeparate paths with the '|' symbol.\nExample: c:\\temp|d:\\logs" msgstr "" @@ -598,3 +602,7 @@ msgstr "" msgid "This adds a new entry to the context menu named 'Open with Editor'" msgstr "" +#. Resource IDs: (3006) +msgid "Stay On Top" +msgstr "" + diff --git a/minipath/src/minipath.c b/minipath/src/minipath.c index 5840e01b5..9e4b90004 100644 --- a/minipath/src/minipath.c +++ b/minipath/src/minipath.c @@ -1049,9 +1049,9 @@ LRESULT MsgCreate(HWND hwnd,WPARAM wParam,LPARAM lParam) // DirList InitListView(hwndDirList); - ListView_InsertColumn(hwndDirList, 0, &lvc); + DirList_Init(hwndDirList, NULL); ListView_SetExtendedListViewStyle(hwndDirList,LVS_EX_DOUBLEBUFFER|LVS_EX_LABELTIP); - DirList_Init(hwndDirList,NULL); + ListView_InsertColumn(hwndDirList, 0, &lvc); if (Settings.bTrackSelect) ListView_SetExtendedListViewStyleEx(hwndDirList, LVS_EX_TRACKSELECT|LVS_EX_ONECLICKACTIVATE, @@ -1060,6 +1060,7 @@ LRESULT MsgCreate(HWND hwnd,WPARAM wParam,LPARAM lParam) ListView_SetExtendedListViewStyleEx(hwndDirList, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT); + SetExplorerTheme(hwndDirList); } ListView_SetHoverTime(hwndDirList,10);