diff --git a/src/DeviceIndicator.vala b/src/DeviceIndicator.vala index 70e7743..5cd97fb 100644 --- a/src/DeviceIndicator.vala +++ b/src/DeviceIndicator.vala @@ -232,20 +232,20 @@ namespace KDEConnectIndicator { if (device.is_reachable) { if (device.is_trusted) { status_item.label = _("Device Reachable and Trusted"); - InOut.write_status (device.id, device.name); + KDEConnectIndicator.InOut.write_status (device.id, device.name); } else { status_item.label = _("Device Reachable but Not Trusted"); - InOut.delete_status (device.id, device.name); + KDEConnectIndicator.InOut.delete_status (device.id, device.name); } } else { if (device.is_trusted) { status_item.label = _("Device Trusted but not Reachable"); - InOut.delete_status (device.id, device.name); + KDEConnectIndicator.InOut.delete_status (device.id, device.name); } else { status_item.label = _("Device Not Reachable and Not Trusted"); - InOut.delete_status (device.id, device.name); + KDEConnectIndicator.InOut.delete_status (device.id, device.name); // is this even posible? } } diff --git a/src/KDEConnectManager.vala b/src/KDEConnectManager.vala index b54d086..640d614 100644 --- a/src/KDEConnectManager.vala +++ b/src/KDEConnectManager.vala @@ -8,7 +8,7 @@ namespace KDEConnectIndicator { private DBusConnection conn; private SList device_list; private SList subs_identifier; - private string visible_devices = "/tmp/devices"; + //private string visible_devices = "/tmp/devices"; public KDEConnectManager () { try { @@ -33,7 +33,7 @@ namespace KDEConnectIndicator { message ("KDE Connect daemon found"); - var file = File.new_for_path (visible_devices); + var file = File.new_for_path (KDEConnectIndicator.InOut.visible_devices); try { if (!file.query_exists ()) @@ -122,7 +122,7 @@ namespace KDEConnectIndicator { conn.signal_unsubscribe (i); try { - var file = File.new_for_path (visible_devices); + var file = File.new_for_path (KDEConnectIndicator.InOut.visible_devices); if (file.query_exists ()) file.delete (); } catch (Error e) { @@ -157,8 +157,6 @@ namespace KDEConnectIndicator { var kdeconnect_path = GLib.Environment.get_system_config_dirs()[0]+ "/autostart/kdeconnectd.desktop"; - - string std_out; try{ diff --git a/src/settings/InOut.vala b/src/settings/InOut.vala index d0650ec..89594a3 100644 --- a/src/settings/InOut.vala +++ b/src/settings/InOut.vala @@ -6,10 +6,10 @@ namespace KDEConnectIndicator { class InOut{ - private static string visible_devices = "/tmp/devices"; + public static unowned string visible_devices = "/tmp/devices"; public static int write_status (string id, string name) { - var file = File.new_for_path (visible_devices); + var file = File.new_for_path (InOut.visible_devices); if (!file.query_exists ()) { message ("File '%s' doesn't exist.\n", file.get_path ()); @@ -65,7 +65,7 @@ namespace KDEConnectIndicator { } public static int delete_status (string id, string name) { - var file = File.new_for_path (visible_devices); + var file = File.new_for_path (InOut.visible_devices); if (!file.query_exists ()) { message ("File '%s' doesn't exist.\n", file.get_path ());