[girl] girl version 0.5.0



commit f7b8b6e30fa1f4d7ffd0f9c878e4c69eed5b8fee
Author: Ole Aamot <oka oka no>
Date:   Sat Nov 29 03:46:16 2014 +0100

    girl version 0.5.0

 ChangeLog          |   10 ++++++
 NEWS               |   10 ++++++
 configure          |   20 ++++++------
 configure.ac       |    2 +-
 girl.spec.in       |    3 ++
 src/girl-gui.c     |   22 ++++++++-----
 src/girl-station.c |    3 ++
 src/girl-station.h |    1 +
 src/girl.c         |   87 +++++++++++++++++++++++++++++++++++++++++++++++++--
 src/girl.h         |    2 +
 src/stations.xml   |   36 +++++++++++++++++++++
 11 files changed, 173 insertions(+), 23 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f9018d7..f5c628e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-11-29  Ole Aamot  <oka oka no>
+
+       * NEWS: girl 0.5.0 released.
+       * src/girl.c: Initial Previous Station / Next Station support
+       * src/girl-gui.c: Add Previous Station / Next Station buttons
+       * src/stations.xml: Add Radio Campus Paris (radiocampusparis.org).
+       * src/stations.xml: Add WCSB (wcsb.org).
+       * src/stations.xml: Add Radio Campus de l’Université Libre de Bruxelles (radiocampus.be).
+       * src/stations.xml: Add Coimbra University Radio (ruc.pt).
+       
 2014-11-27  Ole Aamot  <oka oka no>
 
        * AUTHORS: Add Marek Černocký (Czech translation).
diff --git a/NEWS b/NEWS
index a374cca..41d5fe8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+2014-11-29  Ole Aamot  <oka oka no>
+
+       * girl version 0.5.0 release
+       * src/girl.c: Initial Previous Station / Next Station support
+       * src/girl-gui.c: Add Previous Station / Next Station buttons
+       * src/stations.xml: Add Radio Campus Paris (radiocampusparis.org).
+       * src/stations.xml: Add WCSB (wcsb.org).
+       * src/stations.xml: Add Radio Campus de l’Université Libre de Bruxelles (radiocampus.be).
+       * src/stations.xml: Add Coimbra University Radio (ruc.pt).
+
 2014-11-27  Ole Aamot  <oka oka no>
 
        * girl version 0.4.1 release
diff --git a/configure b/configure
index faee72f..6433231 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for girl 0.4.2.
+# Generated by GNU Autoconf 2.69 for girl 0.5.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='girl'
 PACKAGE_TARNAME='girl'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='girl 0.4.2'
