summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-07-15 14:38:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-07-15 14:38:56 (GMT)
commit8b2189a819c7a761cfdb97d9e3382ea963f225fb (patch)
treee58ce76576a94c7bcc68fbaf591862f7bef726d6
parent9dad46d59fc491cac90795c418e3f973b85c2b4d (diff)
Set a scaled icons list for the application.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@251 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog11
-rw-r--r--pixmaps/Makefile.am7
-rw-r--r--pixmaps/chrysalide_128.pngbin0 -> 10861 bytes
-rw-r--r--pixmaps/chrysalide_32.pngbin0 -> 1789 bytes
-rw-r--r--pixmaps/chrysalide_64.pngbin0 -> 4525 bytes
-rw-r--r--src/editor.c46
6 files changed, 63 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cd285df..a19fb10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+12-07-15 Cyrille Bagard <nocbos@gmail.com>
+
+ * pixmaps/chrysalide_128.png:
+ * pixmaps/chrysalide_32.png:
+ * pixmaps/chrysalide_64.png:
+ New entries: define scaled icons for the editor window.
+
+ * pixmaps/Makefile.am:
+ * src/editor.c:
+ Set a scaled icons list for the application.
+
12-07-14 Cyrille Bagard <nocbos@gmail.com>
* src/analysis/binary.c:
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index 479d9eb..bc88f48 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -1,4 +1,9 @@
+APP_ICONS = \
+ chrysalide_32.png \
+ chrysalide_64.png \
+ chrysalide_128.png
+
REVISION_PIX = \
revision_0.png \
revision_1.png \
@@ -36,4 +41,4 @@ EXTRA_DIST = \
oidapixdir = $(datadir)/openida
-oidapix_DATA = dropwin_back.png $(REVISION_PIX) $(TOOLBAR_BUTTONS) $(LIST_ICONS)
+oidapix_DATA = dropwin_back.png $(APP_ICONS) $(REVISION_PIX) $(TOOLBAR_BUTTONS) $(LIST_ICONS)
diff --git a/pixmaps/chrysalide_128.png b/pixmaps/chrysalide_128.png
new file mode 100644
index 0000000..da0e463
--- /dev/null
+++ b/pixmaps/chrysalide_128.png
Binary files differ
diff --git a/pixmaps/chrysalide_32.png b/pixmaps/chrysalide_32.png
new file mode 100644
index 0000000..7f68fff
--- /dev/null
+++ b/pixmaps/chrysalide_32.png
Binary files differ
diff --git a/pixmaps/chrysalide_64.png b/pixmaps/chrysalide_64.png
new file mode 100644
index 0000000..af35d6f
--- /dev/null
+++ b/pixmaps/chrysalide_64.png
Binary files differ
diff --git a/src/editor.c b/src/editor.c
index a55903a..54149ff 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -28,6 +28,9 @@
#include <i18n.h>
+#include "gtkext/support.h"
+
+
@@ -64,6 +67,9 @@
+/* Met en place la liste des icônes de l'éditeur. */
+static GList *build_editor_icons_list(void);
+
/* Construit la fenêtre de l'éditeur. */
GtkWidget *create_editor(void);
@@ -145,6 +151,42 @@ static GtkWidget *build_editor_toolbar(GObject *);
* *
* Paramètres : - *
* *
+* Description : Met en place la liste des icônes de l'éditeur. *
+* *
+* Retour : Liste d'images dimensionnées. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static GList *build_editor_icons_list(void)
+{
+ GList *result; /* Liste à retourner */
+ GdkPixbuf *pixbuf; /* Image chargée en mémoire */
+
+ result = NULL;
+
+ pixbuf = get_pixbuf_from_file("chrysalide_32.png");
+ if (pixbuf != NULL)
+ result = g_list_append(result, pixbuf);
+
+ pixbuf = get_pixbuf_from_file("chrysalide_64.png");
+ if (pixbuf != NULL)
+ result = g_list_append(result, pixbuf);
+
+ pixbuf = get_pixbuf_from_file("chrysalide_128.png");
+ if (pixbuf != NULL)
+ result = g_list_append(result, pixbuf);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : - *
+* *
* Description : Construit la fenêtre de l'éditeur. *
* *
* Retour : Adresse de la fenêtre mise en place. *
@@ -156,6 +198,7 @@ static GtkWidget *build_editor_toolbar(GObject *);
GtkWidget *create_editor(void)
{
GtkWidget *result; /* Fenêtre à renvoyer */
+ GList *icons; /* Liste d'images dimensionnées*/
GObject *ref; /* Version de référence */
GEditorItem *editem; /* Menus réactifs principaux */
GtkWidget *menuboard; /* Barre de menus principale */
@@ -212,6 +255,9 @@ GtkWidget *create_editor(void)
gtk_container_set_border_width(GTK_CONTAINER(result), 4);
gtk_window_set_title(GTK_WINDOW(result), _("Chrysalide"));
+ icons = build_editor_icons_list();
+ gtk_window_set_icon_list(GTK_WINDOW(result), icons);
+
g_signal_connect(G_OBJECT(result), "delete-event", G_CALLBACK(on_delete_editor), NULL);
g_signal_connect(G_OBJECT(result), "destroy", G_CALLBACK(on_destroy_editor), NULL);