Skip to content

Commit

Permalink
Update some deps for gtk4
Browse files Browse the repository at this point in the history
  • Loading branch information
stsdc committed Sep 19, 2023
1 parent fd369e0 commit 9a25569
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 54 deletions.
11 changes: 6 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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'),
Expand Down
16 changes: 8 additions & 8 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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"));
Expand Down Expand Up @@ -77,14 +77,14 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow {

new Thread<void> ("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);
Expand Down
80 changes: 40 additions & 40 deletions src/Services/Shortcuts.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion subprojects/live-chart
Submodule live-chart updated 69 files
+4 −3 .github/workflows/main.yml
+1 −1 Makefile
+8 −8 NEWS.md
+98 −19 README.md
+1 −1 builder/configuration.vala
+5 −6 builder/datasource.vala
+4 −4 builder/main.vala
+23 −20 examples/configure-labels.vala
+18 −14 examples/fixed-max.vala
+14 −12 examples/hide-parts.vala
+123 −0 examples/live-chart-usec.vala
+58 −24 examples/live-chart.vala
+3 −1 examples/meson.build
+148 −0 examples/remove-serie.vala
+114 −0 examples/replace-chart.vala
+30 −14 examples/static-chart.vala
+23 −19 examples/static-renderer.vala
+1 −1 meson.build
+1 −2 src/area.vala
+6 −4 src/axis.vala
+5 −5 src/background.vala
+100 −0 src/bezier.vala
+43 −21 src/chart.vala
+5 −3 src/config.vala
+2 −0 src/drawable.vala
+1 −1 src/font.vala
+41 −0 src/geometry.vala
+16 −8 src/grid.vala
+79 −0 src/intersections.vala
+46 −0 src/intersectors.vala
+13 −5 src/legend.vala
+3 −1 src/line.vala
+1 −0 src/line_area.vala
+6 −0 src/meson.build
+1 −1 src/path.vala
+5 −4 src/points.vala
+147 −0 src/region.vala
+2 −1 src/serie_renderer.vala
+33 −4 src/series.vala
+46 −8 src/smooth_line.vala
+35 −6 src/smooth_line_area.vala
+14 −8 src/static/static_chart.vala
+4 −4 src/static/static_grid.vala
+62 −0 src/time_seek.vala
+0 −1 src/values.vala
+6 −25 tests/area.vala
+75 −14 tests/axis.vala
+10 −49 tests/background.vala
+18 −37 tests/bar.vala
+1 −2 tests/bounds.vala
+0 −170 tests/cairo.vala
+39 −10 tests/chart.vala
+3 −3 tests/config.vala
+197 −0 tests/fakes.vala
+1 −1 tests/grid.vala
+42 −0 tests/intersectors.vala
+2 −2 tests/legend.vala
+2 −2 tests/line.vala
+29 −85 tests/line_area.vala
+9 −8 tests/max_bound_line.vala
+3 −1 tests/meson.build
+9 −8 tests/min_bound_line.vala
+1 −1 tests/points.vala
+363 −0 tests/region.vala
+4 −3 tests/runner.vala
+57 −0 tests/series.vala
+56 −25 tests/smooth_line.vala
+68 −25 tests/smooth_line_area.vala
+3 −2 tests/threshold_line.vala

0 comments on commit 9a25569

Please sign in to comment.