Skip to content

Commit

Permalink
Merge pull request #484 from iptux-src/lidaobing/issue482
Browse files Browse the repository at this point in the history
#482: add what's new in the menu
  • Loading branch information
lidaobing authored Oct 8, 2021
2 parents 96302de + 6eb9cff commit c3bef18
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 163 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [0.8.4] (2021-??-??)

* [#482](https://github.com/iptux-src/iptux/issues/482) add "What's New" in the menu.

# [0.8.3] (2021-10-07)

* [#476] open chat when clicking the new message notification (only works under Linux).
Expand Down
5 changes: 5 additions & 0 deletions src/iptux/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ void onReportBug() {
iptux_open_url("https://github.com/iptux-src/iptux/issues/new");
}

void onWhatsNew() {
iptux_open_url("https://github.com/iptux-src/iptux/blob/master/NEWS.md");
}

void iptux_init(LogSystem* logSystem) {
signal(SIGPIPE, SIG_IGN);
logSystem->systemLog("%s", _("Loading the process successfully!"));
Expand Down Expand Up @@ -132,6 +136,7 @@ void Application::onStartup(Application& self) {
makeActionEntry("quit", G_ACTION_CALLBACK(onQuit)),
makeActionEntry("preferences", G_ACTION_CALLBACK(onPreferences)),
makeActionEntry("help.report_bug", G_ACTION_CALLBACK(onReportBug)),
makeActionEntry("help.whats_new", G_ACTION_CALLBACK(onWhatsNew)),
makeActionEntry("tools.transmission",
G_ACTION_CALLBACK(onToolsTransmission)),
makeActionEntry("tools.shared_management",
Expand Down
330 changes: 167 additions & 163 deletions src/iptux/resources/gtk/menus.ui
Original file line number Diff line number Diff line change
@@ -1,174 +1,178 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="appmenu">
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
<menu id='menubar'>
<submenu>
<attribute name='label' translatable='yes'>_File</attribute>
<item>
<attribute name='label' translatable='yes'>_Detect</attribute>
<attribute name='action'>win.detect</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Find</attribute>
<attribute name='action'>win.find</attribute>
</item>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_View</attribute>
<section>
<submenu>
<attribute name='label' translatable='yes'>Sort</attribute>
<section>
<item>
<attribute name='label' translatable='yes'>By Nickname</attribute>
<attribute name='action'>win.sort_by</attribute>
<attribute name='target'>nickname</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>By IP</attribute>
<attribute name='action'>win.sort_by</attribute>
<attribute name='target'>ip</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>Ascending</attribute>
<attribute name='action'>win.sort_type</attribute>
<attribute name='target'>ascending</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>Descending</attribute>
<attribute name='action'>win.sort_type</attribute>
<attribute name='target'>descending</attribute>
</item>
</section>
</submenu>
<item>
<attribute name='label' translatable='yes'>_Refresh</attribute>
<attribute name='action'>win.refresh</attribute>
<attribute name='icon'>view-refresh-symbolic</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_Chat</attribute>
<section>
<item>
<attribute name='label' translatable='yes'>Insert Picture</attribute>
<attribute name='action'>win.insert_picture</attribute>
<attribute name='icon'>insert-image-symbolic</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Attach File</attribute>
<attribute name="action">win.attach_file</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Attach Folder</attribute>
<attribute name="action">win.attach_folder</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Request Shared Resources</attribute>
<attribute name="action">win.request_shared_resources</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>Clear Chat History</attribute>
<attribute name='action'>win.clear_chat_history</attribute>
<attribute name='icon'>edit-clear-all-symbolic</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Send Message</attribute>
<attribute name="action">win.send_message</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Close Chat</attribute>
<attribute name="action">win.close</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_Window</attribute>
<section>
<item>
<attribute name="label" translatable="yes">_Transmission</attribute>
<attribute name="action">app.tools.transmission</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Shared Management</attribute>
<attribute name='action'>app.tools.shared_management</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Chat Log</attribute>
<attribute name="action">app.tools.open_chat_log</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_System Log</attribute>
<attribute name='action'>app.tools.open_system_log</attribute>
</item>
</section>
</submenu>
<menu id="appmenu">
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
<menu id='menubar'>
<submenu>
<attribute name='label' translatable='yes'>_File</attribute>
<item>
<attribute name='label' translatable='yes'>_Detect</attribute>
<attribute name='action'>win.detect</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Find</attribute>
<attribute name='action'>win.find</attribute>
</item>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_View</attribute>
<section>
<submenu>
<attribute name='label' translatable='yes'>_Help</attribute>
<section>
<item>
<attribute name="label" translatable="yes">_About</attribute>
<attribute name="action">app.about</attribute>
</item>
<attribute name='label' translatable='yes'>Sort</attribute>
<section>
<item>
<attribute name="label" translatable="yes">Report Bug</attribute>
<attribute name="action">app.help.report_bug</attribute>
<attribute name='label' translatable='yes'>By Nickname</attribute>
<attribute name='action'>win.sort_by</attribute>
<attribute name='target'>nickname</attribute>
</item>
</section>
</submenu>
</menu>
<menu id="trans-popup">
<section>
<item>
<attribute name="label" translatable="yes">Open This File</attribute>
<attribute name="action">win.trans.open_file</attribute>
<attribute name='label' translatable='yes'>By IP</attribute>
<attribute name='action'>win.sort_by</attribute>
<attribute name='target'>ip</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Open Containing Folder</attribute>
<attribute name="action">win.trans.open_folder</attribute>
<attribute name='label' translatable='yes'>Ascending</attribute>
<attribute name='action'>win.sort_type</attribute>
<attribute name='target'>ascending</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Terminate Task</attribute>
<attribute name="action">win.trans.terminate_task</attribute>
<attribute name='label' translatable='yes'>Descending</attribute>
<attribute name='action'>win.sort_type</attribute>
<attribute name='target'>descending</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Terminate All</attribute>
<attribute name="action">win.trans.terminate_all</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Clear Tasklist</attribute>
<attribute name="action">app.trans_model.clear</attribute>
</item>
</section>
</menu>
<menu id="peer-recv-popup">
<section>
<item>
<attribute name="label" translatable="yes">Refuse</attribute>
<attribute name="action">win.refuse</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Refuse All</attribute>
<attribute name="action">win.refuse_all</attribute>
</item>
</section>
</menu>
</section>
</submenu>
<item>
<attribute name='label' translatable='yes'>_Refresh</attribute>
<attribute name='action'>win.refresh</attribute>
<attribute name='icon'>view-refresh-symbolic</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_Chat</attribute>
<section>
<item>
<attribute name='label' translatable='yes'>Insert Picture</attribute>
<attribute name='action'>win.insert_picture</attribute>
<attribute name='icon'>insert-image-symbolic</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Attach File</attribute>
<attribute name="action">win.attach_file</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Attach Folder</attribute>
<attribute name="action">win.attach_folder</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Request Shared Resources</attribute>
<attribute name="action">win.request_shared_resources</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>Clear Chat History</attribute>
<attribute name='action'>win.clear_chat_history</attribute>
<attribute name='icon'>edit-clear-all-symbolic</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Send Message</attribute>
<attribute name="action">win.send_message</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Close Chat</attribute>
<attribute name="action">win.close</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_Window</attribute>
<section>
<item>
<attribute name="label" translatable="yes">_Transmission</attribute>
<attribute name="action">app.tools.transmission</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Shared Management</attribute>
<attribute name='action'>app.tools.shared_management</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Chat Log</attribute>
<attribute name="action">app.tools.open_chat_log</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_System Log</attribute>
<attribute name='action'>app.tools.open_system_log</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name='label' translatable='yes'>_Help</attribute>
<section>
<item>
<attribute name="label" translatable="yes">_About</attribute>
<attribute name="action">app.about</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Report Bug</attribute>
<attribute name="action">app.help.report_bug</attribute>
</item>
<item>
<attribute name="label" translatable="yes">What's New</attribute>
<attribute name="action">app.help.whats_new</attribute>
</item>
</section>
</submenu>
</menu>
<menu id="trans-popup">
<section>
<item>
<attribute name="label" translatable="yes">Open This File</attribute>
<attribute name="action">win.trans.open_file</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Open Containing Folder</attribute>
<attribute name="action">win.trans.open_folder</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Terminate Task</attribute>
<attribute name="action">win.trans.terminate_task</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Terminate All</attribute>
<attribute name="action">win.trans.terminate_all</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Clear Tasklist</attribute>
<attribute name="action">app.trans_model.clear</attribute>
</item>
</section>
</menu>
<menu id="peer-recv-popup">
<section>
<item>
<attribute name="label" translatable="yes">Refuse</attribute>
<attribute name="action">win.refuse</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Refuse All</attribute>
<attribute name="action">win.refuse_all</attribute>
</item>
</section>
</menu>
</interface>

0 comments on commit c3bef18

Please sign in to comment.