From bd45fdf1e16e7d4ff49e1472ee30f269867f531e Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 17 Dec 2019 23:52:05 +0100 Subject: Add version and adjust some cmake --- main/src/ui/application.vala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'main/src') 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; -- cgit v1.2.3-70-g09d2