From 475fc94cb617655fb4c139e3b10b553248367104 Mon Sep 17 00:00:00 2001 From: Vasily_Makarov Date: Fri, 10 Jun 2011 19:27:00 +0400 Subject: saedit: Add icon --- saedit/icon.svg | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ saedit/main.c | 6 +- saedit/main.h | 3 + 3 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 saedit/icon.svg diff --git a/saedit/icon.svg b/saedit/icon.svg new file mode 100644 index 0000000..a696db3 --- /dev/null +++ b/saedit/icon.svg @@ -0,0 +1,195 @@ + + + + + + + + + + image/svg+xml + + + + + + <sprite> <imageset> <action> <frame> <sequence> </action></sprite> + 1234567 + + + + + diff --git a/saedit/main.c b/saedit/main.c index 55152ba..c8ff62a 100644 --- a/saedit/main.c +++ b/saedit/main.c @@ -425,6 +425,7 @@ void show_about_dialog() { "copyright", "Copyleft Vasily_Makarov 2011", "program-name", "Sprite Animation Editor", "version", "0.1 prealpha", + "logo", icon, NULL); } @@ -444,7 +445,8 @@ void set_up_interface() { win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(win), "Sprite Animation Editor"); - gtk_window_set_position (GTK_WINDOW(win), GTK_WIN_POS_CENTER); + gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER); + gtk_window_set_icon(GTK_WINDOW(win), icon); gtk_widget_realize(win); g_signal_connect(win, "destroy", gtk_main_quit, NULL); gtk_widget_set_size_request(win, MIN_WIDTH, MIN_HEIGHT); @@ -591,6 +593,8 @@ int main (int argc, char *argv[]) { gtk_init(&argc, &argv); + icon = gdk_pixbuf_new_from_file(ICON_PATH, NULL); + current_sprite = sprite_info_new(-1, 0, 0); imageset = imageset_info_new(); diff --git a/saedit/main.h b/saedit/main.h index 69f5348..3b56737 100644 --- a/saedit/main.h +++ b/saedit/main.h @@ -23,6 +23,7 @@ const int SPRITE_WIDTH_DEFAULT = 64; const int SPRITE_HEIGHT_DEFAULT = 64; const int GRID_SIZE = 32; const gchar *BACKGROUNDS_DIR = "backgrounds"; +const gchar *ICON_PATH = "icon.svg"; typedef struct { XMLNode *node; @@ -69,6 +70,8 @@ GList *imagesets = NULL; GList *actions = NULL; GList *animations = NULL; +GdkPixbuf *icon = NULL; + XMLNode *root = NULL; imageset_info *imageset = NULL; -- cgit v1.2.3-70-g09d2