aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2021-12-24 00:18:34 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2021-12-24 00:18:34 +0100
commita33950ee5629586f631e63dceb984346d8702b85 (patch)
tree391501fd79a2136f56e57e1025a22ba225344f86
parent04865c9e12b9d5ab3507936c554de605c79dc353 (diff)
downloadmessenger-gtk-a33950ee5629586f631e63dceb984346d8702b85.tar.gz
messenger-gtk-a33950ee5629586f631e63dceb984346d8702b85.zip
Updated desktop file and app id
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r--Makefile14
-rw-r--r--resources/css.gresource.xml2
-rw-r--r--resources/messenger-gtk.desktop14
-rw-r--r--resources/org.gnunet.Messenger.desktop14
-rw-r--r--resources/ui.gresource.xml2
-rw-r--r--resources/ui/messenger.ui2
-rw-r--r--src/application.c8
7 files changed, 31 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index dbb4e39..ee9c5a9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
1 1
2APP_ID = org.gnunet.Messenger
3
2RESOURCES_DIR = resources/ 4RESOURCES_DIR = resources/
3SOURCE_DIR = src/ 5SOURCE_DIR = src/
4INSTALL_DIR ?= /usr/local/ 6INSTALL_DIR ?= /usr/local/
@@ -96,24 +98,26 @@ mobile: $(BINARY)
96.PHONY: install 98.PHONY: install
97 99
98define install-icon 100define install-icon
99 install -Dm644 $(addprefix $(APPICON_DIR), full_color_$(1).png) $(addprefix $(INSTALL_DIR), share/icons/hicolor/$(1)x$(1)/apps/$(BINARY).png) 101 install -Dm644 $(addprefix $(APPICON_DIR), full_color_$(1).png) $(addprefix $(INSTALL_DIR), share/icons/hicolor/$(1)x$(1)/apps/$(APP_ID).png)
100endef 102endef
101 103
102install: 104install:
103 install -Dm755 $(BINARY) $(addprefix $(INSTALL_DIR), bin/) 105 install -Dm755 $(BINARY) $(addprefix $(INSTALL_DIR), bin/)
104 $(foreach SIZE,$(ICON_SIZES),$(call install-icon,$(SIZE));) 106 $(foreach SIZE,$(ICON_SIZES),$(call install-icon,$(SIZE));)
105 install -Dm644 $(addprefix $(RESOURCES_DIR), $(BINARY).desktop) $(addprefix $(INSTALL_DIR), share/applications/) 107 install -Dm644 $(addprefix $(APPICON_DIR), full_color.svg) $(addprefix $(INSTALL_DIR), share/icons/hicolor/scalable/apps/$(APP_ID).svg)
108 desktop-file-install --dir=$(addprefix $(INSTALL_DIR), share/applications/) $(addprefix $(RESOURCES_DIR), $(APP_ID).desktop)
106 109
107.PHONY: uninstall 110.PHONY: uninstall
108 111
109define uninstall-icon 112define uninstall-icon
110 $(GNU_RM) -f $(addprefix $(INSTALL_DIR), share/icons/hicolor/$(1)x$(1)/apps/$(BINARY).png) 113 $(GNU_RM) -f $(addprefix $(INSTALL_DIR), share/icons/hicolor/$(1)x$(1)/apps/$(APP_ID).png)
111endef 114endef
112 115
113uninstall: 116uninstall:
114 $(GNU_RM) -f $(addsuffix $(BINARY), $(addprefix $(INSTALL_DIR), bin/)) 117 $(GNU_RM) -f $(addsuffix $(BINARY), $(addprefix $(INSTALL_DIR), bin/))
115 $(foreach SIZE,$(ICON_SIZES),$(call uninstall-icon,$(SIZE))) 118 $(foreach SIZE,$(ICON_SIZES),$(call uninstall-icon,$(SIZE));)
116 $(GNU_RM) -f $(addsuffix $(BINARY).desktop, $(addprefix $(INSTALL_DIR), share/applications/)) 119 $(GNU_RM) -f $(addprefix $(INSTALL_DIR), share/icons/hicolor/scalable/apps/$(APP_ID).svg)
120 $(GNU_RM) -f $(addsuffix $(APP_ID).desktop, $(addprefix $(INSTALL_DIR), share/applications/))
117 121
118.PHONY: clean 122.PHONY: clean
119 123
diff --git a/resources/css.gresource.xml b/resources/css.gresource.xml
index bff70fb..f4263f5 100644
--- a/resources/css.gresource.xml
+++ b/resources/css.gresource.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<gresources> 2<gresources>
3 <gresource prefix="/org/gnunet/Messenger-GTK"> 3 <gresource prefix="/org/gnunet/Messenger">
4 <file>css/style.css</file> 4 <file>css/style.css</file>
5 </gresource> 5 </gresource>
6</gresources> \ No newline at end of file 6</gresources> \ No newline at end of file
diff --git a/resources/messenger-gtk.desktop b/resources/messenger-gtk.desktop
deleted file mode 100644
index a521907..0000000
--- a/resources/messenger-gtk.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
1[Desktop Entry]
2Version=0.0.1
3Name=Messenger-GTK
4Comment=A GTK based GUI for the Messenger service of GNUnet.
5TryExec=messenger-gtk
6Exec=messenger-gtk
7Icon=messenger-gtk
8Terminal=false
9StartupWMClass=MessengerGTK
10Type=Application
11Categories=Chat;Network;InstantMessaging;GTK;FileSharing;
12MimeType=x-scheme-handler/messenger-gtk;
13Keywords=messenger-gtk;chat;im;messaging;messenger;gtk;
14X-GNOME-UsesNotifications=true
diff --git a/resources/org.gnunet.Messenger.desktop b/resources/org.gnunet.Messenger.desktop
new file mode 100644
index 0000000..9cda851
--- /dev/null
+++ b/resources/org.gnunet.Messenger.desktop
@@ -0,0 +1,14 @@
1[Desktop Entry]
2Name=Messenger-GTK
3Comment=A GTK based GUI for the Messenger service of GNUnet.
4TryExec=messenger-gtk
5Exec=messenger-gtk
6Icon=org.gnunet.Messenger
7Terminal=false
8StartupWMClass=MessengerGTK
9Type=Application
10Categories=Chat;Network;InstantMessaging;GTK;
11MimeType=x-scheme-handler/org.gnunet.Messenger;
12Keywords=messenger-gtk;chat;im;messaging;messenger;gtk;org.gnunet.Messenger;
13X-GNOME-UsesNotifications=true
14X-Purism-FormFactor=Workstation;Mobile; \ No newline at end of file
diff --git a/resources/ui.gresource.xml b/resources/ui.gresource.xml
index 27cf432..dfa2e9d 100644
--- a/resources/ui.gresource.xml
+++ b/resources/ui.gresource.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<gresources> 2<gresources>
3 <gresource prefix="/org/gnunet/Messenger-GTK"> 3 <gresource prefix="/org/gnunet/Messenger">
4 <file compressed="true">ui/chat_entry.ui</file> 4 <file compressed="true">ui/chat_entry.ui</file>
5 <file compressed="true">ui/chat.ui</file> 5 <file compressed="true">ui/chat.ui</file>
6 <file compressed="true">ui/contacts.ui</file> 6 <file compressed="true">ui/contacts.ui</file>
diff --git a/resources/ui/messenger.ui b/resources/ui/messenger.ui
index d79f875..fd34ea5 100644
--- a/resources/ui/messenger.ui
+++ b/resources/ui/messenger.ui
@@ -25,6 +25,8 @@ Author: Tobias Frisch
25 <requires lib="libhandy" version="1.2"/> 25 <requires lib="libhandy" version="1.2"/>
26 <object class="GtkApplicationWindow" id="main_window"> 26 <object class="GtkApplicationWindow" id="main_window">
27 <property name="can-focus">False</property> 27 <property name="can-focus">False</property>
28 <property name="icon-name">org.gnunet.Messenger</property>
29 <property name="startup-id">org.gnunet.Messenger</property>
28 <child> 30 <child>
29 <object class="HdyLeaflet" id="leaflet_chat"> 31 <object class="HdyLeaflet" id="leaflet_chat">
30 <property name="visible">True</property> 32 <property name="visible">True</property>
diff --git a/src/application.c b/src/application.c
index f1a2fd8..b2425c0 100644
--- a/src/application.c
+++ b/src/application.c
@@ -26,14 +26,14 @@
26#include "resources.h" 26#include "resources.h"
27 27
28static void 28static void
29_load_ui_stylesheets(void) 29_load_ui_stylesheets(MESSENGER_Application *app)
30{ 30{
31 GdkScreen* screen = gdk_screen_get_default(); 31 GdkScreen* screen = gdk_screen_get_default();
32 GtkCssProvider* provider = gtk_css_provider_new(); 32 GtkCssProvider* provider = gtk_css_provider_new();
33 33
34 gtk_css_provider_load_from_resource( 34 gtk_css_provider_load_from_resource(
35 provider, 35 provider,
36 "org/gnunet/Messenger-GTK/css/style.css" 36 application_get_resource_path(app, "css/style.css")
37 ); 37 );
38 38
39 gtk_style_context_add_provider_for_screen( 39 gtk_style_context_add_provider_for_screen(
@@ -66,7 +66,7 @@ application_init(MESSENGER_Application *app,
66 hdy_init(); 66 hdy_init();
67 67
68 app->application = gtk_application_new( 68 app->application = gtk_application_new(
69 "org.gnunet.Messenger-GTK", 69 "org.gnunet.Messenger",
70 G_APPLICATION_NON_UNIQUE 70 G_APPLICATION_NON_UNIQUE
71 ); 71 );
72 72
@@ -75,7 +75,7 @@ application_init(MESSENGER_Application *app,
75 notify_init("Messenger-GTK"); 75 notify_init("Messenger-GTK");
76 app->notifications = NULL; 76 app->notifications = NULL;
77 77
78 _load_ui_stylesheets(); 78 _load_ui_stylesheets(app);
79 79
80 app->chat.status = EXIT_FAILURE; 80 app->chat.status = EXIT_FAILURE;
81 app->chat.tid = 0; 81 app->chat.tid = 0;