[gnome-internet-radio-locator] Fix New Station XML and prepare 1.0.2



commit 5d717e8416ac3438cc7e201762cf3425e68af5f3
Author: Ole Aamot <oka oka no>
Date:   Sat Nov 25 15:51:54 2017 +0100

    Fix New Station XML and prepare 1.0.2

 src/gnome-internet-radio-locator.c   |   58 ++++++++++++++++------------------
 src/gnome-internet-radio-locator.xml |    6 ++--
 2 files changed, 30 insertions(+), 34 deletions(-)
---
diff --git a/src/gnome-internet-radio-locator.c b/src/gnome-internet-radio-locator.c
index 5d2acf5..0ff3864 100644
--- a/src/gnome-internet-radio-locator.c
+++ b/src/gnome-internet-radio-locator.c
@@ -371,7 +371,7 @@ static void
 listen_station(GSimpleAction *simple, GVariant *parameter, gpointer user_data) {
   player = gst_player_new (NULL, gst_player_g_main_context_signal_dispatcher_new
                                      (NULL));
-  if (strcmp(gnome_internet_radio_locator->selected_station_uri, NULL) == 0) {
+  if (!g_strcmp0(gnome_internet_radio_locator->selected_station_uri, NULL)) {
          gnome_internet_radio_locator_player_new(player, "http://fm939.wnyc.org/wnycfm";);
   } else {
          gnome_internet_radio_locator_player_new(player, gnome_internet_radio_locator->selected_station_uri);
@@ -438,31 +438,30 @@ void on_new_station_changed(GtkWidget * a, gpointer user_data)
        /* GList *l = g_list_first(gnome_internet_radio_locator_stations); */
        /* stationinfo = l->data; */
 
-       /* if (gnome_internet_radio_locator->selected_station_uri != NULL) */
-       /*      g_free(gnome_internet_radio_locator->selected_station_uri); */
-
-       gchar *selected_station_uri = g_strdup(g_object_get_data(G_OBJECT(a), "station_uri"));
-       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n", 
gnome_internet_radio_locator->selected_station_uri);
-
-       gnome_internet_radio_locator->selected_station_name =
-           g_strdup(g_object_get_data(G_OBJECT(a), "station_name"));
-       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
-           gnome_internet_radio_locator->selected_station_name);
-
-       gnome_internet_radio_locator->selected_station_location =
-           g_strdup(g_object_get_data(G_OBJECT(a), "station_location"));
-       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
-           gnome_internet_radio_locator->selected_station_location);
-
        gnome_internet_radio_locator->selected_station_band =
            g_strdup(g_object_get_data(G_OBJECT(a), "station_band"));
        GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
            gnome_internet_radio_locator->selected_station_band);
-
        gnome_internet_radio_locator->selected_station_description =
            g_strdup(g_object_get_data(G_OBJECT(a), "station_description"));
        GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
            gnome_internet_radio_locator->selected_station_description);
+       gnome_internet_radio_locator->selected_station_location =
+           g_strdup(g_object_get_data(G_OBJECT(a), "station_location"));
+       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
+           gnome_internet_radio_locator->selected_station_location);
+       gnome_internet_radio_locator->selected_station_name =
+           g_strdup(g_object_get_data(G_OBJECT(a), "station_name"));
+       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
+           gnome_internet_radio_locator->selected_station_name);
+       gnome_internet_radio_locator->selected_station_uri =
+           g_strdup(g_object_get_data(G_OBJECT(a), "station_uri"));
+       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
+           gnome_internet_radio_locator->selected_station_uri);
+       gnome_internet_radio_locator->selected_station_website =
+           g_strdup(g_object_get_data(G_OBJECT(a), "station_website"));
+       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_changed: %s\n",
+                                              gnome_internet_radio_locator->selected_station_website);
 
        /* appbar_send_msg(_("Selected the radio station %s in %s: %s"), */
        /*              gnome_internet_radio_locator->selected_station_name, */
