changeset 33575:052789583781

Remove xpm definitions inside source file. Instead, create appropriate xpm files in pixmaps directory.
author ib
date Sun, 19 Jun 2011 16:11:42 +0000
parents 1a7606be0b94
children c97ec47d1bbb
files gui/ui/gtk/playlist.c gui/ui/pixmaps/dir2.xpm gui/ui/pixmaps/open2.xpm
diffstat 3 files changed, 52 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/gtk/playlist.c	Sun Jun 19 16:05:35 2011 +0000
+++ b/gui/ui/gtk/playlist.c	Sun Jun 19 16:11:42 2011 +0000
@@ -36,53 +36,8 @@
 #include "playlist.h"
 #include "tools.h"
 
-static char * book_open_xpm[] = {
-	"16 16 4 1",
-	"       c None s None",
-	".      c black",
-	"X      c #808080",
-	"o      c white",
-	"                ",
-	"  ..            ",
-	" .Xo.    ...    ",
-	" .Xoo. ..oo.    ",
-	" .Xooo.Xooo...  ",
-	" .Xooo.oooo.X.  ",
-	" .Xooo.Xooo.X.  ",
-	" .Xooo.oooo.X.  ",
-	" .Xooo.Xooo.X.  ",
-	" .Xooo.oooo.X.  ",
-	"  .Xoo.Xoo..X.  ",
-	"   .Xo.o..ooX.  ",
-	"    .X..XXXXX.  ",
-	"    ..X.......  ",
-	"     ..         ",
-	"                "};
-
-static char * book_closed_xpm[] = {
-	"16 16 6 1",
-	"       c None s None",
-	".      c black",
-	"X      c blue",
-	"o      c yellow",
-	"O      c #007FEA",
-	"#      c white",
-	"                ",
-	"       ..       ",
-	"     ..XX.      ",
-	"   ..XXXXX.     ",
-	" ..XXXXXXXX.    ",
-	".ooXXXXXXXXX.   ",
-	"..ooXXXXXXXXX.  ",
-	".X.ooXXXXXXXXX. ",
-	".XX.ooXXXXXX..  ",
-	" .XX.ooXXX..#O  ",
-	"  .XX.oo..##OO. ",
-	"   .XX..##OO..  ",
-	"    .X.#OO..    ",
-	"     ..O..      ",
-	"      ..        ",
-	"                "};
+#include "gui/ui/pixmaps/open2.xpm"
+#include "gui/ui/pixmaps/dir2.xpm"
 
        GtkWidget * PlayList = NULL;
 static GtkWidget * CTDirTree;
@@ -521,8 +476,8 @@
   gtk_clist_column_titles_show( GTK_CLIST( CTDirTree ) );
   gtk_clist_set_shadow_type( GTK_CLIST( CTDirTree ),GTK_SHADOW_NONE );
 
-  if ( !pxOpenedBook ) pxOpenedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msOpenedBook,&transparent,book_closed_xpm );
-  if ( !pxClosedBook ) pxClosedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msClosedBook,&transparent,book_open_xpm );
+  if ( !pxOpenedBook ) pxOpenedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msOpenedBook,&transparent,(gchar **)dir2_xpm );
+  if ( !pxClosedBook ) pxClosedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msClosedBook,&transparent,(gchar **)open2_xpm );
 
   parent=gtk_ctree_insert_node( GTK_CTREE( CTDirTree ),NULL,NULL,&root,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,FALSE,FALSE );
   DirNode=malloc( sizeof( DirNodeType ) );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/ui/pixmaps/dir2.xpm	Sun Jun 19 16:11:42 2011 +0000
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * const dir2_xpm[] = {
+	"16 16 6 1",
+	"       c None s None",
+	".      c black",
+	"X      c blue",
+	"o      c yellow",
+	"O      c #007FEA",
+	"#      c white",
+	"                ",
+	"       ..       ",
+	"     ..XX.      ",
+	"   ..XXXXX.     ",
+	" ..XXXXXXXX.    ",
+	".ooXXXXXXXXX.   ",
+	"..ooXXXXXXXXX.  ",
+	".X.ooXXXXXXXXX. ",
+	".XX.ooXXXXXX..  ",
+	" .XX.ooXXX..#O  ",
+	"  .XX.oo..##OO. ",
+	"   .XX..##OO..  ",
+	"    .X.#OO..    ",
+	"     ..O..      ",
+	"      ..        ",
+	"                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/ui/pixmaps/open2.xpm	Sun Jun 19 16:11:42 2011 +0000
@@ -0,0 +1,23 @@
+/* XPM */
+static const char * const open2_xpm[] = {
+	"16 16 4 1",
+	"       c None s None",
+	".      c black",
+	"X      c #808080",
+	"o      c white",
+	"                ",
+	"  ..            ",
+	" .Xo.    ...    ",
+	" .Xoo. ..oo.    ",
+	" .Xooo.Xooo...  ",
+	" .Xooo.oooo.X.  ",
+	" .Xooo.Xooo.X.  ",
+	" .Xooo.oooo.X.  ",
+	" .Xooo.Xooo.X.  ",
+	" .Xooo.oooo.X.  ",
+	"  .Xoo.Xoo..X.  ",
+	"   .Xo.o..ooX.  ",
+	"    .X..XXXXX.  ",
+	"    ..X.......  ",
+	"     ..         ",
+	"                "};