[gssdp/wip/gtk4: 12/13] sniffer: Add logo to about dialog
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp/wip/gtk4: 12/13] sniffer: Add logo to about dialog
- Date: Sun, 20 Jun 2021 15:25:46 +0000 (UTC)
commit 345d67d7e10d6dbfadf1781b6b047a87e176e1b3
Author: Jens Georg <mail jensge org>
Date: Sat Jun 19 14:16:32 2021 +0200
sniffer: Add logo to about dialog
tools/gssdp-device-sniffer.gresource.xml | 3 +++
tools/main-window.c | 9 +++++++++
tools/meson.build | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/tools/gssdp-device-sniffer.gresource.xml b/tools/gssdp-device-sniffer.gresource.xml
index 6a9d0a3..0b957e4 100644
--- a/tools/gssdp-device-sniffer.gresource.xml
+++ b/tools/gssdp-device-sniffer.gresource.xml
@@ -3,4 +3,7 @@
<gresource prefix="/org/gupnp/GSSDP">
<file preprocess="xml-stripblanks" alias="MainWindow.ui">main-window.ui</file>
</gresource>
+ <gresource prefix="/org/gupnp">
+ <file preprocess="xml-stripblanks" alias="Logo.svg">images/gupnp-logo-short.svg</file>
+ </gresource>
</gresources>
diff --git a/tools/main-window.c b/tools/main-window.c
index 34879d2..36a0d67 100644
--- a/tools/main-window.c
+++ b/tools/main-window.c
@@ -12,6 +12,8 @@
#include <libsoup/soup.h>
+#define LOGO_RESOURCE "/org/gupnp/Logo.svg"
+
typedef enum
{
PACKET_STORE_COLUMN_TIME,
@@ -665,7 +667,11 @@ static void
on_about (GSimpleAction *action, GVariant *parameter, gpointer user_data)
{
const char *AUTHORS[] = { "Zeeshan Ali (Khattak) <zeeshanak gnome org>",
+ "Jens Georg <mail jensge org>",
NULL };
+
+ GdkTexture *logo = gdk_texture_new_from_resource (LOGO_RESOURCE);
+
gtk_show_about_dialog (
GTK_WINDOW (user_data),
"copyright",
@@ -681,7 +687,10 @@ on_about (GSimpleAction *action, GVariant *parameter, gpointer user_data)
"translator-credits",
"license-type",
GTK_LICENSE_LGPL_2_1,
+ "logo", logo,
NULL);
+
+ g_object_unref (logo);
}
static void
diff --git a/tools/meson.build b/tools/meson.build
index 59c5e74..3de758c 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -1,6 +1,7 @@
resource = gnome.compile_resources(
'org.gupnp.GSSDP.DeviceSniffer',
- 'gssdp-device-sniffer.gresource.xml'
+ 'gssdp-device-sniffer.gresource.xml',
+ source_dir: [meson.current_source_dir(), meson.source_root() / 'doc']
)
sniffer = executable(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]