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

Commit

Permalink
Merge pull request #23 from hardingadonis/develop
Browse files Browse the repository at this point in the history
double click from taskbar icon to show the main window
  • Loading branch information
hardingadonis authored Dec 8, 2022
2 parents bc47015 + fc9b5d1 commit 884de2d
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ jobs:
uses: TheDoctor0/[email protected]
with:
type: zip
filename: Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
path: ${{ github.workspace }}\build\source\Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.exe
filename: Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
path: ${{ github.workspace }}\build\source\Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.exe

- name: Upload built executable file
uses: tanyagray/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.update_release_draft.outputs.upload_url }}
asset_path: ${{ github.workspace }}\Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
asset_name: Eyes_Protection_Reminder_v4.1.1.Windows.${{ matrix.architecture }}.zip
asset_path: ${{ github.workspace }}\Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
asset_name: Eyes_Protection_Reminder_v4.1.2.Windows.${{ matrix.architecture }}.zip
asset_content_type: application/zip

publish_release:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2)

project(Eyes_Protection_Reminder VERSION 4.1.1)
project(Eyes_Protection_Reminder VERSION 4.1.2)

add_subdirectory(libs/wxWidgets)
add_subdirectory(source)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
![Languages](https://img.shields.io/github/languages/top/hardingadonis/Eyes_Protection_Reminder?style=flat)
![Repo Size](https://img.shields.io/github/repo-size/hardingadonis/Eyes_Protection_Reminder?style=flat)
![License](https://img.shields.io/github/license/hardingadonis/Eyes_Protection_Reminder?style=flat)
[![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)
[![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)

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

Expand Down Expand Up @@ -60,10 +60,10 @@ cmake --build . --target EPR
```

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

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

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

### Download Eyes Protection Reminder

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

Choose one of two:

Expand Down
2 changes: 1 addition & 1 deletion docs/Usage_vi_VN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

### Tải Eyes Protection Reminder

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

Chọn một trong hai:

Expand Down
4 changes: 2 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2)

project(EPR VERSION 4.1.1)
project(EPR VERSION 4.1.2)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down Expand Up @@ -34,4 +34,4 @@ set(EPR_ICON ${CMAKE_SOURCE_DIR}/assets/EPR_icon.rc)
add_executable(${PROJECT_NAME} WIN32 ${EPR_SOURCES} ${EPR_ICON})
target_link_libraries(${PROJECT_NAME} PUBLIC wx::core wx::base)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Eyes_Protection_Reminder_v4.1.1.Windows.${EPR_ARCH})
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Eyes_Protection_Reminder_v4.1.2.Windows.${EPR_ARCH})
2 changes: 2 additions & 0 deletions source/include/UI/TaskBarIcon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ namespace EPR
void OnMenuSource(wxCommandEvent& _event);
void OnMenuExit(wxCommandEvent& _event);

void OnLeftButtonDClick(wxTaskBarIconEvent& _event);

protected:
wxMenu* CreatePopupMenu() override;

Expand Down
2 changes: 1 addition & 1 deletion source/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace EPR
SetAppName("Eyes Protection Reminder");

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

if (m_mainFrame == nullptr)
{
Expand Down
2 changes: 1 addition & 1 deletion source/src/UI/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace EPR

// Set the information for about dialog
_aboutInfo.SetName(wxTheApp->GetAppName());
_aboutInfo.SetVersion("- v4.1.1");
_aboutInfo.SetVersion("- v4.1.2");
_aboutInfo.SetIcon(s_EPR_icon_64);
_aboutInfo.SetCopyright("Copyright (c) 2022 " + wxString::FromUTF8("Minh Vương.") + "\nAll rights reserved.");
_aboutInfo.SetDescription("A small tool to remind you to\nprotect your eyes with the 20:20:20 rule.");
Expand Down
8 changes: 8 additions & 0 deletions source/src/UI/TaskBarIcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace EPR
EVT_MENU(EPR_Menu_Restore, TaskBarIcon::OnMenuRestore)
EVT_MENU(EPR_Menu_Source, TaskBarIcon::OnMenuSource)
EVT_MENU(EPR_Menu_Exit, TaskBarIcon::OnMenuExit)
EVT_TASKBAR_LEFT_DCLICK(TaskBarIcon::OnLeftButtonDClick)
wxEND_EVENT_TABLE()

TaskBarIcon::TaskBarIcon(wxWindow* _parent, wxTaskBarIconType _iconType) :
Expand Down Expand Up @@ -68,6 +69,13 @@ namespace EPR
_event.Skip();
}

void TaskBarIcon::OnLeftButtonDClick(wxTaskBarIconEvent& _event)
{
m_parent->Show();

_event.Skip();
}

wxMenu* TaskBarIcon::CreatePopupMenu()
{
wxMenu* _menu = new wxMenu();
Expand Down

0 comments on commit 884de2d

Please sign in to comment.