pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/gbemol Fix a number of annoying issues in gbemol:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e68fdcf0999
branches:  trunk
changeset: 398576:5e68fdcf0999
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Sep 03 01:29:34 2009 +0000

description:
Fix a number of annoying issues in gbemol:
- sort albums for the selector
- fix crash if authentication failed
- make authentication actually work
- be consistent in section of the config file used
Bump revision

diffstat:

 audio/gbemol/Makefile         |   3 +-
 audio/gbemol/distinfo         |   9 ++++-
 audio/gbemol/patches/patch-aa |  43 ++++++++++++++++++++++
 audio/gbemol/patches/patch-ab |  37 +++++++++++++++++++
 audio/gbemol/patches/patch-ac |  13 ++++++
 audio/gbemol/patches/patch-ad |  81 +++++++++++++++++++++++++++++++++++++++++++
 audio/gbemol/patches/patch-ae |  12 ++++++
 audio/gbemol/patches/patch-af |  14 +++++++
 audio/gbemol/patches/patch-ag |  13 ++++++
 9 files changed, 223 insertions(+), 2 deletions(-)

diffs (271 lines):

diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/Makefile
--- a/audio/gbemol/Makefile     Wed Sep 02 22:33:55 2009 +0000
+++ b/audio/gbemol/Makefile     Thu Sep 03 01:29:34 2009 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2009/08/31 12:19:38 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2009/09/03 01:29:34 joerg Exp $
 #
 
 DISTNAME=      gbemol-0.3.2
+PKGREVISION=   1
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=gbemol/}
 
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/distinfo
--- a/audio/gbemol/distinfo     Wed Sep 02 22:33:55 2009 +0000
+++ b/audio/gbemol/distinfo     Thu Sep 03 01:29:34 2009 +0000
@@ -1,5 +1,12 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/08/31 12:19:38 joerg Exp $
+$NetBSD: distinfo,v 1.2 2009/09/03 01:29:34 joerg Exp $
 
 SHA1 (gbemol-0.3.2.tar.gz) = 5c3ceab9fc4a4213db001e1e0dc27b56d4868e54
 RMD160 (gbemol-0.3.2.tar.gz) = 4cf42f5a3029338924f5501d3a648284de8c7553
 Size (gbemol-0.3.2.tar.gz) = 401865 bytes
