Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 884de2d

Browse files
Merge pull request #23 from hardingadonis/develop
double click from taskbar icon to show the main window
2 parents bc47015 + fc9b5d1 commit 884de2d

File tree

10 files changed

+24
-14
lines changed

10 files changed

+24
-14
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ jobs:
6363
uses: TheDoctor0/zip-release@0.6.2
6464
with:
6565
type: zip
66-
filename: Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
67-
path: ${{ github.workspace }}\build\source\Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.exe
66+
filename: Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
67+
path: ${{ github.workspace }}\build\source\Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.exe
6868

6969
- name: Upload built executable file
7070
uses: tanyagray/action-upload-release-asset@v1.1.3
7171
env:
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373
with:
7474
upload_url: ${{ needs.update_release_draft.outputs.upload_url }}
75-
asset_path: ${{ github.workspace }}\Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
76-
asset_name: Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
75+
asset_path: ${{ github.workspace }}\Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
76+
asset_name: Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
7777
asset_content_type: application/zip
7878

7979
publish_release:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10.2)
22

3-
project(Eyes_Protection_Reminder VERSION 4.1.1)
3+
project(Eyes_Protection_Reminder VERSION 4.1.2)
44

55
add_subdirectory(libs/wxWidgets)
66
add_subdirectory(source)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![Languages](https://img.shields.io/github/languages/top/hardingadonis/Eyes_Protection_Reminder?style=flat)
77
![Repo Size](https://img.shields.io/github/repo-size/hardingadonis/Eyes_Protection_Reminder?style=flat)
88
![License](https://img.shields.io/github/license/hardingadonis/Eyes_Protection_Reminder?style=flat)
9-
[![Download](https://img.shields.io/github/downloads/hardingadonis/Eyes_Protection_Reminder/v4.1.1/total?style=flat)](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.1)
9+
[![Download](https://img.shields.io/github/downloads/hardingadonis/Eyes_Protection_Reminder/v4.1.2/total?style=flat)](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.2)
1010

1111
![EPR_banner](https://github.com/hardingadonis/Eyes_Protection_Reminder/blob/main/imgs/EPR_banner.png)
1212

@@ -60,10 +60,10 @@ cmake --build . --target EPR
6060
```
6161

6262
- Run project
63-
- Find an application that named `Eyes_Protection_Reminder_v4.1.1.Windows.x86.exe` or `Eyes_Protection_Reminder_v4.1.1.Windows.x64.exe`
63+
- Find an application that named `Eyes_Protection_Reminder_v4.1.2.Windows.x86.exe` or `Eyes_Protection_Reminder_v4.1.2.Windows.x64.exe`
6464
- Now, run it!!!
6565

66-
- Or, you can download the binary in [here](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.1)
66+
- Or, you can download the binary in [here](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.2)
6767

6868
## Usage
6969

docs/Usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
### Download Eyes Protection Reminder
1515

16-
You can download the binary in [here](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.1).
16+
You can download the binary in [here](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.2).
1717

1818
Choose one of two:
1919

docs/Usage_vi_VN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
### Tải Eyes Protection Reminder
1515

16-
Bạn có thể tải **Eyes Protection Reminder** [tại đây](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.1).
16+
Bạn có thể tải **Eyes Protection Reminder** [tại đây](https://github.com/hardingadonis/Eyes_Protection_Reminder/releases/tag/v4.1.2).
1717

1818
Chọn một trong hai:
1919

source/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10.2)
22

3-
project(EPR VERSION 4.1.1)
3+
project(EPR VERSION 4.1.2)
44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

@@ -34,4 +34,4 @@ set(EPR_ICON ${CMAKE_SOURCE_DIR}/assets/EPR_icon.rc)
3434
add_executable(${PROJECT_NAME} WIN32 ${EPR_SOURCES} ${EPR_ICON})
3535
target_link_libraries(${PROJECT_NAME} PUBLIC wx::core wx::base)
3636
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
37-
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Eyes_Protection_Reminder_v4.1.1.Windows.${EPR_ARCH})
37+
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Eyes_Protection_Reminder_v4.1.2.Windows.${EPR_ARCH})

source/include/UI/TaskBarIcon.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ namespace EPR
4040
void OnMenuSource(wxCommandEvent& _event);
4141
void OnMenuExit(wxCommandEvent& _event);
4242

43+
void OnLeftButtonDClick(wxTaskBarIconEvent& _event);
44+
4345
protected:
4446
wxMenu* CreatePopupMenu() override;
4547

source/src/Application.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace EPR
6363
SetAppName("Eyes Protection Reminder");
6464

6565
// Create the main frame
66-
m_mainFrame = new MainFrame("Eyes Protection Reminder - v4.1.1", wxSize(500, 350));
66+
m_mainFrame = new MainFrame("Eyes Protection Reminder - v4.1.2", wxSize(500, 350));
6767

6868
if (m_mainFrame == nullptr)
6969
{

source/src/UI/MainFrame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace EPR
100100

101101
// Set the information for about dialog
102102
_aboutInfo.SetName(wxTheApp->GetAppName());
103-
_aboutInfo.SetVersion("- v4.1.1");
103+
_aboutInfo.SetVersion("- v4.1.2");
104104
_aboutInfo.SetIcon(s_EPR_icon_64);
105105
_aboutInfo.SetCopyright("Copyright (c) 2022 " + wxString::FromUTF8("Minh Vương.") + "\nAll rights reserved.");
106106
_aboutInfo.SetDescription("A small tool to remind you to\nprotect your eyes with the 20:20:20 rule.");

source/src/UI/TaskBarIcon.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace EPR
3939
EVT_MENU(EPR_Menu_Restore, TaskBarIcon::OnMenuRestore)
4040
EVT_MENU(EPR_Menu_Source, TaskBarIcon::OnMenuSource)
4141
EVT_MENU(EPR_Menu_Exit, TaskBarIcon::OnMenuExit)
42+
EVT_TASKBAR_LEFT_DCLICK(TaskBarIcon::OnLeftButtonDClick)
4243
wxEND_EVENT_TABLE()
4344

4445
TaskBarIcon::TaskBarIcon(wxWindow* _parent, wxTaskBarIconType _iconType) :
@@ -68,6 +69,13 @@ namespace EPR
6869
_event.Skip();
6970
}
7071

72+
void TaskBarIcon::OnLeftButtonDClick(wxTaskBarIconEvent& _event)
73+
{
74+
m_parent->Show();
75+
76+
_event.Skip();
77+
}
78+
7179
wxMenu* TaskBarIcon::CreatePopupMenu()
7280
{
7381
wxMenu* _menu = new wxMenu();

0 commit comments

Comments
 (0)