From 8b2189a819c7a761cfdb97d9e3382ea963f225fb Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sun, 15 Jul 2012 14:38:56 +0000 Subject: Set a scaled icons list for the application. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@251 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 11 +++++++++++ pixmaps/Makefile.am | 7 ++++++- pixmaps/chrysalide_128.png | Bin 0 -> 10861 bytes pixmaps/chrysalide_32.png | Bin 0 -> 1789 bytes pixmaps/chrysalide_64.png | Bin 0 -> 4525 bytes src/editor.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 pixmaps/chrysalide_128.png create mode 100644 pixmaps/chrysalide_32.png create mode 100644 pixmaps/chrysalide_64.png diff --git a/ChangeLog b/ChangeLog index cd285df..a19fb10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +12-07-15 Cyrille Bagard + + * 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 * 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 Binary files /dev/null and b/pixmaps/chrysalide_128.png differ diff --git a/pixmaps/chrysalide_32.png b/pixmaps/chrysalide_32.png new file mode 100644 index 0000000..7f68fff Binary files /dev/null and b/pixmaps/chrysalide_32.png differ diff --git a/pixmaps/chrysalide_64.png b/pixmaps/chrysalide_64.png new file mode 100644 index 0000000..af35d6f Binary files /dev/null and b/pixmaps/chrysalide_64.png 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 +#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); -- cgit v0.11.2-87-g4458