+SHA1 (patch-aa) = c324caa5b8ff127033b5134265b2c4f24fe20981
+SHA1 (patch-ab) = 77f31e6f1e9d919690e4ae1ccdf09afeeac761c7
+SHA1 (patch-ac) = 8181d9d09000df44801a2ee33a9e3ea5059abafb
+SHA1 (patch-ad) = ccbb00334138b915d91c6a1278548a259069ead3
+SHA1 (patch-ae) = 6ee82e980a92c51e6389ce84fbffef3ebdf50f3a
+SHA1 (patch-af) = 0b8f60bc1b27b2291dc3c119e9a5cfdbbb390178
+SHA1 (patch-ag) = bed815b9797922b32a0ba499005444edfae2898f
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-aa     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-aa,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-app.c.orig      2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-app.c
+@@ -449,7 +449,7 @@ gbemol_app_init (GbemolApp* app)
+       gbemol_app_build_gui (app);
+ 
+       /* Check if there is a config file */
+-      if (!(host = gbemol_cfg_get_string ("MPD", "host")))
++      if (!(host = gbemol_cfg_get_string ("mpd", "host")))
+       {
+               app->mpd = gbemol_mpd_new_with_defaults ();
+ 
+@@ -471,13 +471,13 @@ gbemol_app_init (GbemolApp* app)
+       else 
+       {
+               /* We need a password? */
+-              if (gbemol_cfg_get_int ("MPD", "use_auth"))
+-                      pass = gbemol_cfg_get_string ("MPD", "pass");
++              if (gbemol_cfg_get_int ("mpd", "use_auth"))
++                      pass = gbemol_cfg_get_string ("mpd", "pass");
+               else
+                       pass = NULL;
+ 
+-              app->mpd = gbemol_mpd_new (host, pass, gbemol_cfg_get_int ("MPD", "port"), 
+-                              gbemol_cfg_get_double ("MPD", "timeout"));
++              app->mpd = gbemol_mpd_new (host, pass, gbemol_cfg_get_int ("mpd", "port"), 
++                              gbemol_cfg_get_double ("mpd", "timeout"));
+               g_free (host);
+               g_free (pass);
+       }
+@@ -564,10 +564,7 @@ void gbemol_app_connect_mpd (GbemolApp* 
+       if (!app->mpd)
+               return;
+ 
+-      if (gbemol_cfg_get_bool("MPD", "use_auth"))
+-              gbemol_mpd_connect_and_authenticate (app->mpd);
+-      else
+-              gbemol_mpd_connect (app->mpd);
++      gbemol_mpd_connect (app->mpd);
+ 
+       gbemol_app_set_connected (app, gbemol_mpd_is_connected (app->mpd));
+       if (gbemol_mpd_is_connected (app->mpd))
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-ab     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-ab,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-library.c.orig  2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-library.c
+@@ -21,6 +21,7 @@
+ #include "gbemol-utils.h"
+ 
+ #include <gtk/gtk.h>
++#include <string.h>
+ 
+ static GObjectClass* parent_class = NULL;
+ 
+@@ -641,7 +642,6 @@ void gbemol_library_columns_dialog (Gbem
+       gtk_widget_destroy (dlg);
+ }
+ 
+-
+ /*
+  * Populates lst with the tags
+  */
+@@ -651,6 +651,8 @@ gbemol_library_populate_constraint (Gbem
+       GtkTreeIter iter_all, iter;     
+       GtkListStore* lst = lib->priv->lst_constraint[id];
+ 
++      tags = g_list_sort(tags, (GCompareFunc)strcmp);
++
+       gtk_list_store_clear (lst);
+       
+       gtk_list_store_append (lst, &iter_all);
+@@ -671,7 +673,6 @@ gbemol_library_populate_constraint (Gbem
+                                       -1);
+               } while ((tags = g_list_next (tags)));
+       }
+-
+ }
+ 
+ void 
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-ac     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-main.c.orig     2009-09-03 03:20:21.000000000 +0200
++++ src/gbemol-main.c
+@@ -107,7 +107,7 @@ int main (int argc, char *argv[])  
+       }
+ 
+       /* Update library on start */
+-      if (gbemol_mpd_is_connected (app->mpd) && gbemol_cfg_get_int ("MPD", "update-library"))
++      if (gbemol_mpd_is_connected (app->mpd) && gbemol_cfg_get_int ("mpd", "update-library"))
+               gbemol_mpd_database_update (app->mpd, "/");
+ 
+       gtk_main();
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-ad     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,81 @@
+$NetBSD: patch-ad,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-mpd.c.orig      2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-mpd.c
+@@ -2,6 +2,7 @@
+ 
+ #include "gbemol-mpd.h"
+ #include "gbemol-marshal.h"
++#include "gbemol-utils.h"
+ 
+ /* Properties */
+ enum {
+@@ -454,51 +455,31 @@ gboolean gbemol_mpd_connect (GbemolMpd* 
+       obj->priv->conn = mpd_newConnection (obj->priv->host, obj->priv->port, obj->priv->timeout);
+       
+       if (gbemol_mpd_finish_and_handle (obj))
+-              obj->priv->connected = FALSE;
+-      else
+-      {
+-              gbemol_mpd_get_not_commands_list (obj);
+-              if (obj->status)
+-                      mpd_freeStatus (obj->status);
+-              obj->status = gbemol_mpd_get_status (obj);
+-              obj->priv->connected = TRUE;
+-              /* Emit a song-changed signal */
+-              g_signal_emit (obj, gbemol_mpd_signals [SONG_CHANGED_SIGNAL], 0, NULL);
+-      }
+-
+-      return obj->priv->connected;
+-}
+-
+-/* Connect */
+-gboolean gbemol_mpd_connect_and_authenticate (GbemolMpd* obj)
+-{
+-      if (obj->priv->conn)
+-              mpd_closeConnection (obj->priv->conn);
+-
+-      obj->priv->conn = mpd_newConnection (obj->priv->host, obj->priv->port, obj->priv->timeout);
+-      
+-      if (gbemol_mpd_finish_and_handle (obj))
+       {
+               obj->priv->connected = FALSE;
+               return FALSE;
+       }
+-      else
+-              obj->priv->connected = TRUE;
+ 
+-      /* Not authenticated, yet connected, so return TRUE, but mark as disconnected */
+-      if (!gbemol_mpd_authenticate (obj))
+-              obj->priv->connected = FALSE;
+-      else
++      if (gbemol_cfg_get_bool("mpd", "use_auth"))
+       {
+-              gbemol_mpd_get_not_commands_list (obj);
+-              if (obj->status)
+-                      mpd_freeStatus (obj->status);
+-              obj->status = gbemol_mpd_get_status (obj);
+-              /* Emit a song-changed signal */
+-              g_signal_emit (obj, gbemol_mpd_signals [SONG_CHANGED_SIGNAL], 0, NULL);
++              if (!obj->priv->pass)
++                      obj->priv->pass = gbemol_cfg_get_string("mpd", "pass");
++              if (!obj->priv->pass || !gbemol_mpd_authenticate (obj))
++              {
++                      obj->priv->connected = FALSE;
++                      return FALSE;           
++              }
+       }
+ 
+-      return TRUE;
++      gbemol_mpd_get_not_commands_list (obj);
++      if (obj->status)
++              mpd_freeStatus (obj->status);
++      obj->status = gbemol_mpd_get_status (obj);
++      obj->priv->connected = TRUE;
++      /* Emit a song-changed signal */
++      g_signal_emit (obj, gbemol_mpd_signals [SONG_CHANGED_SIGNAL], 0, NULL);
++
++      return obj->priv->connected;
+ }
+ 
+ void gbemol_mpd_disconnect (GbemolMpd *obj)
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-ae     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-mpd.h.orig      2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-mpd.h
+@@ -47,7 +47,6 @@ GbemolMpd* gbemol_mpd_new (const gchar *
+ 
+ /* Connection Methods */
+ gboolean gbemol_mpd_connect (GbemolMpd *obj);
+-gboolean gbemol_mpd_connect_and_authenticate (GbemolMpd* obj);
+ void gbemol_mpd_disconnect (GbemolMpd *obj);
+ gboolean gbemol_mpd_is_connected (GbemolMpd *obj);
+ gchar* gbemol_mpd_get_version (GbemolMpd* obj);
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-af     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-af,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-preferences.c.orig      2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-preferences.c
+@@ -522,6 +522,9 @@ gbemol_preferences_populate_outputs (Gbe
+               return;
+       l = gbemol_mpd_output_get_list (obj->app->mpd);
+ 
++      if (!l)
++              return;
++
+       do
+       {
+               out = l->data;
diff -r 9b0d0e4d99a8 -r 5e68fdcf0999 audio/gbemol/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gbemol/patches/patch-ag     Thu Sep 03 01:29:34 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2009/09/03 01:29:34 joerg Exp $
+
+--- src/gbemol-utils.c.orig    2009-04-25 04:38:51.000000000 +0200
++++ src/gbemol-utils.c
+@@ -374,7 +374,7 @@ GdkPixbuf* gbemol_get_song_image_from_id
+       gulong size = 0;
+       guchar  *data = NULL;
+ 
+-      if (!(songs_path = gbemol_cfg_get_string ("MPD", "music_dir")))
++      if (!(songs_path = gbemol_cfg_get_string ("mpd", "music_dir")))
+               return NULL;
+ 
+       path = g_strdup_printf ("%s/%s", songs_path, song->file);



Home | Main Index | Thread Index | Old Index