From 9a255691a9488cb64c4d01ab19d61e5984506651 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Tue, 19 Sep 2023 15:37:15 +0200 Subject: [PATCH] Update some deps for gtk4 --- meson.build | 11 ++--- src/MainWindow.vala | 16 ++++---- src/Services/Shortcuts.vala | 80 ++++++++++++++++++------------------- subprojects/live-chart | 2 +- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/meson.build b/meson.build index 2c47b0f3..40991789 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), lan add_project_arguments(['--vapidir', vapidir], language: 'vala') add_project_arguments(['-DWNCK_I_KNOW_THIS_IS_UNSTABLE', '-w'], language: 'c') +# add_project_arguments(['-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED'], language: 'c') livechart_proj = subproject('live-chart') @@ -24,16 +25,16 @@ livechart_proj = subproject('live-chart') # elementary_stylesheet = subproject('stylesheet') app_dependencies = [ - dependency('granite', version: '>= 5.2.0'), + dependency('granite-7'), dependency('glib-2.0'), - dependency('gtk+-3.0'), + dependency('gtk4'), dependency('gee-0.8'), dependency('gio-2.0'), dependency('gobject-2.0'), dependency('libgtop-2.0'), - dependency('libwnck-3.0'), - dependency('libhandy-1', version: '>=0.90.0'), - dependency('gdk-x11-3.0'), + dependency('libwnck-3.0', version: '>=40.1'), + dependency('libadwaita-1', version: '>=1.0.0'), + dependency('gtk4-x11'), dependency('x11'), dependency('udisks2'), dependency('json-glib-1.0'), diff --git a/src/MainWindow.vala b/src/MainWindow.vala index eba8a92b..2a09d7dc 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -7,8 +7,8 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow { // Widgets public Headerbar headerbar; - public ProcessView process_view; - public SystemView system_view; + // public ProcessView process_view; + // public SystemView system_view; public ContainerView container_view; private Gtk.Stack stack; @@ -30,14 +30,14 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow { resources = new Resources (); - process_view = new ProcessView (); - system_view = new SystemView (resources); + // process_view = new ProcessView (); + // system_view = new SystemView (resources); container_view = new ContainerView (); stack = new Gtk.Stack (); stack.set_transition_type (Gtk.StackTransitionType.SLIDE_LEFT_RIGHT); - stack.add_titled (process_view, "process_view", _("Processes")); - stack.add_titled (system_view, "system_view", _("System")); + // stack.add_titled (process_view, "process_view", _("Processes")); + // stack.add_titled (system_view, "system_view", _("System")); if (MonitorApp.settings.get_boolean ("containers-view-state")) { stack.add_titled (container_view, "container_view", _("Containers")); @@ -77,14 +77,14 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow { new Thread ("upd", () => { Timeout.add_seconds (MonitorApp.settings.get_int ("update-time"), () => { - process_view.update (); + // process_view.update (); container_view.update (); Idle.add (() => { - system_view.update (); + // system_view.update (); dbusserver.indicator_state (MonitorApp.settings.get_boolean ("indicator-state")); var res = resources.serialize (); statusbar.update (res); diff --git a/src/Services/Shortcuts.vala b/src/Services/Shortcuts.vala index 5abfb5c7..7e46f46c 100644 --- a/src/Services/Shortcuts.vala +++ b/src/Services/Shortcuts.vala @@ -15,47 +15,47 @@ public class Monitor.Shortcuts : Object { handled = true; } - if ((e.state & Gdk.ModifierType.CONTROL_MASK) != 0) { - switch (e.keyval) { - case Gdk.Key.f: - window.headerbar.search.activate_entry (); - handled = true; - break; - case Gdk.Key.e: - window.process_view.process_tree_view.end_process (); - handled = true; - break; - case Gdk.Key.k: - window.process_view.process_tree_view.kill_process (); - handled = true; - break; - case Gdk.Key.comma: - handled = true; - break; - case Gdk.Key.period: - handled = true; - break; - default: - break; - } - } + // if ((e.state & Gdk.ModifierType.CONTROL_MASK) != 0) { + // switch (e.keyval) { + // case Gdk.Key.f: + // window.headerbar.search.activate_entry (); + // handled = true; + // break; + // case Gdk.Key.e: + // // window.process_view.process_tree_view.end_process (); + // handled = true; + // break; + // case Gdk.Key.k: + // // window.process_view.process_tree_view.kill_process (); + // handled = true; + // break; + // case Gdk.Key.comma: + // handled = true; + // break; + // case Gdk.Key.period: + // handled = true; + // break; + // default: + // break; + // } + // } - switch (e.keyval) { - case Gdk.Key.Return: - window.process_view.process_tree_view.focus_on_first_row (); - handled = true; - break; - case Gdk.Key.Left: - window.process_view.process_tree_view.collapse (); - handled = true; - break; - case Gdk.Key.Right: - window.process_view.process_tree_view.expanded (); - handled = true; - break; - default: - break; - } + // switch (e.keyval) { + // case Gdk.Key.Return: + // // window.process_view.process_tree_view.focus_on_first_row (); + // handled = true; + // break; + // case Gdk.Key.Left: + // // window.process_view.process_tree_view.collapse (); + // handled = true; + // break; + // case Gdk.Key.Right: + // // window.process_view.process_tree_view.expanded (); + // handled = true; + // break; + // default: + // break; + // } return handled; } diff --git a/subprojects/live-chart b/subprojects/live-chart index 5f8ddce7..843efd30 160000 --- a/subprojects/live-chart +++ b/subprojects/live-chart @@ -1 +1 @@ -Subproject commit 5f8ddce715f6a9130955bc5f08437050265a317c +Subproject commit 843efd30f129e62b0251a2d89d2655eb948dcd44