summaryrefslogtreecommitdiff
path: root/netspeed
diff options
context:
space:
mode:
Diffstat (limited to 'netspeed')
-rw-r--r--netspeed/data/Makefile.am15
-rw-r--r--netspeed/data/org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in.in4
-rw-r--r--netspeed/data/org.mate.panel.applet.NetspeedAppletFactory.service.in3
-rw-r--r--netspeed/src/Makefile.am20
-rw-r--r--netspeed/src/netspeed.c60
5 files changed, 44 insertions, 58 deletions
diff --git a/netspeed/data/Makefile.am b/netspeed/data/Makefile.am
index 350217f2..e8bec0e1 100644
--- a/netspeed/data/Makefile.am
+++ b/netspeed/data/Makefile.am
@@ -1,6 +1,6 @@
NULL =
-APPLET_LOCATION = $(libexecdir)/mate-netspeed-applet
+APPLET_LOCATION = $(libdir)/mate-applets/libmate-netspeed-applet.so
appletdir = $(datadir)/mate-panel/applets
applet_in_files = org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in
@@ -8,28 +8,18 @@ applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-ap
$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN)sed \
- -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
$< > $@
$(applet_DATA): $(applet_in_files) Makefile
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
-servicedir = $(datadir)/dbus-1/services
-service_in_files = org.mate.panel.applet.NetspeedAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.mate.panel.applet.NetspeedAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
- $< > $@
-
netspeed_gschema_in_files = org.mate.panel.applet.netspeed.gschema.xml.in
gsettings_SCHEMAS = $(netspeed_gschema_in_files:.xml.in=.xml)
@GSETTINGS_RULES@
EXTRA_DIST = \
$(applet_in_files).in \
- $(service_in_files) \
$(netspeed_gschema_in_files) \
netspeed-details.ui \
netspeed-menu.xml \
@@ -39,7 +29,6 @@ EXTRA_DIST = \
CLEANFILES = \
$(gsettings_SCHEMAS) \
- $(service_DATA) \
$(applet_in_files) \
$(applet_DATA)
diff --git a/netspeed/data/org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in.in b/netspeed/data/org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in.in
index fdc64666..5b63e7c2 100644
--- a/netspeed/data/org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in.in
+++ b/netspeed/data/org.mate.applets.NetspeedApplet.mate-panel-applet.desktop.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=NetspeedAppletFactory
-Location=@LOCATION@
+Location=@APPLET_LOCATION@
+InProcess=true
Name=Netspeed Applet Factory
Description=Netspeed Applet
@@ -10,6 +11,7 @@ Description=Netspeed Applet
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-netspeed-applet
MateComponentId=OAFIID:MATE_NetspeedApplet
+Platforms=X11;Wayland;
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-netspeed
X-MATE-Bugzilla-Component=netspeed
diff --git a/netspeed/data/org.mate.panel.applet.NetspeedAppletFactory.service.in b/netspeed/data/org.mate.panel.applet.NetspeedAppletFactory.service.in
deleted file mode 100644
index 2868eec8..00000000
--- a/netspeed/data/org.mate.panel.applet.NetspeedAppletFactory.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=org.mate.panel.applet.NetspeedAppletFactory
-Exec=@LOCATION@
diff --git a/netspeed/src/Makefile.am b/netspeed/src/Makefile.am
index 8358b3c9..e91c1b34 100644
--- a/netspeed/src/Makefile.am
+++ b/netspeed/src/Makefile.am
@@ -1,5 +1,8 @@
NULL =
+mate_netspeed_applet_libdir= $(pkglibdir)
+mate_netspeed_applet_lib_LTLIBRARIES=libmate-netspeed-applet.la
+
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(includedir) \
@@ -13,35 +16,33 @@ if HAVE_NL
AM_CPPFLAGS += $(NL_CFLAGS)
endif
-libexec_PROGRAMS = mate-netspeed-applet
-
-BUILT_SOURCES = netspeed-resources.c netspeed-resources.h
-nodist_mate_netspeed_applet_SOURCES = $(BUILT_SOURCES)
-mate_netspeed_applet_SOURCES = \
+libmate_netspeed_applet_la_SOURCES = \
backend.h \
backend.c \
netspeed.c \
netspeed.h \
netspeed-preferences.c \
netspeed-preferences.h \
+ netspeed-resources.c \
+ netspeed-resources.h \
$(NULL)
if HAVE_NL
-mate_netspeed_applet_SOURCES += \
+libmate_netspeed_applet_la_SOURCES += \
nl80211.h \
ieee80211.h \
$(NULL)
endif
-mate_netspeed_applet_LDADD = $(GIO_LIBS) $(GTOP_APPLETS_LIBS) \
+libmate_netspeed_applet_la_LIBADD = $(GIO_LIBS) $(GTOP_APPLETS_LIBS) \
$(MATE_APPLETS4_LIBS) \
$(INTLLIBS) -lm
if HAVE_IW
-mate_netspeed_applet_LDADD += $(IW_LIBS)
+libmate_netspeed_applet_la_LIBADD += $(IW_LIBS)
endif
if HAVE_NL
-mate_netspeed_applet_LDADD += $(NL_LIBS)
+libmate_netspeed_applet_la_LIBADD += $(NL_LIBS)
endif
netspeed-resources.c: $(srcdir)/../data/netspeed-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data --generate-dependencies $(srcdir)/../data/netspeed-resources.gresource.xml)
@@ -51,7 +52,6 @@ netspeed-resources.h: $(srcdir)/../data/netspeed-resources.gresource.xml $(shell
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data --generate --c-name netspeed $<
CLEANFILES = \
- $(BUILT_SOURCES) \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index 60e2aec7..441f314f 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -1574,7 +1574,6 @@ netspeed_applet_factory (MatePanelApplet *applet,
return FALSE;
glibtop_init ();
- g_set_application_name (_("MATE Netspeed"));
netspeed = NETSPEED_APPLET (applet);
netspeed->icon_theme = gtk_icon_theme_get_default ();
@@ -1680,62 +1679,61 @@ netspeed_applet_factory (MatePanelApplet *applet,
netspeed->timeout_id = g_timeout_add (REFRESH_TIME,
(GSourceFunc)timeout_function,
netspeed);
-
- g_signal_connect (applet, "change-size",
+ g_signal_connect_object (applet, "change-size",
G_CALLBACK (applet_change_size_or_orient),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->icon_theme, "changed",
+ g_signal_connect_object (netspeed->icon_theme, "changed",
G_CALLBACK (icon_theme_changed_cb),
- netspeed);
+ netspeed, 0);
- g_signal_connect (applet, "change-orient",
+ g_signal_connect_object (applet, "change-orient",
G_CALLBACK (applet_change_size_or_orient),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->in_label, "size-allocate",
+ g_signal_connect_object (netspeed->in_label, "size-allocate",
G_CALLBACK (label_size_allocate_cb),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->out_label, "size-allocate",
+ g_signal_connect_object (netspeed->out_label, "size-allocate",
G_CALLBACK (label_size_allocate_cb),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->sum_label, "size-allocate",
+ g_signal_connect_object (netspeed->sum_label, "size-allocate",
G_CALLBACK (label_size_allocate_cb),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::auto-change-device",
+ g_signal_connect_object (netspeed->settings, "changed::auto-change-device",
G_CALLBACK (auto_change_device_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::device",
+ g_signal_connect_object (netspeed->settings, "changed::device",
G_CALLBACK (device_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::show-all-addresses",
+ g_signal_connect_object (netspeed->settings, "changed::show-all-addresses",
G_CALLBACK (showalladdresses_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::show-sum",
+ g_signal_connect_object (netspeed->settings, "changed::show-sum",
G_CALLBACK (showsum_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::show-bits",
+ g_signal_connect_object (netspeed->settings, "changed::show-bits",
G_CALLBACK (showbits_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::change-icon",
+ g_signal_connect_object (netspeed->settings, "changed::change-icon",
G_CALLBACK (changeicon_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::show-icon",
+ g_signal_connect_object (netspeed->settings, "changed::show-icon",
G_CALLBACK (showicon_settings_changed),
- netspeed);
+ netspeed, 0);
- g_signal_connect (netspeed->settings, "changed::show-quality-icon",
+ g_signal_connect_object (netspeed->settings, "changed::show-quality-icon",
G_CALLBACK (showqualityicon_settings_changed),
- netspeed);
+ netspeed, 0);
action_group = gtk_action_group_new ("Netspeed Applet Actions");
gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
@@ -1761,7 +1759,7 @@ netspeed_applet_factory (MatePanelApplet *applet,
return TRUE;
}
-MATE_PANEL_APPLET_OUT_PROCESS_FACTORY ("NetspeedAppletFactory",
+MATE_PANEL_APPLET_IN_PROCESS_FACTORY ("NetspeedAppletFactory",
NETSPEED_TYPE_APPLET,
"NetspeedApplet",
netspeed_applet_factory,