Commit 94f0a435 authored by Erik Reider's avatar Erik Reider

Removed all unnecessary GLib namespace prefixes

parent 3bed6d4f
......@@ -5,7 +5,7 @@ public struct SwayncDaemonData {
}
[DBus (name = "org.erikreider.swaync.cc")]
interface CcDaemon : GLib.Object {
interface CcDaemon : Object {
public abstract bool reload_css () throws Error;
......@@ -171,7 +171,7 @@ public int command_line (string[] args) {
Bus.watch_name (
BusType.SESSION,
"org.erikreider.swaync.cc",
GLib.BusNameWatcherFlags.NONE,
BusNameWatcherFlags.NONE,
print_subscribe,
print_subscribe);
loop.run ();
......@@ -183,7 +183,7 @@ public int command_line (string[] args) {
Bus.watch_name (
BusType.SESSION,
"org.erikreider.swaync.cc",
GLib.BusNameWatcherFlags.NONE,
BusNameWatcherFlags.NONE,
print_subscribe_waybar,
print_subscribe_waybar);
loop.run ();
......@@ -228,7 +228,7 @@ public int main (string[] args) {
Bus.watch_name (
BusType.SESSION,
"org.erikreider.swaync.cc",
GLib.BusNameWatcherFlags.NONE,
BusNameWatcherFlags.NONE,
(conn, name, name_owner) => {
if (try_connect (args) == 0) loop.quit ();
},
......
......@@ -90,7 +90,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
[DBus (name = "org.freedesktop.DBus")]
public interface DBusInterface : Object {
public abstract string[] list_names () throws GLib.Error;
public abstract string[] list_names () throws Error;
public signal void name_owner_changed (string name,
string old_owner,
string new_owner);
......
......@@ -280,7 +280,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
}
}
// Get the app icon
GLib.Icon ? icon = null;
Icon ? icon = null;
if (desktop_entry is DesktopAppInfo) {
icon = desktop_entry.get_icon ();
}
......
......@@ -105,11 +105,11 @@ namespace SwayNotificationCenter {
}
if (!only_system) {
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
GLib.Environment.get_user_config_dir (),
Environment.get_user_config_dir (),
"swaync/style.css");
}
foreach (var path in GLib.Environment.get_system_config_dirs ()) {
foreach (var path in Environment.get_system_config_dirs ()) {
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
path, "swaync/style.css");
}
......@@ -139,9 +139,9 @@ namespace SwayNotificationCenter {
paths += custom_path;
}
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
GLib.Environment.get_user_config_dir (),
Environment.get_user_config_dir (),
"swaync/config.json");
foreach (var path in GLib.Environment.get_system_config_dirs ()) {
foreach (var path in Environment.get_system_config_dirs ()) {
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
path, "swaync/config.json");
}
......@@ -167,7 +167,7 @@ namespace SwayNotificationCenter {
string img = all[1];
// Replaces "~/" with $HOME
if (img.index_of ("~/", 0) == 0) {
img = GLib.Environment.get_home_dir () +
img = Environment.get_home_dir () +
img.slice (1, img.length);
}
return img;
......
......@@ -128,7 +128,7 @@ namespace SwayNotificationCenter {
this.body = body;
this.hints = hints;
this.expire_timeout = expire_timeout;
this.time = (int64) (GLib.get_real_time () * 0.000001);
this.time = (int64) (get_real_time () * 0.000001);
this.replaces = false;
this.has_synch = false;
......@@ -161,12 +161,12 @@ namespace SwayNotificationCenter {
Variant hint_value = hints[hint];
switch (hint) {
case "SWAYNC_NO_SCRIPT":
if (hint_value.is_of_type (GLib.VariantType.BOOLEAN)) {
if (hint_value.is_of_type (VariantType.BOOLEAN)) {
swaync_no_script = hint_value.get_boolean ();
}
break;
case "value":
if (hint_value.is_of_type (GLib.VariantType.INT32)) {
if (hint_value.is_of_type (VariantType.INT32)) {
this.has_synch = true;
value = hint_value.get_int32 ();
}
......@@ -174,12 +174,12 @@ namespace SwayNotificationCenter {
case "synchronous":
case "private-synchronous":
case "x-canonical-private-synchronous":
if (hint_value.is_of_type (GLib.VariantType.STRING)) {
if (hint_value.is_of_type (VariantType.STRING)) {
synchronous = hint_value.get_string ();
}
break;
case "action-icons":
if (hint_value.is_of_type (GLib.VariantType.BOOLEAN)) {
if (hint_value.is_of_type (VariantType.BOOLEAN)) {
action_icons = hint_value.get_boolean ();
}
break;
......@@ -208,34 +208,34 @@ namespace SwayNotificationCenter {
break;
case "image-path":
case "image_path":
if (hint_value.is_of_type (GLib.VariantType.STRING)) {
if (hint_value.is_of_type (VariantType.STRING)) {
image_path = hint_value.get_string ();
}
break;
case "desktop-entry":
if (hint_value.is_of_type (GLib.VariantType.STRING)) {
if (hint_value.is_of_type (VariantType.STRING)) {
desktop_entry = hint_value.get_string ();
}
break;
case "category":
if (hint_value.is_of_type (GLib.VariantType.STRING)) {
if (hint_value.is_of_type (VariantType.STRING)) {
category = hint_value.get_string ();
}
break;
case "resident":
if (hint_value.is_of_type (GLib.VariantType.BOOLEAN)) {
if (hint_value.is_of_type (VariantType.BOOLEAN)) {
resident = hint_value.get_boolean ();
}
break;
case "transient":
if (hint_value.is_of_type (GLib.VariantType.BOOLEAN)) {
if (hint_value.is_of_type (VariantType.BOOLEAN)) {
transient = hint_value.get_boolean ();
} else if (hint_value.is_of_type (GLib.VariantType.INT32)) {
} else if (hint_value.is_of_type (VariantType.INT32)) {
transient = hint_value.get_int32 () == 1;
}
break;
case "urgency":
if (hint_value.is_of_type (GLib.VariantType.BYTE)) {
if (hint_value.is_of_type (VariantType.BYTE)) {
urgency = UrgencyLevels.from_value (hint_value.get_byte ());
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment