diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/CMakeLists.txt | 2 | ||||
-rw-r--r-- | main/data/menu_app.ui | 4 | ||||
-rw-r--r-- | main/src/ui/application.vala | 16 |
3 files changed, 21 insertions, 1 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 2e9e6632..893137ee 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -169,7 +169,7 @@ OPTIONS ${MAIN_EXTRA_OPTIONS} ) -add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\") +add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\") add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c) add_dependencies(dino ${GETTEXT_PACKAGE}-translations) target_include_directories(dino PRIVATE src) diff --git a/main/data/menu_app.ui b/main/data/menu_app.ui index 20bd66b6..55eb9551 100644 --- a/main/data/menu_app.ui +++ b/main/data/menu_app.ui @@ -16,6 +16,10 @@ <attribute name="action">app.open_shortcuts</attribute> <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute> </item> + <item> + <attribute name="action">app.about</attribute> + <attribute name="label" translatable="yes">About Dino</attribute> + </item> </section> </menu> </interface> diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 0f932d18..42f4d6d5 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -80,6 +80,10 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { settings_action.activate.connect(show_settings_window); add_action(settings_action); + SimpleAction about_action = new SimpleAction("about", null); + about_action.activate.connect(show_about_window); + add_action(about_action); + SimpleAction quit_action = new SimpleAction("quit", null); quit_action.activate.connect(quit); add_action(quit_action); @@ -169,6 +173,18 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { dialog.present(); } + private void show_about_window() { + show_about_dialog(get_active_window(), + logo_icon_name: "im.dino.Dino", + program_name: "Dino", + version: Dino.VERSION.strip().length == 0 ? null : Dino.VERSION, + comments: "Dino. Communicating happiness.", + website: "https://dino.im/", + website_label: "dino.im", + copyright: "Copyright © 2016-2019 - Dino Team", + license_type: License.GPL_3_0); + } + private void show_join_muc_dialog(Account? account, Jid jid) { Dialog dialog = new Dialog.with_buttons(_("Join Channel"), window, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, _("Join"), ResponseType.OK, _("Cancel"), ResponseType.CANCEL); dialog.modal = true; |