diff options
author | fiaxh <git@lightrise.org> | 2022-02-14 14:55:59 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-07-27 20:34:20 +0200 |
commit | 7e7dcedaf31ee35499875491c9f569c575d28435 (patch) | |
tree | 0c5fee2b28baf320775fbc92b3c252e97d9d054f /main/src/ui/application.vala | |
parent | f25bfb00969a7e09996da2d5500e6718f4cc0148 (diff) | |
download | dino-7e7dcedaf31ee35499875491c9f569c575d28435.tar.gz dino-7e7dcedaf31ee35499875491c9f569c575d28435.zip |
Port from GTK3 to GTK4
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r-- | main/src/ui/application.vala | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 6c02087f..f83e403b 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -35,7 +35,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { CssProvider provider = new CssProvider(); provider.load_from_resource("/im/dino/Dino/theme.css"); - StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider, STYLE_PROVIDER_PRIORITY_APPLICATION); + StyleContext.add_provider_for_display(Gdk.Display.get_default(), provider, STYLE_PROVIDER_PRIORITY_APPLICATION); create_actions(); add_main_option_entries(options); @@ -68,7 +68,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { var desktop_env = Environment.get_variable("XDG_CURRENT_DESKTOP"); if (desktop_env == null || !desktop_env.down().contains("gnome")) { if (this.active_window != null) { - this.active_window.urgency_hint = true; +// this.active_window.urgency_hint = true; } } }); @@ -80,7 +80,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { config = new Config(db); window = new MainWindow(this, stream_interactor, db, config); controller.set_window(window); - if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) window.delete_event.connect(window.hide_on_delete); + if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) window.hide_on_close = true; } window.present(); }); @@ -205,9 +205,9 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { if (!use_csd()) { // Hack to prevent CRITICAL in Gtk when trying to destroy non-existant headerbar Widget shortcuts_hack = dialog.get_titlebar(); - dialog.destroy.connect_after(() => { - shortcuts_hack = null; - }); +// dialog.destroy.connect_after(() => { +// shortcuts_hack = null; +// }); dialog.set_titlebar(null); } dialog.title = _("Keyboard Shortcuts"); @@ -292,11 +292,11 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { dialog.copyright = "Copyright © 2016-2022 - Dino Team"; dialog.license_type = License.GPL_3_0; - dialog.response.connect((response_id) => { - if (response_id == Gtk.ResponseType.CANCEL || response_id == Gtk.ResponseType.DELETE_EVENT) { - dialog.destroy(); - } - }); +// dialog.response.connect((response_id) => { +// if (response_id == Gtk.ResponseType.CANCEL || response_id == Gtk.ResponseType.DELETE_EVENT) { +// dialog.destroy(); +// } +// }); if (!use_csd()) { dialog.set_titlebar(null); @@ -315,7 +315,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { conference_fragment.account = account; } Box content_area = dialog.get_content_area(); - content_area.add(conference_fragment); + content_area.append(conference_fragment); conference_fragment.joined.connect(() => { dialog.destroy(); }); |