Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme fails at load under MATE 1.22.x (imported from old github repo) #2

Closed
FredBezies opened this issue Apr 29, 2019 · 8 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@FredBezies
Copy link

You cannot use slate theme with Mate 1.22.x. As reported here - solus-project/mate-notification-theme-slate#4 - there is no way to make it work.

Here is a screenshot:

56048367-a8595a00-5d47-11e9-8368-ddf0c5126e7b

Error log:

Error while display notification:
GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

@JoshStrobl: I hope this bug report will help.

@JoshStrobl JoshStrobl self-assigned this Apr 29, 2019
@JoshStrobl JoshStrobl added the bug Something isn't working label Apr 29, 2019
@JoshStrobl
Copy link
Member

Currently working on a fix, thanks!

@JoshStrobl
Copy link
Member

@FredBezies If you're in a position to compile, please apply and test the following patch:

diff --git a/src/engine-api.h b/src/engine-api.h
index 691caf7..dc04472 100644
--- a/src/engine-api.h
+++ b/src/engine-api.h
@@ -51,7 +51,7 @@ void hide_notification(GtkWindow *notif_window);
 /**
  * Update notification from the given hints mapping
  */
-void set_notification_hints(GtkWindow *notif_window, GHashTable *hints);
+void set_notification_hints(GtkWindow *notif_window, GVariant *hints);
 
 /**
  * Set the textual content for the notification
diff --git a/src/engine.c b/src/engine.c
index b56dc4e..32fcb90 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -326,7 +326,7 @@ __slate_public__ void clear_notification_actions(GtkWindow *notif_window)
         slate_notification_window_clear_actions(window);
 }
 
-__slate_public__ void set_notification_hints(GtkWindow *notif_window, GHashTable *hints)
+__slate_public__ void set_notification_hints(GtkWindow *notif_window, GVariant *hints)
 {
         if (!notif_window) {
                 return;
diff --git a/src/notification-window.c b/src/notification-window.c
index 6e92f10..345517a 100644
--- a/src/notification-window.c
+++ b/src/notification-window.c
@@ -296,15 +296,15 @@ void slate_notification_window_clear_actions(SlateNotificationWindow *self)
  * in future mate-notification-daemon will broadcast action-icons as a
  * capability.
  */
-void slate_notification_window_set_hints(SlateNotificationWindow *self, GHashTable *hints)
+void slate_notification_window_set_hints(SlateNotificationWindow *self, GVariant *hints)
 {
-        GValue *hash = NULL;
+    GVariant *actions_icons = NULL;
 
-        hash = g_hash_table_lookup(hints, "action-icons");
-        if (!hash || !G_VALUE_HOLDS_BOOLEAN(hash)) {
-                return;
-        }
-        self->action_icons = g_value_get_boolean(hash);
+    g_variant_lookup(hints, "action-icons", "v", &actions_icons);
+
+    if (actions_icons != NULL && g_variant_get_type(actions_icons) == G_VARIANT_TYPE_BOOLEAN) {
+        self->action_icons = g_variant_get_boolean(actions_icons);
+    }
 }
 
 /*
diff --git a/src/notification-window.h b/src/notification-window.h
index 57a1962..46549a1 100644
--- a/src/notification-window.h
+++ b/src/notification-window.h
@@ -39,7 +39,7 @@ void slate_notification_window_add_action(SlateNotificationWindow *window, const
 
 void slate_notification_window_clear_actions(SlateNotificationWindow *window);
 
-void slate_notification_window_set_hints(SlateNotificationWindow *window, GHashTable *hints);
+void slate_notification_window_set_hints(SlateNotificationWindow *window, GVariant *hints);
 
 /*
  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html

@FredBezies
Copy link
Author

Well, looks like you fixed this bug. Applied the patch, and here is the result in a screenshot:

Capture du 2019-04-29 19-14-20

Looks like it works... :)

@JoshStrobl
Copy link
Member

Awesome, thanks for testing. I'll tag a release ASAP.

@FredBezies
Copy link
Author

FredBezies commented Apr 29, 2019

Well, thank you for the patch. Looks like a lot of users will be happier soon :)

Only missing a new official release of brisk menu now.

@JoshStrobl
Copy link
Member

Release 6.0 has now been tagged. I'll work on having release 7.0 bring Meson support and cleaning up the styling.

@FredBezies
Copy link
Author

Marked AUR package as outdated. Let's see how long it will take to be updated.

@JoshStrobl
Copy link
Member

Thanks for flagging it out-of-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants