Revision: 1687
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1687&view=rev
Author:   phantom_sf
Date:     2007-08-26 04:31:53 -0700 (Sun, 26 Aug 2007)

Log Message:
-----------
2007-08-26 P.G. Richardson <phantom_sf at users.sourceforge.net>

  * src/fetchcover.c
  * src/fetchcover.h
  * src/display_coverart.c
  * src/details.c
  * src/context_menus.c
  * gtkpod.glade
  
  Commented out fetchcover due to licensing problems. Wiil re-enable
  once a new approach has been fully considered.

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog_detailed
    gtkpod/trunk/data/gtkpod.glade
    gtkpod/trunk/src/context_menus.c
    gtkpod/trunk/src/details.c
    gtkpod/trunk/src/display_coverart.c
    gtkpod/trunk/src/fetchcover.c
    gtkpod/trunk/src/fetchcover.h

Property Changed:
----------------
    gtkpod/trunk/
    gtkpod/trunk/data/


Property changes on: gtkpod/trunk
___________________________________________________________________
Name: svn:ignore
   - .cdtproject
.project
.settings
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
intltool-*
missing
mkinstalldirs
stamp-h.in
stamp-h1
ylwrap

   + .cdtproject
.project
.settings
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
intltool-*
missing
mkinstalldirs
stamp-h.in
stamp-h1
ylwrap
.cproject


Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed     2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/ChangeLog_detailed     2007-08-26 11:31:53 UTC (rev 1687)
@@ -1,3 +1,15 @@
+2007-08-26 P.G. Richardson <phantom_sf at users.sourceforge.net>
+
+  * src/fetchcover.c
+  * src/fetchcover.h
+  * src/display_coverart.c
+  * src/details.c
+  * src/context_menus.c
+  * gtkpod.glade
+  
+  Commented out fetchcover due to licensing problems. Wiil re-enable
+  once a new approach has been fully considered.
+
 2007-08-25 Jorg Schuler <jcsjcs at users.sourceforge.net>
 
        * src/misc_track.c (gp_track_by_filename): stop iteration when


Property changes on: gtkpod/trunk/data
___________________________________________________________________
Name: svn:ignore
   - Makefile.in.in
Makefile.in
Makefile
POTFILES
*.gmo
*.desktop

   + Makefile.in.in
Makefile.in
Makefile
POTFILES
*.gmo
*.desktop
nocover_found.png


Modified: gtkpod/trunk/data/gtkpod.glade
===================================================================
--- gtkpod/trunk/data/gtkpod.glade      2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/data/gtkpod.glade      2007-08-26 11:31:53 UTC (rev 1687)
@@ -14414,7 +14414,7 @@
                    </packing>
                  </child>
 
-                 <child>
+                 <!--child>
                    <widget class="GtkButton" id="details_button_fetch_cover">
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
@@ -14490,7 +14490,7 @@
                      <property name="expand">False</property>
                      <property name="fill">False</property>
                    </packing>
-                 </child>
+                 </child-->
 
                  <child>
                    <widget class="GtkButton" 
id="details_button_remove_artwork">

Modified: gtkpod/trunk/src/context_menus.c
===================================================================
--- gtkpod/trunk/src/context_menus.c    2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/src/context_menus.c    2007-08-26 11:31:53 UTC (rev 1687)
@@ -1062,7 +1062,9 @@
            break;
        case CM_CAD:
                        add_get_cover_from_file (menu);
+                       /* Commented out due to licensing problems
                        add_get_cover_from_web (menu);
+                       */
                        add_display_big_coverart (menu);
                        add_edit_track_details (menu);
                        break;

Modified: gtkpod/trunk/src/details.c
===================================================================
--- gtkpod/trunk/src/details.c  2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/src/details.c  2007-08-26 11:31:53 UTC (rev 1687)
@@ -1607,11 +1607,12 @@
                      G_CALLBACK (details_button_set_artwork_clicked),
                      detail);
 
