summaryrefslogtreecommitdiff
path: root/src/editor.c
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 /src/editor.c
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
Diffstat (limited to 'src/editor.c')
-rw-r--r--src/editor.c46
1 files changed, 46 insertions, 0 deletions
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);