[gimp/wip/animation: 143/197] plug-ins: install animation-play specific data and set plugin icon.



commit 6fa670f77cc0d57d8bd1bd06c92518a8d7dd609d
Author: Jehan <jehan girinstud io>
Date:   Tue May 23 18:00:27 2017 +0200

    plug-ins: install animation-play specific data and set plugin icon.

 plug-ins/animation-play/Makefile.am                |    4 ++++
 plug-ins/animation-play/widgets/animation-dialog.c |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/animation-play/Makefile.am b/plug-ins/animation-play/Makefile.am
index 74b0fc2..8ba0acf 100644
--- a/plug-ins/animation-play/Makefile.am
+++ b/plug-ins/animation-play/Makefile.am
@@ -72,3 +72,7 @@ animation_play_SOURCES = \
        animation-utils.h                               \
        animation-utils.c                               \
        animation-play.c
+
+iconsdir = $(gimpdatadir)/plug-ins/animation-play/icons/
+
+icons_DATA = icons/gimp-motion.png
diff --git a/plug-ins/animation-play/widgets/animation-dialog.c 
b/plug-ins/animation-play/widgets/animation-dialog.c
index b5d9be8..db4889f 100755
--- a/plug-ins/animation-play/widgets/animation-dialog.c
+++ b/plug-ins/animation-play/widgets/animation-dialog.c
@@ -410,11 +410,25 @@ animation_dialog_constructed (GObject *object)
   gint                    preview_width;
   gint                    preview_height;
   gint                    index;
+  gchar                  *icon_path;
+  GdkPixbuf              *pixbuf;
 
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
   gtk_window_set_role (GTK_WINDOW (dialog), PLUG_IN_ROLE);
 
+  /* Set plugin custom icon. */
+  icon_path = g_build_filename (gimp_data_directory (),
+                                "plug-ins",
+                                PLUG_IN_BINARY,
+                                "icons",
+                                "gimp-motion.png",
+                                NULL);
+  pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
+  gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf);
+  g_free (icon_path);
+  g_object_unref (pixbuf);
+
   /* Popup menu */
   g_signal_connect (dialog, "popup-menu",
                     G_CALLBACK (popup_menu),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]