+    /* Commented out due to licensing problems
                w = gtkpod_xml_get_widget (detail->xml, 
"details_button_fetch_cover");
     g_signal_connect (w, "clicked",
                        G_CALLBACK (on_fetchcover_fetch_button),
           detail);
-               
+               */
     w = gtkpod_xml_get_widget (detail->xml, "details_button_remove_artwork");
     g_signal_connect (w, "clicked",
                      G_CALLBACK (details_button_remove_artwork_clicked),

Modified: gtkpod/trunk/src/display_coverart.c
===================================================================
--- gtkpod/trunk/src/display_coverart.c 2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/src/display_coverart.c 2007-08-26 11:31:53 UTC (rev 1687)
@@ -1924,24 +1924,16 @@
  */
 void coverart_set_cover_from_web ()
 {
+       /* Commented out due to licensing problems
        GList *tracks;
        Cover_Item *cover;
        
        cover = g_ptr_array_index(cdwidget->cdcovers, IMG_MAIN);
        tracks = cover->album->tracks;
        
-       /*
-       int i;
-       for (i = 0; i < g_list_length (tracks); ++i)
-       {
-               Track *trk = g_list_nth_data(tracks, i);
-               printf ("Track: %s-%s\n", trk->artist, trk->album);
-       }
-       */
-       
-       /* Nullify and free the album art pixbuf so that it will pick it up
+       * Nullify and free the album art pixbuf so that it will pick it up
         * from the art assigned to the tracks
-        */
+        *
         if (cover->album->albumart)
         {
                gdk_pixbuf_unref (cover->album->albumart);
@@ -1951,4 +1943,5 @@
        on_coverart_context_menu_click (tracks);
        
        set_covers (FALSE);
+       */
 }

Modified: gtkpod/trunk/src/fetchcover.c
===================================================================
--- gtkpod/trunk/src/fetchcover.c       2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/src/fetchcover.c       2007-08-26 11:31:53 UTC (rev 1687)
@@ -34,7 +34,8 @@
 #include "display_coverart.h"
 #include <glib/gprintf.h>
 #include <glib/gstdio.h>
-       
+
+/* Commented out due to licensing problems
 #undef FETCHCOVER_DEBUG
        
 static void fetchcover_statusbar_update (gchar *message);
@@ -49,24 +50,24 @@
        gchar *filename;
 } Fetch_Cover;
        
-/* Track to search for a cover for */
+**** Track to search for a cover for ***
 static Track *fetchcover_track = NULL;
-/* List of possible covers, including existing one (maybe default cover) */
+**** List of possible covers, including existing one (maybe default cover) ***
 static GList *fetchcover_image_list = NULL;
-/* Index for controlling which cover image to display */
+**** Index for controlling which cover image to display ***
 static gint displayed_cover_index = 0;
-/* Pointer to the currently displayed cover */
+**** Pointer to the currently displayed cover ***
 static Fetch_Cover *displayed_cover;
-/* Canvas widget for display of cover */
+**** Canvas widget for display of cover ***
 static GnomeCanvas *fetchcover_canvas;
-/* Canvas Item widget for mounting the cover pixbuf on */
+**** Canvas Item widget for mounting the cover pixbuf on ***
 static GnomeCanvasItem *fetchcover_canvasitem;
-/* Previous and Next buttons for cycling images */
+**** Previous and Next buttons for cycling images ***
 static GtkWidget *next_button;
 static GtkWidget *prev_button;
-/* Status bar for displaying status messages */
+**** Status bar for displaying status messages ***
 static GtkWidget *fetchcover_statusbar;
-/* Flag indicating whether a new net search should be initiated */
+**** Flag indicating whether a new net search should be initiated ***
 static gboolean netsearched = FALSE;
        
 #define IMGSCALE 256
@@ -75,7 +76,7 @@
        
        #include <curl/curl.h>
        
-       /* Declarations */
+       **** Declarations ***
        static void free_fetchcover_list();
        static void *safe_realloc(void *ptr, size_t size);
        static size_t curl_write_fetchcover_func(void *ptr, size_t itemsize, 
size_t numitems, void *data);
@@ -85,7 +86,7 @@
        static void fetchcover_prev_button_clicked (GtkWidget *widget, gpointer 
data);
        static void fetchcover_cleanup();
        static gchar *fetchcover_save (GtkWindow *parent);
-       /* Display a dialog explaining the options if a file with the proposed 
name already exists */
+       **** Display a dialog explaining the options if a file with the 
proposed name already exists ***
        static gchar *display_file_exist_dialog (gchar *filename, GtkWindow 
*parent);
        
        struct chunk
@@ -94,17 +95,17 @@
                size_t size;
        };
        
-       /* Data structure for use with curl */
+       **** Data structure for use with curl ***
        struct chunk fetchcover_curl_data;
        
-       /**
+       *****
         * safe_realloc:
         *
         * @void: ptr
         * @size_t: size
         *
         * Memory allocation function
-        */
+        ***
        static void *safe_realloc(void *ptr, size_t size)
        {
                if (ptr)
@@ -113,7 +114,7 @@
                        return malloc(size);
        }
        
-       /**
+       *****
         * 
         * curl_write_fetchcover_func:
         * 
@@ -125,7 +126,7 @@
         * Curl writing function
         * 
         * @Return size_t
-        */
+        ***
        static size_t curl_write_fetchcover_func(void *ptr, size_t itemsize, 
size_t numitems, void *data)
        {
                size_t size = itemsize * numitems;
@@ -141,30 +142,30 @@
                return size;
        }
                        
-       /**
+       *****
         * net_search_track:
         *
         * Use Amazon to locate an XML file containing links to
         * cover pictures consistent with track artist and album
-        */
+        ***
        static void net_search_track ()         
        {               
-               /* This key for Amazon web services belongs to Charlie Head */
+               **** This key for Amazon web services belongs to Charlie Head 
***
                const gchar amazonkey[21] = "10K4YZTZFS562NG7EZR2";
                        
-               /* possible internationalization: support
+               **** possible internationalization: support
                 * different tld's (ja, fr, ca, etc.) - Amarok does this.
                 * we assume a lot here.. may not work
                 * for some international artists? --chead
-                */
+                ***
                 
-                /* Create the url string and insert the artist and album */
+                **** Create the url string and insert the artist and album ***
                GString *url = g_string_new (NULL);
                g_string_printf(url,
                        
"http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=%s&KeywordSearch=%s+%s&mode=music&type=lite&locale=us&page=1&f=xml";,
                        amazonkey, fetchcover_track->artist, 
fetchcover_track->album);
                
-               /* Replace any spaces in the url string with +s instead */
+               **** Replace any spaces in the url string with +s instead ***
                gint i;
                for (i = 0; i < url->len; i++)
                {
@@ -177,7 +178,7 @@
                fetchcover_curl_data.memory = NULL;
                fetchcover_curl_data.size = 0;
        
-               /* Use curl to perform the internet search */   
+               **** Use curl to perform the internet search ***        
                CURL *curl;     
                curl_global_init(CURL_GLOBAL_ALL);
                curl = curl_easy_init();
@@ -189,9 +190,9 @@
                curl_easy_cleanup(curl);
                g_string_free(url, TRUE);
                
-               /* Check whether curl received some hits.
+               **** Check whether curl received some hits.
                 * If not return
-                */
+                ***
                if (!fetchcover_curl_data.memory || fetchcover_curl_data.size 
<= 0)
                {
                        fetchcover_statusbar_update (_("Failed to find any 
covers for track"));
@@ -204,12 +205,12 @@
                        return;
                }
                
-               /* Curl net search successful so process the results */
+               **** Curl net search successful so process the results ***
                xmlDocPtr doc;
                xmlNodePtr cur;
                xmlChar *key;
        
-               /* Process the data by parsing the XML and return if cannot 
parse */            
+               **** Process the data by parsing the XML and return if cannot 
parse ***         
                if ((doc = xmlReadMemory(fetchcover_curl_data.memory, 
fetchcover_curl_data.size, "amazon.xml", NULL, 0)) == NULL)
                {
                        fetchcover_statusbar_update (_("Parsing failure on 
processing of possible track covers"));
@@ -222,7 +223,7 @@
                        return;
                }
        
-               /* XML parsed ok so try and get the root element */
+               **** XML parsed ok so try and get the root element ***
                if ((cur = xmlDocGetRootElement(doc)) == NULL)
                {
                        fetchcover_statusbar_update (_("Downloaded XML file 
appears to be empty. No covers found for track"));
@@ -236,9 +237,9 @@
                        return;
                }
        
-               /* Wind down through the XML nodes to obtain the urls
+               **** Wind down through the XML nodes to obtain the urls
                 * to the returned album covers
-                */
+                ***
                Fetch_Cover *fcover;            
                cur = cur->xmlChildrenNode;
                while (cur != NULL)
@@ -251,7 +252,7 @@
                                        if ((!xmlStrcmp(details->name, (const 
xmlChar*)"ImageUrlLarge")))
                                        {
                                                key = xmlNodeListGetString 
(doc, details->xmlChildrenNode, 1);
-                                               /* Create a fetchcover object 
and then add it to the list */
+                                               **** Create a fetchcover object 
and then add it to the list ***
                                                fcover = g_new0(Fetch_Cover, 1);
                                                fcover->url = g_string_new 
((gchar*) key);
                                                fcover->image = NULL;           
                        
@@ -266,7 +267,7 @@
                        
                xmlFreeDoc(doc);
        
-               /* Clean up the curl data */
+               **** Clean up the curl data ***
                if (fetchcover_curl_data.memory)
                {
                        g_free(fetchcover_curl_data.memory);
@@ -274,7 +275,7 @@
                        fetchcover_curl_data.size = 0;
                }
        
-               /* Check whether the XML served up any cover images */  
+               **** Check whether the XML served up any cover images ***       
                if (g_list_length (fetchcover_image_list) == 1)
                {
                        fetchcover_debug("fetchcover_next: no covers found\n");
@@ -291,7 +292,7 @@
                return;
        }
        
-       /**
+       *****
         * net_retrieve_image:
         *
         * @GString: url
@@ -299,7 +300,7 @@
         * Use the url acquired from the net search to fetch the image,
         * save it to a file inside the track's parent directory then display
         * it as a pixbuf
-        */
+        ***
        static gboolean net_retrieve_image (GString *url)
        {
                gchar *path = NULL;
@@ -309,7 +310,7 @@
                fetchcover_curl_data.size = 0;
                fetchcover_curl_data.memory = NULL;
                
-               /* Use curl to retrieve the data from the net */
+               **** Use curl to retrieve the data from the net ***
                CURL *curl;     
                curl_global_init(CURL_GLOBAL_ALL);
                curl = curl_easy_init();
@@ -327,7 +328,7 @@
                        return FALSE;
                }
        
-               /* Check that the page returned is a valid web page */  
+               **** Check that the page returned is a valid web page ***       
                if (strstr(fetchcover_curl_data.memory, "<html>") != NULL)
                {
                        fetchcover_statusbar_update (_("Image appears to no 
longer exist at http location"));
@@ -353,15 +354,15 @@
                                filename = NULL;
                }
                
-               /* Check filename still equals null then take a default stance
+               **** Check filename still equals null then take a default stance
                 * to ensure the file has a name.
-                */
+                ***
                if (filename == NULL)
                        filename = "folder.jpg";
                        
-               /* Use the index position of the cover in the glist to create a 
unique filename
+               **** Use the index position of the cover in the glist to create 
a unique filename
                 * Convert the index number to a string and prefix with a dot 
(hidden file)
-                */
+                ***
                gint display_cover_index;
                display_cover_index = g_list_index (fetchcover_image_list, 
displayed_cover);    
                gchar *dcstr_index = NULL;
@@ -448,13 +449,13 @@
                return TRUE;
        }
        
-       /**
+       *****
         * fetchcover_next_button:
         *
         * Gets new image URL list if necessary,
         * downloads next image to memory,
         * shows it in a GnomeCanvas in the fetchcover_window.
-        */
+        ***
        static void fetchcover_next_button_clicked (GtkWidget *widget, gpointer 
data)
        {
                GdkWindow *window = gtk_widget_get_parent_window (widget);
@@ -466,51 +467,51 @@
                
                if (netsearched == FALSE)
                {
-                       /* Function that does the initial XML download of the 
file locations */
+                       **** Function that does the initial XML download of the 
file locations ***
                        net_search_track ();
                        netsearched = TRUE;
                        GtkWidget *fwdimg = gtk_image_new_from_stock 
(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
-                       /* Set the default width of the image to match that 
which is already displayed */
+                       **** Set the default width of the image to match that 
which is already displayed ***
                        gtk_widget_set_size_request (fwdimg, 60, -1);
                        gtk_button_set_image (GTK_BUTTON(next_button), fwdimg);
                        gtk_button_set_use_stock (GTK_BUTTON(next_button), 
TRUE);
                }
                
-               /* Whether net search this time or not, should be another image 
to display
+               **** Whether net search this time or not, should be another 
image to display
                 * to get this far.
-                */
+                ***
                
-               /* Increase the index by 1 */
+               **** Increase the index by 1 ***
                displayed_cover_index++;
                                
-               /* fetchcover_image_list has a valid entry so do a couple of 
tests*/
+               **** fetchcover_image_list has a valid entry so do a couple of 
tests ***
                if (displayed_cover_index >= 
(g_list_length(fetchcover_image_list) - 1))
                {
-                       /* Something went awry so make
+                       **** Something went awry so make
                         * the index of the last cover in the list
-                        */
+                        ***
                        displayed_cover_index = 
g_list_length(fetchcover_image_list) - 1;
-                       /* stop anymore button presses if last in the list */
+                       **** stop anymore button presses if last in the list ***
                        gtk_widget_set_sensitive (next_button, FALSE);
                }
                        
                if (displayed_cover_index > 0)
                {
-                       /* enable prev button if not first in list */
+                       **** enable prev button if not first in list ***
                        gtk_widget_show (prev_button);
                        gtk_widget_set_sensitive (prev_button, TRUE);
                }
                        
-               /* Set the displayed cover to be the new image */       
+               **** Set the displayed cover to be the new image ***    
                displayed_cover = g_list_nth_data (fetchcover_image_list, 
displayed_cover_index);
                
                GdkPixbuf *scaled;
-               /* If the image has not been retrieved then get it from the net 
*/
+               **** If the image has not been retrieved then get it from the 
net ***
                if (displayed_cover->image == NULL)
                {
                        if (! net_retrieve_image (displayed_cover->url) || 
displayed_cover->image == NULL)
                        {
-                               /* XML file downloaded ok but image could not 
be retrieved */
+                               **** XML file downloaded ok but image could not 
be retrieved ***
                                gnome_canvas_item_hide (fetchcover_canvasitem);
                                gdk_window_set_cursor (window, NULL);
                                return;
@@ -526,46 +527,46 @@
                return;
        }
        
-       /**
+       *****
         * fetchcover_prev_button:
         *
         * Gets previous image and shows
         * it in a GnomeCanvas in the fetchcover_window.
-        */
+        ***
        static void fetchcover_prev_button_clicked (GtkWidget *widget, gpointer 
data)
        {
-               /* decrease the index by 1 */
+               **** decrease the index by 1 ***
                displayed_cover_index--;
                
                fetchcover_statusbar_update ("");
                
                if (displayed_cover_index <= 0)
                {
-                       /* Something went awry so make the index
+                       **** Something went awry so make the index
                         * the index of the first cover in the list
-                        */
+                        ***
                        displayed_cover_index = 0;
-                       /* stop anymore prev button press if first in the list 
*/
+                       **** stop anymore prev button press if first in the 
list ***
                        gtk_widget_set_sensitive (prev_button, FALSE);
                }
                        
-               /* fetchcover_image_list has a valid entry so do a couple of 
tests*/
+               **** fetchcover_image_list has a valid entry so do a couple of 
tests ***
                if (displayed_cover_index < 
(g_list_length(fetchcover_image_list) - 1))
                {
-                       /* stop anymore button presses if last in the list */
+                       **** stop anymore button presses if last in the list ***
                        gtk_widget_set_sensitive (next_button, TRUE);
                }       
                        
-               /* Set the displayed cover to be the new image */       
+               **** Set the displayed cover to be the new image ***
                displayed_cover = g_list_nth_data (fetchcover_image_list, 
displayed_cover_index);
                
                GdkPixbuf *scaled;
-               /* If the image has not been retrieved then get it from the net 
*/
+               **** If the image has not been retrieved then get it from the 
net ***
                if (displayed_cover->image == NULL)
                {
                        if (! net_retrieve_image (displayed_cover->url) || 
displayed_cover->image == NULL)
                        {
-                               /* XML file downloaded ok but image could not 
be retrieved */
+                               **** XML file downloaded ok but image could not 
be retrieved ***
                                gnome_canvas_item_hide (fetchcover_canvasitem);
                                return;
                        }
@@ -579,7 +580,7 @@
                return;
        }
        
-       /**
+       *****
         * fetchcover_save:
         * 
         * @Detail: detail
@@ -590,25 +591,25 @@
         * 
         * Returns:
         * Filename of chosen cover image file
-        */
+        ***
        gchar *fetchcover_save (GtkWindow *parent)
        {
                gchar *newname = NULL;
-               /* The default cover image will have both dir and filename set
+               **** The default cover image will have both dir and filename set
                 * to null because no need to save because it is already saved 
(!!)
                 * Thus, this whole process is avoided. Added bonus that 
pressing
                 * save by accident if, for instance, no images are found means 
the
                 * whole thing safely completes
-                */
+                ***
                if (displayed_cover->dir && displayed_cover->filename)
                {
-                       /* path is valid so first move the file to be the 
folder.jpg or 
+                       **** path is valid so first move the file to be the 
folder.jpg or 
                         * whatever is the preferred preference
-                        */
+                        ***
                        
-                       /* Split the existing filename to remove the prefix */
+                       **** Split the existing filename to remove the prefix 
***
                        gchar **fname_items = 
g_strsplit(displayed_cover->filename, "[EMAIL PROTECTED]", 2);
-                       /* Assign the filename ready to rename the file */
+                       **** Assign the filename ready to rename the file ***
                        newname = g_build_filename(displayed_cover->dir, 
fname_items[1], NULL);
                        fetchcover_debug("New name of file is %s\n", newname);
        
@@ -619,21 +620,21 @@
                                        break;
                        }
                        
-                       /* Carry the nullified value back to the original 
called so the
+                       **** Carry the nullified value back to the original 
called so the
                         * entire fetchcover process can be cancelled
-                        */
+                        ***
                        if (newname == NULL)
                                return NULL;
                        
                        gchar *oldname = g_build_filename(displayed_cover->dir, 
displayed_cover->filename, NULL);
-                       /* Rename the preferred choice, ie. [EMAIL PROTECTED], 
to the preferred name, 
+                       **** Rename the preferred choice, ie. [EMAIL 
PROTECTED], to the preferred name, 
                         * ie. After_Forever.jpg.
-                        */
+                        ***
                        g_rename (oldname, newname);
                        
-                       /* Tidy up to ensure the path will not get cleaned up
+                       **** Tidy up to ensure the path will not get cleaned up
                         * by fetchcover_clean_up
-                        */
+                        ***
                        g_free (oldname);
                        g_strfreev(fname_items);
                        g_free (displayed_cover->dir);
@@ -645,7 +646,7 @@
        }
 
 #endif
-/* HAVE_CURL */
+**** HAVE_CURL ***
        
 static gchar *display_file_exist_dialog (gchar *filename, GtkWindow *parent)
 {
@@ -674,7 +675,7 @@
                                   
        label = gtk_label_new (message);
           
-       /* Add the label, and show everything we've added to the dialog. */
+       **** Add the label, and show everything we've added to the dialog. ***
   gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label);
                                
        gtk_widget_show_all (dialog);   
@@ -684,18 +685,18 @@
        switch (result)
        {
                case GTK_RESPONSE_REJECT:
-               /* Cancel has been clicked so no save */
+               **** Cancel has been clicked so no save ***
                        gtk_widget_destroy (dialog);
                        return NULL;
                case GTK_RESPONSE_YES:
-                       /* Yes clicked so overwrite the file is okay. Leave 
final_filename intact
+                       **** Yes clicked so overwrite the file is okay. Leave 
final_filename intact
                         * and remove the original
-                        */
+                        ***
                        g_remove (filename);
                        gtk_widget_destroy (dialog);
                        return filename;
                case GTK_RESPONSE_NO:
-                       /* User doesn't want to overwrite anything so need to 
do some work on filename */
+                       **** User doesn't want to overwrite anything so need to 
do some work on filename ***
                        splitarr = g_strsplit (filename, ".", 0);
                        basename = splitarr[0];
                                
@@ -704,7 +705,7 @@
                                g_sprintf (filename, "%s%d.jpg", basename, i);
                        }
                                
-                       /* Should have found a filename that really doesn't 
exist so this needs to be returned */
+                       **** Should have found a filename that really doesn't 
exist so this needs to be returned ***
                        basename = NULL;
                        g_strfreev(splitarr);
                        gtk_widget_destroy (dialog);
@@ -716,13 +717,13 @@
        }       
 }
        
-/**
+*****
  * free_fetchcover:
  * 
  * @Fetch_Cover: fcover
  * 
  * Free the elements of the passed in Fetch_Cover structure
- */
+ ***
 static void free_fetchcover (Fetch_Cover *fcover)
 {
        if (! fcover)
@@ -747,13 +748,13 @@
 }
        
 
-/**
+*****
  * free_fetchcover_list:
  *
  * Nullify all the urls in the url list as part of
  * cleaning up.
  * 
- */
+ ***
 static void free_fetchcover_list()
 {
        fetchcover_debug("free_fetchcover_list");
@@ -770,11 +771,11 @@
 }
        
 
-/**
+*****
  * fetchcover_cleanup:
  *
  * Cleanup fetchcover bits and pieces
- */
+ ***
 static void fetchcover_cleanup()
 {      
        #ifdef HAVE_CURL
@@ -785,18 +786,18 @@
                        fetchcover_curl_data.size = 0;
                }
        #endif
-       /* CURL */
+       **** CURL ***
        free_fetchcover_list();
 }
        
 
-/**
+*****
  * fetchcover_display_dialog:
  *
  * Create fetchcover_window, get album cover from Amazon
  *
  * @track: track to look up images for
- */
+ ***
 static GtkDialog *fetchcover_display_dialog (Track *track, Itdb_Device 
*device, GtkWindow *parent)
 {
        GnomeCanvasItem *art_border;
@@ -808,7 +809,7 @@
        g_return_val_if_fail (track, NULL);
        g_return_val_if_fail (device, NULL);
                
-       /* Enable searching of internet for images */           
+       **** Enable searching of internet for images ***                
        netsearched = FALSE;
        
        fetchcover_xml = glade_xml_new (xml_file, "fetchcover_dialog", NULL);
@@ -823,28 +824,28 @@
                imgbuf = gdk_pixbuf_new_from_file(etd->thumb_path_locale, 
&error);
                if (error != NULL)
                {
-                       /* Artwork failed to load from file so try loading 
default */
+                       **** Artwork failed to load from file so try loading 
default ***
                        imgbuf = coverart_get_track_thumb (track, device, 
IMGSCALE);
                        g_error_free (error);
                }
        }
        else
        {
-               /* No thumb path available, fall back to getting the small 
thumbnail
+               **** No thumb path available, fall back to getting the small 
thumbnail
                 * and if that fails, the default thumbnail image.
-                */
+                ***
                imgbuf = coverart_get_track_thumb (track, device, IMGSCALE);
        }
                
-       /* Add the cover to the image list */
+       **** Add the cover to the image list ***
        displayed_cover = g_new0 (Fetch_Cover, 1);
        displayed_cover->url = g_string_new ("default");
-       /* No need to set the path for saving later as if this cover is 
selected:
+       **** No need to set the path for saving later as if this cover is 
selected:
         * a) There is an image cover already set to the template name so no 
need to save
         * b) There is no image cover so default ? is showing and again no save 
necessary
         *
         * Avoid saving by checking where url is "default"
-        */
+        ***
        displayed_cover->dir = NULL;
        displayed_cover->filename = NULL;
        displayed_cover->image = gdk_pixbuf_scale_simple (imgbuf, IMGSCALE, 
IMGSCALE, GDK_INTERP_NEAREST);
@@ -855,7 +856,7 @@
                        
        fetchcover_debug("fetchcover_display_window: loaded cover file");
                
-       /* Create the image cover canvas */
+       **** Create the image cover canvas ***
        fetchcover_canvas = GNOME_CANVAS (gnome_canvas_new());
        gtk_widget_set_size_request (GTK_WIDGET(fetchcover_canvas), IMGSCALE, 
IMGSCALE);
        gnome_canvas_set_scroll_region (fetchcover_canvas, 0.0, 0.0, IMGSCALE, 
IMGSCALE);
@@ -868,12 +869,12 @@
                            "height", (double) IMGSCALE,
                                        NULL);
                
-       /* Apply the image cover to the canvas */
+       **** Apply the image cover to the canvas ***
        gnome_canvas_item_set ( fetchcover_canvasitem,
                                        "pixbuf", displayed_cover->image,
                                        NULL);
                
-       /* Create the canvas border */
+       **** Create the canvas border ***
        art_border = gnome_canvas_item_new(
                                        gnome_canvas_root(fetchcover_canvas),
                            gnome_canvas_rect_get_type(),
@@ -887,12 +888,12 @@
                
        gnome_canvas_item_raise_to_top (art_border);
                
-       /* Add canvas to horizontal box */
+       **** Add canvas to horizontal box ***
        canvasbutton_hbox = GTK_BOX (gtkpod_xml_get_widget (fetchcover_xml, 
"canvasbutton_hbox"));
        gtk_widget_set_size_request (GTK_WIDGET(canvasbutton_hbox), IMGSCALE + 
150, IMGSCALE + 20);
        gtk_box_pack_start_defaults ( canvasbutton_hbox, GTK_WIDGET 
(fetchcover_canvas));
                
-       /* Assign the status message bar */
+       **** Assign the status message bar ***
        fetchcover_statusbar = gtkpod_xml_get_widget (fetchcover_xml, 
"fetchcover_statusbar");
                        
        fetchcover_track = track;
@@ -907,7 +908,7 @@
                g_signal_connect (G_OBJECT(prev_button), "clicked",
                              G_CALLBACK(fetchcover_prev_button_clicked), 
NULL);        
                
-               /* Check there are valid values for artist and album, otherwise 
disable everything */
+               **** Check there are valid values for artist and album, 
otherwise disable everything ***
                if (fetchcover_track->artist == NULL || fetchcover_track->album 
== NULL)
                {
                        gtk_widget_set_sensitive (next_button, FALSE);
@@ -926,7 +927,7 @@
                gtk_widget_set_sensitive (prev_button, FALSE);
                fetchcover_statusbar_update (_("This function is not available. 
You must compile the gtkpod source together with the curl library."));
        #endif
-       /* HAVE_CURL */
+       **** HAVE_CURL ***
                        
        gtk_widget_show_all (fetchcover_dialog);
        gtk_widget_hide (prev_button);
@@ -936,13 +937,13 @@
        return GTK_DIALOG(fetchcover_dialog);
 }
        
-/**
+*****
  * fetchcover_debug:
  *
  * Print debug messages for debugging purposes
  *
  * @format of messages and message string
- */
+ ***
 static void fetchcover_debug(const gchar *format, ...)
 {
        #ifdef FETCHCOVER_DEBUG
@@ -956,13 +957,13 @@
        #endif
        }
        
-/**
+*****
  * fetchcover_statusbar_update:
  * 
  * @gchar*: messagel
  *
  * Display a message in the status bar component of the dialog
- */
+ ***
 static void fetchcover_statusbar_update (gchar *message)
 {
        if (fetchcover_statusbar)
@@ -973,13 +974,13 @@
 }
        
        
-/**
+*****
  * on_coverart_context_menu_click:
  *
  * @Track: track
  *
  * Callback. Start cover selection from CoverArt Display's context menu.
- */
+ ***
 void on_coverart_context_menu_click (GList *tracks)
 {
        Track *track;
@@ -1023,12 +1024,12 @@
                        break;
                }
        #endif 
-       /* HAVE_CURL */
+       **** HAVE_CURL ***
                
         fetchcover_cleanup();
 }
        
-/**
+*****
  * fetchcover_fetch_button:
  *
  * @widget: widget
@@ -1036,7 +1037,7 @@
  *
  * Callback. Start cover selection.
  * Called when "Fetch Cover..." clicked from details_window.
- */
+ ***
 void on_fetchcover_fetch_button (GtkWidget *widget, gpointer data)
 {
        gint result;
@@ -1093,6 +1094,8 @@
                                break;
                }
        #endif
-       /* HAVE_CURL */         
+       **** HAVE_CURL ***              
        fetchcover_cleanup();
 }
+End of commenting out due to licensing problems
+*/

Modified: gtkpod/trunk/src/fetchcover.h
===================================================================
--- gtkpod/trunk/src/fetchcover.h       2007-08-25 03:20:11 UTC (rev 1686)
+++ gtkpod/trunk/src/fetchcover.h       2007-08-26 11:31:53 UTC (rev 1687)
@@ -41,8 +41,8 @@
 #include "display_coverart.h"
 #include "prefs.h"
 
-
+/* /* Commented out due to licensing problems
 void on_coverart_context_menu_click (GList *tracks);
 void on_fetchcover_fetch_button (GtkWidget *widget, gpointer data);
-
+*/
 #endif


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to