+PACKAGE_VERSION='0.5.0'
+PACKAGE_STRING='girl 0.5.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1324,7 +1324,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures girl 0.4.2 to adapt to many kinds of systems.
+\`configure' configures girl 0.5.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1390,7 +1390,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of girl 0.4.2:";;
+     short | recursive ) echo "Configuration of girl 0.5.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1489,7 +1489,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-girl configure 0.4.2
+girl configure 0.5.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1854,7 +1854,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by girl $as_me 0.4.2, which was
+It was created by girl $as_me 0.5.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2717,7 +2717,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='girl'
- VERSION='0.4.2'
+ VERSION='0.5.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6550,7 +6550,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by girl $as_me 0.4.2, which was
+This file was extended by girl $as_me 0.5.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6616,7 +6616,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-girl config.status 0.4.2
+girl config.status 0.5.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index cfc3ce2..303ff45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(girl, 0.4.2)
+AC_INIT(girl, 0.5.0)
 AM_INIT_AUTOMAKE([no-dist-gzip dist-xz])
 AC_CONFIG_SRCDIR([src/girl.c])
 AC_CONFIG_HEADER([config.h])
diff --git a/girl.spec.in b/girl.spec.in
index d86eece..1af54ae 100644
--- a/girl.spec.in
+++ b/girl.spec.in
@@ -76,6 +76,9 @@ rm -rf %{buildroot}
 %{_datadir}/icons/hicolor/icon-theme.cache
 
 %changelog
+* Sat Nov 29 2014 Ole Aamot - 0.5.0-1
+- Girl 0.5.0 build on Fedora Linux 21
+
 * Sat Nov 22 2014 Ole Aamot - 0.4.0-1
 - Girl 0.4.0 build on Fedora Linux 20
 
diff --git a/src/girl-gui.c b/src/girl-gui.c
index 2646bab..833e8bf 100644
--- a/src/girl-gui.c
+++ b/src/girl-gui.c
@@ -54,14 +54,6 @@
 extern GtkWidget *girl_app;
 
 GnomeUIInfo toolbar[] = {
-#if 0
-       GNOMEUIINFO_ITEM_STOCK(("Previous"),
-                              ("Go to the previous station"),
-                              on_previous_click, GTK_STOCK_GO_BACK),
-       GNOMEUIINFO_ITEM_STOCK(("Next"), ("Go to the next station"),
-                              on_next_click, GTK_STOCK_GO_FORWARD),
-       GNOMEUIINFO_SEPARATOR,
-#endif
        GNOMEUIINFO_ITEM_STOCK(("Listen"), ("Listen to selected station"),
                               on_listen_button_clicked,
                               GTK_STOCK_REFRESH),
@@ -72,6 +64,12 @@ GnomeUIInfo toolbar[] = {
                               on_stations_selector_button_clicked,
                               GTK_STOCK_PREFERENCES),
        GNOMEUIINFO_SEPARATOR,
+       GNOMEUIINFO_ITEM_STOCK(("Previous station"),
+                              ("Go to the previous station"),
+                              on_previous_click, GTK_STOCK_GO_BACK),
+       GNOMEUIINFO_ITEM_STOCK(("Next station"), ("Go to the next station"),
+                              on_next_click, GTK_STOCK_GO_FORWARD),
+       GNOMEUIINFO_SEPARATOR,
        GNOMEUIINFO_ITEM_STOCK(("About"),
                               ("About the GNOME Internet Radio Locator"),
                               about_app, GNOME_STOCK_ABOUT),
@@ -156,6 +154,8 @@ GtkWidget *create_listeners_selector(char *selected_listener_uri,
            girl_listener_load_from_file(locallistener,
                                         world_listener_xml_uri);
 
+       girl_listeners = NULL;
+
        while (listenerinfo != NULL) {
 
                label =
@@ -165,6 +165,8 @@ GtkWidget *create_listeners_selector(char *selected_listener_uri,
                listener_name = g_strdup(listenerinfo->name);
                listener_location = g_strdup(listenerinfo->location);
 
+               girl_listeners = g_list_append(girl_listeners,(GirlListenerInfo *)listenerinfo);
+
                if (label != NULL) {
                        item = gtk_menu_item_new_with_label(label);
                        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
@@ -282,6 +284,8 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
            girl_station_load_from_file(localstation,
                                        world_station_xml_filename);
 
+       girl_stations = NULL;
+
        while (stationinfo != NULL) {
 
                label =
@@ -291,6 +295,8 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
                station_name = g_strdup(stationinfo->name);
                station_location = g_strdup(stationinfo->location);
 
+               girl_stations = g_list_append(girl_stations,(GirlStationInfo *)stationinfo);
+
                if (label != NULL) {
                        item = gtk_menu_item_new_with_label(label);
                        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
diff --git a/src/girl-station.c b/src/girl-station.c
index 5d2a6cb..7d41468 100644
--- a/src/girl-station.c
+++ b/src/girl-station.c
@@ -41,6 +41,9 @@
 #endif
 
 extern GirlData *girl;
+extern GList *girl_stations;
+extern GList *girl_listeners;
+
 extern GtkWidget *girl_app;
 
 void show_error(gchar * msg)
diff --git a/src/girl-station.h b/src/girl-station.h
index d48ef41..c1195da 100644
--- a/src/girl-station.h
+++ b/src/girl-station.h
@@ -54,6 +54,7 @@ struct _GirlStationInfo {
        /*   gchar *category; */
        GirlStreamInfo *stream;
        GirlStationInfo *next;
+       GirlStationInfo *prev;
 };
 
 struct _GirlStreamInfo {
diff --git a/src/girl.c b/src/girl.c
index 5bec76b..ff1f15c 100644
--- a/src/girl.c
+++ b/src/girl.c
@@ -42,6 +42,9 @@
 #endif
 
 GirlData *girl;
+GList *girl_stations;
+GList *girl_listeners;
+
 GtkWidget *girl_app;
 GtkWidget *listeners_selector = NULL;
 GtkWidget *stations_selector = NULL;
@@ -152,14 +155,90 @@ static void cause_movement(int way)
 
 void on_previous_click(GtkWidget * a, gpointer user_data)
 {
-       cause_movement(-1);
-       on_listen_button_clicked(a, user_data);
+       GList *l = g_list_previous(girl_stations);
+       if (l != NULL) {
+               GirlStationInfo *station = l->data;
+               if (station->prev != NULL) {
+                       girl_stations->data = station->prev;
+               } else {
+                       girl_stations->data = station;
+               }
+
+               cause_movement(-1);
+               if (station != NULL) {
+                       printf("Previous Station ID: %s\n", station->id);
+                       printf("Previous Station Name: %s\n", station->name);
+                       printf("Previous Station URI: %s\n", station->stream->uri);
+                       printf("Previous Station Location: %s\n", station->location);
+
+                       girl->selected_station_uri = station->stream->uri;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_uri);
+
+                       girl->selected_station_name = station->name;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_name);
+
+                       girl->selected_station_location = station->location;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_location);
+
+                       appbar_send_msg(_("Selected %s in %s: %s"),
+                                       girl->selected_station_name,
+                                       girl->selected_station_location,
+                                       girl->selected_station_uri);
+                       
+
+                       girl_launch_helper(station->stream->uri, GIRL_STREAM_SHOUTCAST);
+               }
+       } else {
+               printf("Prev Station: At the beginning of Stations list!\n");
+       }
 }
 
 void on_next_click(GtkWidget * a, gpointer user_data)
 {
-       cause_movement(1);
-       on_listen_button_clicked(a, user_data);
+       GList *l = g_list_first(girl_stations);
+       if (l != NULL) {
+               GirlStationInfo *station = l->data;
+               if (station->next != NULL) {
+                       girl_stations->data = station->next;
+               } else {
+                       printf("Next Station: At the end of Stations list!\n");
+               }
+               cause_movement(1);
+               if (station != NULL) {
+                       printf("Next Station ID: %s\n", station->id);
+                       printf("Next Station Name: %s\n", station->name);
+                       printf("Next Station URI: %s\n", station->stream->uri);
+                       printf("Next Station Location: %s\n", station->location);
+
+                       girl->selected_station_uri = station->stream->uri;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_uri);
+
+                       girl->selected_station_name = station->name;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_name);
+
+                       girl->selected_station_location = station->location;
+
+                       MSG("on_station_select_changed: %s\n",
+                           girl->selected_station_location);
+
+                       appbar_send_msg(_("Selected %s in %s: %s"),
+                                       girl->selected_station_name,
+                                       girl->selected_station_location,
+                                       girl->selected_station_uri);
+                       
+                       girl_launch_helper(station->stream->uri, GIRL_STREAM_SHOUTCAST);
+               }
+       }
 }
 
 void on_listeners_selector_button_clicked(GtkWidget * a,
diff --git a/src/girl.h b/src/girl.h
index 91be885..9240c3c 100644
--- a/src/girl.h
+++ b/src/girl.h
@@ -78,5 +78,7 @@ struct _GirlData {
 typedef struct _GirlData GirlData;
 
 extern GirlData *girl;
+extern GList *girl_stations;
+extern GList *girl_listeners;
 
 #endif /* GIRL_H */
diff --git a/src/stations.xml b/src/stations.xml
index 5f6079a..37e686d 100644
--- a/src/stations.xml
+++ b/src/stations.xml
@@ -1,6 +1,42 @@
 <?xml version="1.0"?>
 <!DOCTYPE girl SYSTEM "girl-0.5.dtd">
 <girl version="0.5">
+  <station id="ruc" name="Coimbra University Radio" rank="1.0" type="edu">
+    <frequency uri="http://www.ruc.pt/";>107.9 FM MHz in Coimbra, Portugal</frequency>
+    <location>Coimbra, Portugal</location>
+    <description>Coimbra University Radio (Portuguese: Rádio Universidade de Coimbra - RUC) is a university 
radio station of the Coimbra Academic Association (students' union) of the University of Coimbra in Coimbra, 
Portugal.
+    
+    It broadcasts on 107.9 FM (also broadcasts on-line). The Center of Experimental Radio was founded in the 
40's, but it was only on March, 1st 1986, that the radio obtained the authorization to broadcast on FM.
+    
+    The studios and offices of this university radio station are located in the main building of the 
Associação Académica de Coimbra, in the city centre. One of its trademarks is that there are no set playlists 
for any of the programs broadcast. This allows for an exceptionally wide range of musical genres.
+    
+    The radio gives courses in Programming, Technic and News, that students from the University of Coimbra 
can join.
+    
+    For its 25th anniversary, the radio hosts concerts of the indie Swedish band the Radio Dept., and later 
Eleanor Friedberger from the rock duo The Fiery Furnaces and the Welsh songwriter Euros Childs.</description>
+    <stream mime="mime/mpeg" uri="http://ruc.midi-club.net:8000/;stream/1"; codec="MPEG 1 Audio, Layer 3 
(MP3)" samplerate="44100 Hz" channels="Stereo" bitrate="128 kbps" />
+    <uri>http://www.ruc.pt/</uri>
+  </station>
+  <station id="radiocampusbruxelles" name="Radio Campus Bruxelles" rank="1.0" type="edu">
+    <frequency uri="http://www.radiocampus.be/";>92.1 MHz FM in Bruxelles, Belgium</frequency>
+    <location>Bruxelles, Belgium</location>
+    <description>Radio Campus est née en 1980 sur le campus de l’Université Libre de Bruxelles. Avec une 
cinquantaine d’émissions, elle rassemble plus de 150 animateurs, techniciens et collaborateurs autour de 
valeurs partagées : une libre expression assumée et constructive, un attachement immodéré au tissu social 
bruxellois et un amour sans borne pour la diversité musicale et culturelle.</description>
+    <stream mime="mime/mpeg" uri="http://streamer.radiocampus.be:8000/stream_hi.ogg"; codec="Vorbis" 
samplerate="44100 Hz" channels="Stereo" bitrate="192 kbps" />
+    <uri>http://www.radiocampus.be/</uri>
+  </station>
+  <station id="radiocampusparis" name="Radio Campus Paris" rank="1.0" type="edu">
+    <frequency uri="http://www.radiocampusparis.org/";>93.9 MHz FM in Paris, France</frequency>
+    <location>Paris, France</location>
+    <description>Radio Campus Paris is a non-profit Student radio station. Founded in 1998 and first 
broadcast on the Internet, the radio can be listened to in Paris, France on 93.9 FM (from 5.30 p.m. to 5.30 
a.m.). Managed by volunteers (mainly students), this indie student radio focuses on emerging music and local 
and student-related news.</description>
+    <stream mime="audio/mpeg" uri="http://www.radiocampusparis.org:8000/stream_rcp"; codec="MPEG 1 Audio, 
Layer 3 (MP3)" samplerate="44100 Hz" channels="Stereo" bitrate="128 kbps" />
+    <uri>http://www.radiocampusparis.org/</uri>
+  </station>
+  <station id="wcsb" name="WCSB" rank="1.0" type="edu">
+    <frequency uri="http://wcsb.org/";>89.3 MHz FM in Cleveland, OH</frequency>
+    <location>Cleveland, OH</location>
+    <description>A student-operated radio station at Cleveland State University, broadcasting from northeast 
Ohio.</description>
+    <stream mime="mime/mpeg" uri="http://cent7.directhostingcenter.com/tunein.php/ubtevcdv/playlist.pls"; 
codec="MPEG 1 Audio, Layer 3 (MP3)" samplerate="44100 Hz" channels="Stereo" bitrate="128 kbps" />
+    <uri>http://wcsb.org/</uri>
+  </station>
   <station id="pulse" name="Pulse LSE" rank="1.0" type="edu">
     <frequency uri="http://pulselse.co.uk/";>87.7 MHz FM in London, United Kingdom</frequency>
     <location>London, United Kingdom</location>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]