@@ -482,8 +481,8 @@ void on_stations_selector_changed(GtkWidget * a, gpointer user_data)
 {
        GNOMEInternetRadioLocatorStationInfo *station = NULL;
 
-       if (gnome_internet_radio_locator->selected_station_uri != NULL)
-               g_free(gnome_internet_radio_locator->selected_station_uri);
+       /* if (gnome_internet_radio_locator->selected_station_uri != NULL) */
+       /*      g_free(gnome_internet_radio_locator->selected_station_uri); */
 
        gnome_internet_radio_locator->selected_station_uri = g_strdup(g_object_get_data(G_OBJECT(a), 
"station_uri"));
 
@@ -615,21 +614,18 @@ void on_new_station_clicked(GtkWidget *a,
        switch (result)  {
        case GTK_RESPONSE_ACCEPT:
                GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("Squeak!\n\n");
-
-               selected_station_uri = g_strdup(g_object_get_data(G_OBJECT(station), "station_uri"));
-               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_uri);
-
-               selected_station_description = g_strdup(g_object_get_data(G_OBJECT(station), 
"station_description"));
-               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_description);
                selected_station_band = g_strdup(g_object_get_data(G_OBJECT(station), "station_band"));
                GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_band);
-               selected_station_website = g_strdup(g_object_get_data(G_OBJECT(station), "station_website"));
-               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_website);
-               selected_station_name = g_strdup(g_object_get_data(G_OBJECT(station), "station_name"));
-               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_name);
+               selected_station_description = g_strdup(g_object_get_data(G_OBJECT(station), 
"station_description"));
+               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_description);
                selected_station_location = g_strdup(g_object_get_data(G_OBJECT(station), 
"station_location"));
-
                GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_location);
+               selected_station_name = g_strdup(g_object_get_data(G_OBJECT(station), "station_name"));
+               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_name);
+               selected_station_uri = g_strdup(g_object_get_data(G_OBJECT(station), "station_uri"));
+               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_uri);
+               selected_station_website = g_strdup(g_object_get_data(G_OBJECT(station), "station_website"));
+               GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("on_new_station_select_changed: %s\n", 
selected_station_website);
                gnome_internet_radio_locator_station_update (stationinfo, selected_station_band, 
selected_station_description, selected_station_name, selected_station_location, selected_station_uri, 
selected_station_website);
                break;
        default:
diff --git a/src/gnome-internet-radio-locator.xml b/src/gnome-internet-radio-locator.xml
index b08d84e..febdc03 100644
--- a/src/gnome-internet-radio-locator.xml
+++ b/src/gnome-internet-radio-locator.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml-stylesheet type="text/xsl" 
href="https://people.gnome.org/~ole/gnome-internet-radio-locator/gnome-internet-radio-locator.xsl"; ?>
 <!DOCTYPE gnome_internet_radio_locator SYSTEM "gnome-internet-radio-locator-0.1.dtd">
-<gnome_internet_radio_locator version="1.0.0">
+<gnome_internet_radio_locator version="1.0.2">
   <station band="ONLINE" id="drnyheder" lang="da" name="Danmarks Radio Nyheder" rank="1.0" type="gov">
     <frequency uri="http://www.dr.dk/nyheder";>FM 93.3 in Aalborg</frequency>
     <location>Copenhagen, Denmark</location>
@@ -26,7 +26,7 @@
       Since 1 November 2011 P1 has had to share its nationwide FM
       channel frequencies with P2 since DR lost the rights to continue
       the use of the fourth nationwide FM channel which P2 had been
-      using.[1] P1 broadcats on the FM channel during daytime. Both
+      using.  P1 broadcats on the FM channel during daytime. Both
       channels continued as two separate channels digitally on DAB and
       online.
     </description>
@@ -238,7 +238,7 @@ In fact we even split our adverts, and many of our local news and travel bulleti
     <stream mime="audio/mpeg" uri="http://147.174.55.27:8002/"; codec="MPEG 1 Audio, Layer 3 (MP3)" 
samplerate="44100 Hz" channels="Mono" bitrate="24 kbps" />
     <uri>http://www2.southeastern.edu/kslu/</uri>
   </station>
-  <station band="RadioK" id="radiok" lang="en" name="Radio K" rank="1.0" type="edu">
+  <station band="ONLINE" id="radiok" lang="en" name="Radio K" rank="1.0" type="edu">
     <frequency>88.1 FM in Minneapolis, Minnesota</frequency>
     <location>Minneapolis, Minnesota</location>
     <description lang="en">


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