Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4561/src
Modified Files:
Tag: coverart_display_development_branch
display_coverart.c main.c display.c display_coverart.h
Log Message:
08/10/2007
- Patch tidying up function syntax and making init_display_cover static
Index: display_coverart.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/Attic/display_coverart.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- display_coverart.c 8 Jan 2007 21:08:44 -0000 1.1.2.1
+++ display_coverart.c 8 Jan 2007 21:47:07 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-12-18 20:48:28 jcs>
+/* Time-stamp: <2007-01-04 19:47:01 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -33,7 +33,7 @@
#include "display_coverart.h"
-//Declarations
+/* Declarations */
static void debug_albums ();
static GdkPixbuf *draw_blank_cdimage ();
static GdkPixbuf *draw_shadow_top (gdouble width, gdouble height);
@@ -171,7 +171,7 @@
drawbuftop[pixel_offset + 1] = 0;
drawbuftop[pixel_offset + 2] = 0;
drawbuftop[pixel_offset + 3] = 255 - (y * (255 /
height));
- //drawbuftop[pixel_offset + 3] = 255;
+ /* drawbuftop[pixel_offset + 3] = 255; */
}
}
return gdk_pixbuf_new_from_data(drawbuftop,
@@ -204,7 +204,7 @@
drawbuf[pixel_offset + 1] = 0;
drawbuf[pixel_offset + 2] = 0;
drawbuf[pixel_offset + 3] = y * (255 / height);
- //drawbuf[pixel_offset + 3] = 255;
+ /* drawbuf[pixel_offset + 3] = 255; */
}
}
return gdk_pixbuf_new_from_data(drawbuf,
@@ -480,7 +480,7 @@
printf("image buffer is null\n");
imgbuf = gdk_pixbuf_scale_simple(imgbuf, cover->img_width,
cover->img_height, GDK_INTERP_NEAREST);
- gnome_canvas_item_set(cover->cdimage, "pixbuf", imgbuf);
+ gnome_canvas_item_set(cover->cdimage, "pixbuf", imgbuf, NULL);
cover->track = track;
}
}
@@ -529,7 +529,7 @@
printf("image buffer is null\n");
imgbuf = gdk_pixbuf_scale_simple(imgbuf, cover->img_width,
cover->img_height, GDK_INTERP_NEAREST);
- gnome_canvas_item_set(cover->cdimage, "pixbuf", imgbuf);
+ gnome_canvas_item_set(cover->cdimage, "pixbuf", imgbuf, NULL);
cover->track = track;
}
}
@@ -557,7 +557,7 @@
else
scroll_covers (IMG_PREV);
- //debug_albums();
+ /* debug_albums(); */
}
/**
@@ -737,10 +737,13 @@
for (i = 0; i < IMG_TOTAL; i++)
{
+ GdkPixbuf *buf2;
/* Reset the pixbuf */
cover = g_ptr_array_index(cdwidget->cdcovers, i);
- buf = gdk_pixbuf_scale_simple(buf, cover->img_width,
cover->img_height, GDK_INTERP_NEAREST);
- gnome_canvas_item_set(cover->cdimage, "pixbuf", buf);
+ buf2 = gdk_pixbuf_scale_simple(buf, cover->img_width,
cover->img_height, GDK_INTERP_NEAREST);
+ gnome_canvas_item_set(cover->cdimage, "pixbuf", buf2, NULL);
+
+ g_object_unref (buf2);
/* Reset track list too */
cover->track = NULL;
@@ -880,7 +883,7 @@
* Initialise the boxes and canvases of the coverart_display.
*
*/
-void coverart_init_display ()
+static void coverart_init_display ()
{
GtkWidget *gtkpod_window;
GtkWidget *podpane;
@@ -954,6 +957,9 @@
Cover_Item *cover = NULL;
GtkWidget *cover_window;
Itdb_Track *track;
+
+ /* initialize display if not already done */
+ if (!cdwidget) coverart_init_display();
cover_window = gtkpod_xml_get_widget (main_window_xml,
"cover_display_window");
/* Check the preference has been set */
@@ -1029,7 +1035,7 @@
/* Set the scale range */
gtk_range_set_range (GTK_RANGE (cdwidget->cdslider), 0, g_list_length
(cdwidget->displaytracks) - 1);
- //printf("######### ORIGINAL LINE UP ########\n");
- //debug_albums ();
- //printf("######### END OF ORIGINAL LINE UP #######\n");
+ /*printf("######### ORIGINAL LINE UP ########\n");
+ debug_albums ();
+ printf("######### END OF ORIGINAL LINE UP #######\n");*/
}
Index: main.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/main.c,v
retrieving revision 1.58.2.2
retrieving revision 1.58.2.3
diff -u -d -r1.58.2.2 -r1.58.2.3
--- main.c 8 Jan 2007 21:45:34 -0000 1.58.2.2
+++ main.c 8 Jan 2007 21:47:07 -0000 1.58.2.3
@@ -123,23 +123,12 @@
gtkpod_window = gtkpod_xml_get_widget (main_window_xml, "gtkpod");
init_prefs(argc, argv);
-<<<<<<< main.c
init_default_file (argv[0]);
display_create ();
-=======
-
- display_create ();
-
- init_default_file (argv[0]);
-
- if (prefs_get_int("display_artcovers"))
- coverart_init_display ();
-
->>>>>>> 1.58.2.1
- gtk_widget_show (gtkpod_window);
+ gtk_widget_show (gtkpod_window);
init_data (gtkpod_window); /* setup base data */
Index: display.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display.c,v
retrieving revision 1.149
retrieving revision 1.149.2.1
diff -u -d -r1.149 -r1.149.2.1
--- display.c 24 Jun 2006 15:39:22 -0000 1.149
+++ display.c 8 Jan 2007 21:47:07 -0000 1.149.2.1
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-25 00:22:56 jcs>
+/* Time-stamp: <2007-01-04 19:37:09 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -96,6 +96,7 @@
gtkpod_statusbar_init ();
gtkpod_tracks_statusbar_init ();
gtkpod_space_statusbar_init ();
+
/* set the menu item for the info window correctly */
/* CAREFUL: must be done after calling ..._space_statusbar_init() */
display_set_info_window_menu ();
Index: display_coverart.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/Attic/display_coverart.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- display_coverart.h 8 Jan 2007 21:08:44 -0000 1.1.2.1
+++ display_coverart.h 8 Jan 2007 21:47:07 -0000 1.1.2.2
@@ -49,7 +49,6 @@
} CD_Widget;
void init_default_file (gchar *progpath);
-void coverart_init_display ();
void coverart_set_images (GList *tracks);
#endif
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2