Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,6 @@ static int uiOnDialogShow(Ihandle *ih, int state) {
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)icon);
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)icon);

exit = checkIsRunning();
if (exit) {
MessageBox(hWnd, (LPCSTR)"Theres' already an instance of clumsy running.",
(LPCSTR)"Aborting", MB_OK);
return IUP_CLOSE;
}

#ifdef _WIN32
exit = check32RunningOn64(hWnd);
if (exit) {
Expand All @@ -347,14 +340,25 @@ static int uiOnDialogShow(Ihandle *ih, int state) {

// try elevate and decides whether to exit
exit = tryElevate(hWnd, parameterized);
if (exit) {
return IUP_CLOSE;
}

if (!exit && parameterized) {
if (parameterized) {
setFromParameter(filterText, "VALUE", "filter");
LOG("is parameterized, start filtering upon execution.");
uiStartCb(filterButton);
}


exit = checkIsRunning();
if (exit) {
MessageBox(hWnd, (LPCSTR)"Theres' already an instance of clumsy running.",
(LPCSTR)"Aborting", MB_OK);
return IUP_CLOSE;
}

return exit ? IUP_CLOSE : IUP_DEFAULT;
return IUP_DEFAULT;
}

static int uiStartCb(Ihandle *ih) {
Expand Down