node-editor: Don't install the icon

We don't want to install an icon if we're not
installing the app. Also give the artist credit.

Fixes: #3051
This commit is contained in:
Matthias Clasen 2020-08-09 20:28:56 -04:00
parent aa1b9531c1
commit 6e9de7f271
3 changed files with 23 additions and 8 deletions

View File

@ -20,11 +20,11 @@ executable('gtk4-node-editor',
link_args: extra_demo_ldflags,
install: false)
# icons
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
# icons, don't install them until we decide to install gtk4-node-editor
#icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
foreach size: ['scalable', 'symbolic']
install_subdir('data/' + size,
install_dir: icontheme_dir
)
endforeach
#foreach size: ['scalable', 'symbolic']
# install_subdir('data/' + size,
# install_dir: icontheme_dir
# )
#endforeach

View File

@ -60,8 +60,15 @@ activate_about (GSimpleAction *action,
GString *s;
GskRenderer *gsk_renderer;
const char *renderer;
char *os_name;
char *os_version;
GtkWidget *dialog;
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
s = g_string_new ("");
if (os_name && os_version)
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
g_string_append (s, "System libraries\n");
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
@ -93,7 +100,8 @@ activate_about (GSimpleAction *action,
gtk_get_minor_version (),
gtk_get_micro_version ());
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
"transient-for", gtk_application_get_active_window (app),
"program-name", "GTK Node Editor",
"version", version,
"copyright", "©2019—2020 The GTK Team",
@ -105,9 +113,15 @@ activate_about (GSimpleAction *action,
"title", "About GTK Node Editor",
"system-information", s->str,
NULL);
gtk_about_dialog_add_credit_section (GTK_ABOUT_DIALOG (dialog),
"Artwork by", (const char *[]) { "Jakub Steiner", NULL });
gtk_window_present (GTK_WINDOW (dialog));
g_string_free (s, TRUE);
g_free (version);
g_free (os_name);
g_free (os_version);
}
static void

View File

@ -4,5 +4,6 @@
<file preprocess="xml-stripblanks">node-editor-window.ui</file>
<file preprocess="xml-stripblanks">help-window.ui</file>
<file>node-format.md</file>
<file alias='icons/apps/org.gtk.gtk4.NodeEditor.Devel.svg'>data/scalable/apps/org.gtk.gtk4.NodeEditor.Devel.svg</file>
</gresource>
</gresources>