summaryrefslogtreecommitdiff
path: root/src/applet.h
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-10-04 11:15:19 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-10-04 12:49:08 +0200
commit971732aec871c103a6d0d12f4a49a7f0f2e53cbc (patch)
tree0d2cc7f680e4117ab76da50d615f7e89392f048a /src/applet.h
parent2724ffa34527f68fcdd37bc64254c05a3af43ef0 (diff)
downloadnetwork-manager-applet-lr/no-libnotify.tar.gz
applet: replace libnotify with GNotificationlr/no-libnotify
The libnotify's notify_notification_show() does a blocking D-Bus call. In fact, one fine gentleman's nm-applet got stuck for many seconds because the bus activation aparatus in his computer was not properly greased. Let's do away with this absolute monstrosity of a library by using the desktop notification API provided by GLib since 2.40. It's simpler, fully asynchronous and in addition to freedesktop notification API it can interface with Gtk and Flatpak portal one.
Diffstat (limited to 'src/applet.h')
-rw-r--r--src/applet.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/applet.h b/src/applet.h
index 2bc2246f..03566595 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -15,8 +15,6 @@
#include <net/ethernet.h>
-#include <libnotify/notify.h>
-
#ifdef WITH_APPINDICATOR
#if USE_AYATANA_INDICATORS
#include <libayatana-appindicator/app-indicator.h>
@@ -138,7 +136,6 @@ typedef struct {
GtkWidget * connections_menu_item;
GtkBuilder * info_dialog_ui;
- NotifyNotification* notification;
/* Tracker objects for secrets requests */
GSList * secrets_reqs;
@@ -261,20 +258,10 @@ NMRemoteConnection *applet_get_exported_connection_for_device (NMDevice *device,
NMDevice *applet_get_device_for_connection (NMApplet *applet, NMConnection *connection);
void applet_do_notify (NMApplet *applet,
- NotifyUrgency urgency,
- const char *summary,
- const char *message,
- const char *icon,
- const char *action1,
- const char *action1_label,
- NotifyActionCallback action1_cb,
- gpointer action1_user_data);
-
-void applet_do_notify_with_pref (NMApplet *applet,
- const char *summary,
- const char *message,
- const char *icon,
- const char *pref);
+ const char *title,
+ const char *body,
+ const char *icon_name,
+ const char *pref);
GtkWidget * applet_new_menu_item_helper (NMConnection *connection,
NMConnection *active,