forked from brl/citadel
Remove Nautilus, Gnome Usage, and Tracker!
This commit is contained in:
parent
3ca4a68dcd
commit
a29cd95568
@ -1,184 +0,0 @@
|
|||||||
From ab11e8e689c29ecff810dc339b5119b69626306f Mon Sep 17 00:00:00 2001
|
|
||||||
From: David McKinney <mckinney@subgraph.com>
|
|
||||||
Date: Tue, 31 Jul 2018 10:50:29 -0400
|
|
||||||
Subject: [PATCH] Added machine tags for processes running in nspawn containers
|
|
||||||
|
|
||||||
---
|
|
||||||
data/interface/adwaita.css | 5 ++++
|
|
||||||
data/ui/process-row.ui | 23 ++++++++++++++++-
|
|
||||||
src/process-row.vala | 53 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
src/utils.vala | 5 ++++
|
|
||||||
4 files changed, 85 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/data/interface/adwaita.css b/data/interface/adwaita.css
|
|
||||||
index 2bd261c..55d1856 100644
|
|
||||||
--- a/data/interface/adwaita.css
|
|
||||||
+++ b/data/interface/adwaita.css
|
|
||||||
@@ -173,3 +173,8 @@ box.storage {
|
|
||||||
.tag.tag-user {
|
|
||||||
background: alpha(@theme_fg_color, 0.4);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+.tag.tag-machine {
|
|
||||||
+ background-color: blue;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
diff --git a/data/ui/process-row.ui b/data/ui/process-row.ui
|
|
||||||
index ab19f7c..48fdf8c 100644
|
|
||||||
--- a/data/ui/process-row.ui
|
|
||||||
+++ b/data/ui/process-row.ui
|
|
||||||
@@ -57,6 +57,27 @@
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkBox" id="machine_tag_box">
|
|
||||||
+ <property name="visible">False</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="margin_right">10</property>
|
|
||||||
+ <style>
|
|
||||||
+ <class name="tag"/>
|
|
||||||
+ </style>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="machine_tag_label">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="expand">False</property>
|
|
||||||
+ <property name="fill">True</property>
|
|
||||||
+ <property name="pack_type">end</property>
|
|
||||||
+ <property name="position">3</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="user_tag_box">
|
|
||||||
<property name="visible">False</property>
|
|
||||||
@@ -75,7 +96,7 @@
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="pack_type">end</property>
|
|
||||||
- <property name="position">3</property>
|
|
||||||
+ <property name="position">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
diff --git a/src/process-row.vala b/src/process-row.vala
|
|
||||||
index f657c12..2bbf583 100644
|
|
||||||
--- a/src/process-row.vala
|
|
||||||
+++ b/src/process-row.vala
|
|
||||||
@@ -37,11 +37,19 @@ namespace Usage
|
|
||||||
[GtkChild]
|
|
||||||
private Gtk.Label user_tag_label;
|
|
||||||
|
|
||||||
+ [GtkChild]
|
|
||||||
+ private Gtk.Box machine_tag_box;
|
|
||||||
+
|
|
||||||
+ [GtkChild]
|
|
||||||
+ private Gtk.Label machine_tag_label;
|
|
||||||
+
|
|
||||||
[GtkChild]
|
|
||||||
private Gtk.Label load_label;
|
|
||||||
|
|
||||||
private Fdo.AccountsUser user;
|
|
||||||
|
|
||||||
+ private string machine_name;
|
|
||||||
+
|
|
||||||
public Process process { get; private set; }
|
|
||||||
public bool max_usage { get; private set; }
|
|
||||||
public bool group {
|
|
||||||
@@ -56,6 +64,10 @@ namespace Usage
|
|
||||||
private const string CSS_TAG_USER = "tag-user";
|
|
||||||
private const string CSS_TAG_ROOT = "tag-root";
|
|
||||||
private const string CSS_TAG_SYSTEM = "tag-system";
|
|
||||||
+ private const string CSS_TAG_MACHINE = "tag-machine";
|
|
||||||
+
|
|
||||||
+ private const int DBUS_ERROR_SERVICE_UNKNOWN = 2;
|
|
||||||
+ private const int BUS_ERROR_NO_MACHINE_FOR_PID = 36;
|
|
||||||
|
|
||||||
public ProcessRow(Process process, ProcessListBoxType type, bool opened = false)
|
|
||||||
{
|
|
||||||
@@ -66,6 +78,7 @@ namespace Usage
|
|
||||||
update();
|
|
||||||
|
|
||||||
load_user_account();
|
|
||||||
+ load_machine_name();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void load_user_account() {
|
|
||||||
@@ -94,10 +107,29 @@ namespace Usage
|
|
||||||
icon.gicon = app_icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ private async void load_machine_name() {
|
|
||||||
+ try {
|
|
||||||
+ Fdo.Machine1 machine = yield Bus.get_proxy (BusType.SYSTEM,
|
|
||||||
+ "org.freedesktop.machine1",
|
|
||||||
+ "/org/freedesktop/machine1");
|
|
||||||
+ var machine_path = yield machine.GetMachineByPID ((uint32)process.pid);
|
|
||||||
+ var machine_items = machine_path.split("/");
|
|
||||||
+ if (machine_items.length > 0)
|
|
||||||
+ this.machine_name = machine_items[machine_items.length - 1];
|
|
||||||
+ update_machine_tag();
|
|
||||||
+ } catch (Error e) {
|
|
||||||
+ if (e.code == BUS_ERROR_NO_MACHINE_FOR_PID)
|
|
||||||
+ debug ("No PID for machine: %s", e.message);
|
|
||||||
+ else
|
|
||||||
+ warning ("Unable to obtain machine name: %s", e.message);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
private void update()
|
|
||||||
{
|
|
||||||
update_load_label();
|
|
||||||
update_user_tag();
|
|
||||||
+ update_machine_tag();
|
|
||||||
check_max_usage();
|
|
||||||
set_styles();
|
|
||||||
|
|
||||||
@@ -161,6 +193,27 @@ namespace Usage
|
|
||||||
user_tag_label.label = user.UserName;
|
|
||||||
user_tag_box.visible = !is_logged_in();
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ private void update_machine_tag()
|
|
||||||
+ {
|
|
||||||
+ if (machine_name == null)
|
|
||||||
+ return;
|
|
||||||
+ remove_machine_tag();
|
|
||||||
+ create_machine_tag();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ private void remove_machine_tag()
|
|
||||||
+ {
|
|
||||||
+ machine_tag_box.visible = false;
|
|
||||||
+ machine_tag_box.get_style_context().remove_class(CSS_TAG_MACHINE);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ private void create_machine_tag()
|
|
||||||
+ {
|
|
||||||
+ machine_tag_box.get_style_context().add_class(CSS_TAG_MACHINE);
|
|
||||||
+ machine_tag_label.label = machine_name;
|
|
||||||
+ machine_tag_box.visible = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
private bool is_logged_in(){
|
|
||||||
return user.UserName == GLib.Environment.get_user_name();
|
|
||||||
diff --git a/src/utils.vala b/src/utils.vala
|
|
||||||
index 21c0f83..2f96a35 100644
|
|
||||||
--- a/src/utils.vala
|
|
||||||
+++ b/src/utils.vala
|
|
||||||
@@ -100,4 +100,9 @@ namespace Usage
|
|
||||||
public abstract string UserName { owned get; }
|
|
||||||
public abstract uint64 Uid { get; }
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ [DBus (name = "org.freedesktop.machine1.Manager")]
|
|
||||||
+ public interface Fdo.Machine1 : Object {
|
|
||||||
+ public abstract async string GetMachineByPID (uint32 id) throws IOError;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.18.0
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
SUMMARY = "GNOME Usage"
|
|
||||||
LICENSE = "GPLv2 & LGPLv2.1"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504"
|
|
||||||
|
|
||||||
GNOMEBASEBUILDCLASS = "meson"
|
|
||||||
inherit gnomebase gobject-introspection gettext vala
|
|
||||||
|
|
||||||
WARN_QA_remove = "unknown-configure-option"
|
|
||||||
|
|
||||||
#SRC_URI += "file://0001-Added-machine-tags.patch"
|
|
||||||
|
|
||||||
DEPENDS = "glib-2.0 glib-2.0-native gtk+3 gobject-introspection libgtop libdazzle libhandy tracker"
|
|
||||||
SRC_URI[archive.md5sum] = "a331e1b6d8f588c02440be1972097c62"
|
|
||||||
SRC_URI[archive.sha256sum] = "94d58202fd92094ee2a2647ea3f96d0b16b5f5d7f9bf5ae99f1c33117d1a1a57"
|
|
||||||
|
|
||||||
|
|
||||||
FILES_${PN} += "${datadir}/metainfo"
|
|
||||||
|
|
||||||
EXTRA_OEMESON = "--buildtype=release -Denable-introspection=true"
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
SUMMARY = "GNOME file manager"
|
|
||||||
HOMEPAGE = "https://wiki.gnome.org/action/show/Apps/Files"
|
|
||||||
|
|
||||||
LICENSE = "GPLv3 & LGPLv2.1"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \
|
|
||||||
file://libnautilus-extension/LICENSE;md5=321bf41f280cf805086dd5a720b37785"
|
|
||||||
|
|
||||||
GNOMEBASEBUILDCLASS = "meson"
|
|
||||||
inherit gnomebase gobject-introspection gettext mime-xdg
|
|
||||||
|
|
||||||
SRC_URI[archive.md5sum] = "d635012bc7d2b699e2bda950d0ea705a"
|
|
||||||
SRC_URI[archive.sha256sum] = "0a3e812b13b774b7fd6f222f55acd1f87fb2973d9af60c04b7d25cb52222d0fd"
|
|
||||||
|
|
||||||
FILES_${PN} += "\
|
|
||||||
${datadir}/glib-2.0/schemas \
|
|
||||||
${datadir}/gnome-shell/search-providers \
|
|
||||||
${datadir}/metainfo/org.gnome.Nautilus.appdata.xml \
|
|
||||||
${datadir}/tracker3 \
|
|
||||||
${datadir}/icons/hicolor/ \
|
|
||||||
${datadir}/dbus-1/services \
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPENDS += "gtk+3 glib-2.0 pango gnome-autoar libxml2 gnome-desktop tracker gexiv2"
|
|
||||||
|
|
||||||
EXTRA_OEMESON = "-Dselinux=false -Dpackagekit=false -Dextensions=false -Dintrospection=true -Dtests=none"
|
|
||||||
|
|
||||||
do_install_append () {
|
|
||||||
rm ${D}${datadir}/applications/nautilus-autorun-software.desktop
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
SUMMARY = "Desktop search engine and metadata storage system"
|
|
||||||
HOMEPAGE = "https://wiki.gnome.org/Projects/Tracker"
|
|
||||||
LICENSE = "GPLv2 & LGPLv2.1"
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=506ab4920510c723c01689e212f41404 \
|
|
||||||
file://COPYING.GPL;md5=ee31012bf90e7b8c108c69f197f3e3a4 \
|
|
||||||
file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
|
|
||||||
file://src/libtracker-common/COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
|
|
||||||
file://src/libtracker-data/COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
|
|
||||||
file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
|
|
||||||
|
|
||||||
GNOMEBASEBUILDCLASS = "meson"
|
|
||||||
inherit gettext pkgconfig python3native gnomebase vala gobject-introspection
|
|
||||||
SRC_URI[archive.md5sum] = "173668f5d1a890a494d681457ac7029b"
|
|
||||||
SRC_URI[archive.sha256sum] = "39a3a326f4708a65f3f48771465b93097d25d697069e41e1b947bdaecad10ce6"
|
|
||||||
|
|
||||||
WARN_QA_remove = "unknown-configure-option"
|
|
||||||
|
|
||||||
DEPENDS = "intltool-native libunistring sqlite3 dbus upower networkmanager bash-completion glib-2.0-native libsoup-2.4 libxml2 json-glib"
|
|
||||||
|
|
||||||
# Insert a line into meson.cross under [properties] header:
|
|
||||||
#
|
|
||||||
# [properties]
|
|
||||||
# sqlite3_has_fts5 = 'true'
|
|
||||||
#
|
|
||||||
# Fixes this:
|
|
||||||
#
|
|
||||||
# ../tracker-3.0.1/meson.build:99:2: ERROR: Unknown cross property: sqlite3_has_fts5.
|
|
||||||
#
|
|
||||||
|
|
||||||
do_write_config_append() {
|
|
||||||
sed -i -e "/^\[properties\]/a sqlite3_has_fts5 = 'true'" ${WORKDIR}/meson.cross
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES_${PN} += "\
|
|
||||||
${libdir}/systemd/user/tracker-store.service \
|
|
||||||
${libdir}/systemd/user \
|
|
||||||
${datadir}/glib-2.0/schemas \
|
|
||||||
${datadir}/bash-completion/completions \
|
|
||||||
${datadir}/dbus-1/services \
|
|
||||||
${datadir}/tracker3 \
|
|
||||||
"
|
|
||||||
|
|
||||||
FILES_${PN}-dev += "\
|
|
||||||
${datadir}/vala/vapi \
|
|
||||||
"
|
|
||||||
#FILES_${PN}-staticdev += "\
|
|
||||||
# ${libdir}/tracker-2.0/libtracker-data.a \
|
|
||||||
# ${libdir}/tracker-2.0/libtracker-common.a \
|
|
||||||
#"
|
|
||||||
INSANE_SKIP_${PN} += "dev-so"
|
|
||||||
|
|
||||||
EXTRA_OEMESON = "\
|
|
||||||
-Ddocs=false \
|
|
||||||
-Dman=false \
|
|
||||||
-Dnetwork_manager=disabled \
|
|
||||||
-Dbash_completion=false \
|
|
||||||
-Dtest_utils=false \
|
|
||||||
"
|
|
@ -1,2 +0,0 @@
|
|||||||
# for tracker
|
|
||||||
EXTRA_OECONF_append_class-target = " --enable-fts5"
|
|
Loading…
Reference in New Issue
Block a user