Re: [Muine] NEW PRELEASE: 0.8.1pre1
- From: Jorn Baayen <jbaayen gnome org>
- To: Andrew Dolgov <cthulhoo gmail com>
- Cc: muine-list gnome org
- Subject: Re: [Muine] NEW PRELEASE: 0.8.1pre1
- Date: Sat, 22 Jan 2005 19:05:14 +0200
Hi,
Thanks for the patches. I'll probably solve them in a slightly different
way though. Attaching a revised metadata.c patch, could you verify that
it does the job for you?
Cheers,
Jorn
�el kenal p�al (laup�, 22. jaanuar 2005, 19:32+0300), kirjutas
Andrew Dolgov:
> On Sat, 22 Jan 2005 16:23:46 +0200, Jorn Baayen <jbaayen gnome org> wrote:
>
> > > > For now, yes. But I'll accept patches introducing a gconf key making
> > > > this behaviour optional, for poor souls like you who have their tags
> > > > etched into stone :)
>
> Attached proposed patch (against 0.8.pre1). Config.Get placement is
> probably not optimal, though.
>
> > >
> > > (...)
> > >
> > > > Again, I'll accept a patch introducing a simple ensure_track_number
> > > > function in metadata.c, which, if track_number is -1, tries to atoi ()
> > > > it from the first one or two chars from the filename.
>
> Attached.
>
> > Main purpose: The button being bigger, easier to spot and hit, as it is
> > one of the most frequently clicked buttons.
> > And personally, I don't find it ugly.
>
> I get the reasoning why the play button should be bigger, but I still
> don't like the label...
>
> I remember that older versions used to have wider icon on the play
> button, I liked that better. Well, duh. :-)
>
> _______________________________________________
> muine-list mailing list
> muine-list gnome org
> http://mail.gnome.org/mailman/listinfo/muine-list
Index: libmuine/metadata.c
===================================================================
RCS file: /cvs/gnome/muine/libmuine/metadata.c,v
retrieving revision 1.16
diff -u -r1.16 metadata.c
--- libmuine/metadata.c 22 Jan 2005 12:32:54 -0000 1.16
+++ libmuine/metadata.c 22 Jan 2005 17:00:37 -0000
@@ -92,6 +92,24 @@
metadata->track_number = atoi (raw);
}
+static void
+ensure_track_number (Metadata *metadata,
+ const char *filename)
+{
+ char *basename;
+ int num;
+
+ if (metadata->track_number > 0)
+ return;
+
+ basename = g_path_get_basename (filename);
+ num = atoi (basename);
+ g_free (basename);
+
+ if (num < 100) /* protection against strange filenames */
+ metadata->track_number = num;
+}
+
#if HAVE_ID3TAG
static int
@@ -861,6 +879,8 @@
*error_message_return = g_strdup ("Unknown format");
if (m != NULL) {
+ ensure_track_number (m, filename);
+
m->mime_type = g_strdup (info->mime_type);
m->mtime = info->mtime;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]