Commit c7def48a authored by Ole Aamot's avatar Ole Aamot 💬

Release gnome-internet-radio-locator 0.5.0

parent b4ab4103
GNOME Internet Radio Locator runs on Debian GNU/Linux (http://www.debian.org/)
If you are packaging GNOME Internet Radio Locator for Debian GNU/Linux and/or
other GNU/Linux distributions, please coordinate this with ole@src.gnome.org.
If you are packaging GNOME Internet Radio Locator for Debian GNU/Linux
and/or other GNU/Linux distributions, please coordinate this with
ole@gnome.org.
GNOME Internet Radio Locator is currently available as a GNOME 3
desktop program with source code released under GNU General Public
License version 2.
License version 3.
The initial work on this program began in March 2017.
......@@ -16,9 +16,9 @@ patches and adding new Internet radio stations in
Any contribution is welcome and always credited in AUTHORS and THANKS.
To enable debugging messages, modifiy the CC compilation definition
To enable debugging messages, modify the CC compilation definition
flag from -DGNOME_INTERNET_RADIO_LOCATOR_DEBUG=1 to
-DGNOME_INTERNET_RADIO_LOCATOR_DEBUG=0 in src/Makefile.am
Enjoy Internet radio,
Ole Aamot <ole@src.gnome.org>
Enjoy Free Internet radio,
Ole Aamot <ole@gnome.org>
=============
Version 0.5.0
=============
Artwork
* data/icons/16x16/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/22x22/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/24x24/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/32x32/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/48x48/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/256x256/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/512x512/apps/gnome-internet-radio-locator.png: New Icon
* data/icons/1024x1024/apps/gnome-internet-radio-locator.png: New Icon
* data/screenshot.png: New screenshot
GUI
* src/gnome-internet-radio-locator-gui.c: New Station GUI
* src/gnome-internet-radio-locator-markers.c: Marker callback
* src/gnome-internet-radio-locator-station.c: New XML parsing
License
* COPYING: Enforcing GNU General Public License version 3
* src/gnome-internet-radio-locator-station.c: GPL version 3
* src/gnome-internet-radio-locator-tz.c: GPL version 3
* src/gnome-internet-radio-locator.c: GPL version 3
Translations
* Marek Černocký (cs)
=============
Version 0.4.0
=============
......
GNOME Internet Radio Locator allows the user to easily locate and
listen to Internet radio stations such as WNYC over the Internet.
GNOME Internet Radio Locator is a Free Software program that allows
you to easily locate Free Internet Radio stations by broadcasters on
the Internet with the help of a map.
Enjoy Internet Radio.
GNOME Internet Radio Locator is developed on the GNOME 3 platform and
it requires gstreamer 1.0 for playback.
Enjoy Free Internet Radio.
Cheers,
Ole Aamot <ole@src.gnome.org>
Ole Aamot <ole@gnome.org>
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(gnome-internet-radio-locator,0.4.0)
AC_INIT(gnome-internet-radio-locator,0.5.0)
AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/gnome-internet-radio-locator.c])
......
data/screenshot.png

472 KB | W: | H:

data/screenshot.png

329 KB | W: | H:

data/screenshot.png
data/screenshot.png
data/screenshot.png
data/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,7 +5,7 @@
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">GNOME Internet Radio Locator</name>
<shortdesc xml:lang="en">Locate Internet Radio Stations</shortdesc>
<description>GNOME Internet Radio Locator allows users to easily find live radio programs on radio broadcasters on the Internet. This software is developed on the GNOME 3 platform and requires GStreamer 1.0 to be installed for playback. Enjoy Internet Radio.</description>
<description>GNOME Internet Radio Locator is a Free Software program that allows you to easily locate Free Internet Radio stations by broadcasters on the Internet with the help of a map. GNOME Internet Radio Locator is developed on the GNOME 3 platform and it requires gstreamer 1.0 for playback. Enjoy Free Internet Radio.</description>
<homepage rdf:resource="https://wiki.gnome.org/Apps/GNOMEInternetRadioLocator" />
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-internet-radio-locator-list" />
<download-page rdf:resource="http://download.gnome.org/sources/gnome-internet-radio-locator/" />
......@@ -15,7 +15,7 @@
<maintainer>
<foaf:Person>
<foaf:name>Ole Aamot</foaf:name>
<foaf:mbox rdf:resource="mailto:oka@oka.no" />
<foaf:mbox rdf:resource="mailto:ole@gnome.org" />
<gnome:userid>ole</gnome:userid>
</foaf:Person>
</maintainer>
......
......@@ -23,13 +23,13 @@ Requires: gstreamer1-plugins-ugly >= 1.8.3
%description
GNOME Internet Radio Locator is a Free Software program that allows
you to easily locate radio programs by broadcasters on the Internet
with the help of a map.
you to easily locate Free Internet Radio stations by broadcasters on
the Internet with the help of a map.
GNOME Internet Radio Locator is developed on the GNOME 3 platform and
it requires gstreamer 1.0 for playback.
Enjoy Internet Radio.
Enjoy Free Internet Radio.
%prep
%setup -q
......@@ -72,6 +72,9 @@ fi
%{_datadir}/help/*/%{name}
%changelog
* Sun Jul 09 2017 Ole Aamot - 0.5.0-1.fc25
- gnome-internet-radio-locator 0.5.0 build on Fedora Linux 25
* Tue Jun 27 2017 Ole Aamot - 0.4.0-1.fc25
- gnome-internet-radio-locator 0.4.0 build on Fedora Linux 25
......
......@@ -9,17 +9,18 @@ AM_CFLAGS = $(GNOME_INTERNET_RADIO_LOCATOR_CFLAGS) \
bin_PROGRAMS = gnome-internet-radio-locator
gnome_internet_radio_locator_SOURCES = \
gnome-internet-radio-locator-gui.c \
gnome-internet-radio-locator-listener.c \
gnome-internet-radio-locator-markers.c \
gnome-internet-radio-locator-player.c \
gnome-internet-radio-locator-program.c \
gnome-internet-radio-locator-runners.c \
gnome-internet-radio-locator-station.c \
gnome-internet-radio-locator-stations-map.c \
gnome-internet-radio-locator-streams.c \
gnome-internet-radio-locator-tz.c \
gnome-internet-radio-locator.c
gnome-internet-radio-locator-gui.c \
gnome-internet-radio-locator-listener.c \
gnome-internet-radio-locator-markers.c \
gnome-internet-radio-locator-player.c \
gnome-internet-radio-locator-program.c \
gnome-internet-radio-locator-radius.c \
gnome-internet-radio-locator-runners.c \
gnome-internet-radio-locator-station.c \
gnome-internet-radio-locator-stations-map.c \
gnome-internet-radio-locator-streams.c \
gnome-internet-radio-locator-tz.c \
gnome-internet-radio-locator.c
gnome_internet_radio_locator_CFLAGS = $(GNOME_INTERNET_RADIO_LOCATOR_CFLAGS) \
-DGNOME_INTERNET_RADIO_LOCATOR_DATADIR=\"$(datadir)/gnome-internet-radio-locator\" \
......@@ -34,7 +35,7 @@ gnomeinternetradiolocatordir = $(datadir)/gnome-internet-radio-locator
gnomeinternetradiolocator_DATA = gnome-internet-radio-locator-0.1.dtd gnome-internet-radio-locator.xml
EXTRA_DIST = gnome-internet-radio-locator.h gnome-internet-radio-locator-player.h gnome-internet-radio-locator-markers.h gnome-internet-radio-locator-player-kb.h gnome-internet-radio-locator-player-resource.h gnome-internet-radio-locator-station.h gnome-internet-radio-locator-stations-map.h gnome-internet-radio-locator-tz.h gnome-internet-radio-locator-gui.h gnome-internet-radio-locator-listener.h gnome-internet-radio-locator-program.h gnome-internet-radio-locator-runners.h gnome-internet-radio-locator-streams.h gnome-internet-radio-locator-0.1.dtd gnome-internet-radio-locator.xml gnome-internet-radio-locator.xsl
EXTRA_DIST = gnome-internet-radio-locator.h gnome-internet-radio-locator-player.h gnome-internet-radio-locator-markers.h gnome-internet-radio-locator-player-kb.h gnome-internet-radio-locator-player-resource.h gnome-internet-radio-locator-station.h gnome-internet-radio-locator-stations-map.h gnome-internet-radio-locator-tz.h gnome-internet-radio-locator-gui.h gnome-internet-radio-locator-listener.h gnome-internet-radio-locator-program.h gnome-internet-radio-locator-radius.h gnome-internet-radio-locator-runners.h gnome-internet-radio-locator-streams.h gnome-internet-radio-locator-0.1.dtd gnome-internet-radio-locator.xml gnome-internet-radio-locator.xsl
LDADD = $(GNOME_INTERNET_RADIO_LOCATOR_LIBS)
......
......@@ -6,9 +6,9 @@
*
* Author: Ole Aamot <oka@oka.no>
*
* This program is free software; you can redistribute it and/or modify
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
......@@ -43,11 +42,12 @@
extern GtkWidget *gnome_internet_radio_locator_app;
extern GtkWidget *search_selector;
GNOMEInternetRadioLocatorStationInfo *stationinfo, *localstation;
GtkWidget *create_stations_selector(char *selected_station_uri,
char *filename)
{
GNOMEInternetRadioLocatorStationInfo *stationinfo, *localstation;
GtkWidget *stations_selector;
GtkWidget *align, *menu, *drop_down, *item;
......@@ -61,7 +61,9 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
memset(&stats, 0, sizeof(stats));
/* The Stations dialog */
stations_selector = gtk_dialog_new_with_buttons("Select a station", GTK_WINDOW(gnome_internet_radio_locator_app), 0, /* flags */
stations_selector = gtk_dialog_new_with_buttons("Select a station",
GTK_WINDOW(gnome_internet_radio_locator_app),
0, /* flags */
NULL,
GTK_RESPONSE_ACCEPT,
NULL);
......@@ -211,9 +213,28 @@ on_location_matches(GtkEntryCompletion *widget,
return FALSE;
}
void
save_cb (GtkWidget *widget, gpointer data) {
/* g_print("%s\n", data); */
char *nameentry, *locationentry, *urientry, *websiteentry, *descriptionentry;
nameentry = g_object_get_data(G_OBJECT(widget), "station_name");
locationentry = g_object_get_data(G_OBJECT(widget), "station_location");
urientry = g_object_get_data(G_OBJECT(widget), "station_uri");
websiteentry = g_object_get_data(G_OBJECT(widget), "station_website");
descriptionentry = g_object_get_data(G_OBJECT(widget), "station_description");
g_print("%s\n", nameentry);
g_print("%s\n", locationentry);
g_print("%s\n", urientry);
g_print("%s\n", websiteentry);
g_print("%s\n", descriptionentry);
}
GtkWidget *create_new_station_selector(void) {
GNOMEInternetRadioLocatorStationInfo *localstation, *stationinfo;
GtkWidget *station_selector, *content_area;
GtkWidget *align;
GtkWidget *bandentry, *descriptionentry, *nameentry, *locationentry, *urientry, *websiteentry;
......@@ -225,6 +246,7 @@ GtkWidget *create_new_station_selector(void) {
guint i;
char *pixmap_dir = NULL;
gchar *path = NULL;
GtkWidget *item = NULL;
setlocale (LC_ALL, "C");
gchar *world_station_xml_filename, *local_station_xml_file;
......@@ -237,33 +259,37 @@ GtkWidget *create_new_station_selector(void) {
memset(&stats, 0, sizeof(stats));
/* The Stations dialog */
/* station_selector = gtk_dialog_new_with_buttons(_("New radio station"), GTK_WINDOW(GNOMEInternetRadioLocator_app), 0, /\* flags *\/ */
/* GTK_STOCK_SAVE, */
/* GTK_RESPONSE_ACCEPT, */
/* NULL); */
station_selector = gtk_dialog_new_with_buttons("New Internet Radio Station",
GTK_WINDOW(gnome_internet_radio_locator_app),
0,
("_Save"),
GTK_RESPONSE_ACCEPT,
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (station_selector));
g_signal_connect(G_OBJECT(station_selector), "response", G_CALLBACK(save_cb), NULL);
/* gtk_container_set_border_width */
/* (GTK_CONTAINER(GTK_DIALOG(station_selector)->vbox), 6); */
/* (GTK_CONTAINER(GTK_DIALOG(station_selector)->vbox), 6); */
/* align = gtk_alignment_new(0.5, 0.5, 0, 0); */
/* align = gtk_alignment_new(0.5, 0.5, 0, 0); */
/* gtk_container_add(GTK_CONTAINER */
/* (GTK_DIALOG(station_selector)->vbox), align); */
gtk_container_set_border_width(GTK_CONTAINER(align), 6);
gtk_widget_show(align);
/* (GTK_DIALOG(station_selector)->vbox), align); */
/* gtk_container_set_border_width(GTK_CONTAINER(align), 6); */
/* gtk_widget_show(align); */
bandentry = gtk_entry_new();
nameentry = gtk_entry_new();
locationentry = gtk_entry_new();
urientry = gtk_entry_new();
bandentry = gtk_entry_new();
websiteentry = gtk_entry_new();
descriptionentry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(nameentry), "Station name");
gtk_entry_set_text(GTK_ENTRY(bandentry), "Bandwidth");
gtk_entry_set_text(GTK_ENTRY(locationentry), "City name");
gtk_entry_set_text(GTK_ENTRY(urientry), "http://uri-to-stream/");
gtk_entry_set_text(GTK_ENTRY(bandentry), "FM/AM bandwidth");
gtk_entry_set_text(GTK_ENTRY(websiteentry), "http://uri-to-website/");
gtk_entry_set_text(GTK_ENTRY(descriptionentry), "Description");
gtk_entry_set_text(GTK_ENTRY(websiteentry), "http://uri-to-website/");
completion = gtk_entry_completion_new();
gtk_entry_completion_set_text_column(completion, STATION_LOCATION);
gtk_entry_set_completion(GTK_ENTRY(locationentry), completion);
......@@ -293,49 +319,9 @@ GtkWidget *create_new_station_selector(void) {
g_warning("Failed to open %s.\n", local_station_xml_file);
}
/* g_free (local_station_xml_file); */
stationinfo = gnome_internet_radio_locator_station_load_from_file(localstation,
world_station_xml_filename);
stationinfo =
gnome_internet_radio_locator_station_load_from_file(localstation,
world_station_xml_filename);
// gnome_internet_radio_locator_stations = NULL;
while (stationinfo != NULL) {
/* Timezone map */
db = tz_load_db ();
locs = tz_get_locations (db);
for (i = 0; i < locs->len ; i++) {
TzLocation *loc = locs->pdata[i];
TzInfo *info;
char *filename;
gdouble selected_offset;
char buf[16];
info = tz_info_from_location (loc);
selected_offset = tz_location_get_utc_offset (loc)
/ (60.0*60.0) + ((info->daylight) ? -1.0 : 0.0);
filename = g_strdup_printf ("timezone_%s.png",
g_ascii_formatd (buf, sizeof (buf),
"%g", selected_offset));
path = g_build_filename (pixmap_dir, filename, NULL);
g_printf("Name is %s\n", tz_info_get_clean_name(db, loc->zone));
GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("%s\n", loc->zone);
if (g_file_test (path, G_FILE_TEST_IS_REGULAR) == FALSE) {
g_message ("File '%s' missing for zone '%s'", filename, loc->zone);
gtk_list_store_append(location_model, &iter);
g_print("%s %s", stationinfo->location, loc->zone);
if (g_strcmp0(stationinfo->location, loc->zone)==0) {
gtk_list_store_set(location_model,
&iter,
STATION_LOCATION,
loc->zone,
-1);
}
retval = 1;
}
stationinfo = stationinfo->next;
}
gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(location_model));
gtk_widget_show(nameentry);
gtk_widget_show(locationentry);
gtk_widget_show(urientry);
......@@ -343,30 +329,28 @@ GtkWidget *create_new_station_selector(void) {
gtk_widget_show(descriptionentry);
gtk_widget_show(websiteentry);
gtk_container_add(GTK_CONTAINER(content_area), nameentry);
gtk_container_add(GTK_CONTAINER(content_area), bandentry);
gtk_container_add(GTK_CONTAINER(content_area), locationentry);
gtk_container_add(GTK_CONTAINER(content_area), urientry);
gtk_container_add(GTK_CONTAINER(content_area), bandentry);
gtk_container_add(GTK_CONTAINER(content_area), descriptionentry);
gtk_container_add(GTK_CONTAINER(content_area), websiteentry);
/* g_signal_connect(G_OBJECT(station_selector), GTK_RESPONSE_ACCEPT, */
/* G_CALLBACK(on_new_station_selector_changed), */
/* NULL); */
g_object_set_data(G_OBJECT(station_selector), "station_location",
(gpointer) gtk_entry_get_text(GTK_ENTRY(locationentry)));
g_object_set_data(G_OBJECT(station_selector), "station_name",
(gpointer) gtk_entry_get_text(GTK_ENTRY(nameentry)));
g_object_set_data(G_OBJECT(station_selector), "station_uri",
(gpointer) gtk_entry_get_text(GTK_ENTRY(urientry)));
g_object_set_data(G_OBJECT(station_selector), "station_band",
(gpointer) gtk_entry_get_text(GTK_ENTRY(bandentry)));
g_object_set_data(G_OBJECT(station_selector), "station_location",
(gpointer) gtk_entry_get_text(GTK_ENTRY(locationentry)));
g_object_set_data(G_OBJECT(station_selector), "station_uri",
(gpointer) gtk_entry_get_text(GTK_ENTRY(urientry)));
g_object_set_data(G_OBJECT(station_selector), "station_description",
(gpointer) gtk_entry_get_text(GTK_ENTRY(descriptionentry)));
g_object_set_data(G_OBJECT(station_selector), "station_website",
(gpointer) gtk_entry_get_text(GTK_ENTRY(websiteentry)));
#if 0 /* FIXME: Add input fields */
g_object_set_data(G_OBJECT(station_selector), "station_band",
(gpointer) station_band);
g_object_set_data(G_OBJECT(station_selector), "station_description",
(gpointer) station_description);
g_object_set_data(G_OBJECT(station_selector), "station_website",
......@@ -385,7 +369,6 @@ GtkWidget *create_new_station_selector(void) {
/* g_free (filename); */
/* g_free (path); */
return station_selector;
}
}
GtkWidget *create_gnome_internet_radio_locator_app(void)
......@@ -414,8 +397,6 @@ GtkWidget *create_gnome_internet_radio_locator_app(void)
gnome_config_get_string("selected_listener_name=");
gnome_internet_radio_locator->selected_listener_location =
gnome_config_get_string("selected_listener_location=");
gnome_internet_radio_locator->selected_listener_band =
gnome_config_get_string("selected_listener_band=");
gnome_internet_radio_locator->selected_listener_description =
gnome_config_get_string("selected_listener_description=");
......@@ -436,8 +417,6 @@ GtkWidget *create_gnome_internet_radio_locator_app(void)
gnome_config_get_string("selected_station_name=");
gnome_internet_radio_locator->selected_station_location =
gnome_config_get_string("selected_station_location=");
gnome_internet_radio_locator->selected_station_band =
gnome_config_get_string("selected_station_band=");
gnome_internet_radio_locator->selected_station_description =
gnome_config_get_string("selected_station_description=");
......@@ -445,8 +424,6 @@ GtkWidget *create_gnome_internet_radio_locator_app(void)
gnome_config_get_string("selected_station_name=");
gnome_internet_radio_locator->selected_station_location =
gnome_config_get_string("selected_station_location=");
gnome_internet_radio_locator->selected_station_band =
gnome_config_get_string("selected_station_band=");
gnome_internet_radio_locator->selected_station_description =
gnome_config_get_string("selected_station_description=");
......@@ -456,8 +433,6 @@ GtkWidget *create_gnome_internet_radio_locator_app(void)
gnome_internet_radio_locator->selected_station_name);
GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("gnome_internet_radio_locator->selected_station_location: %s\n",
gnome_internet_radio_locator->selected_station_location);
GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("gnome_internet_radio_locator->selected_station_band: %s\n",
gnome_internet_radio_locator->selected_station_band);
GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("gnome_internet_radio_locator->selected_station_description: %s\n",
gnome_internet_radio_locator->selected_station_description);
......
......@@ -16,9 +16,43 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtk/gtk.h>
#include <champlain/champlain.h>
#include "gnome-internet-radio-locator.h"
#include "gnome-internet-radio-locator-markers.h"
extern GtkWidget *input;
extern GtkEntryCompletion *completion;
typedef struct
{
ChamplainView *view;
ChamplainMarker *marker;
} LocationCallbackData;
static gboolean
location_callback (LocationCallbackData *data)
{
/* champlain_view_center_on (data->view, lat, lon); */
/* champlain_location_set_location (CHAMPLAIN_LOCATION (data->marker), lat, lon); */
g_print("%s\n", __FUNCTION__);
return TRUE;
}
void
marker_function (ChamplainMarker *self,
gdouble dx,
gdouble dy,
ClutterEvent *event,
gpointer user_data)
{
gchar *station;
station = (gchar *)champlain_label_get_text (CHAMPLAIN_LABEL (self));
gtk_entry_set_text(GTK_ENTRY(input),(gchar *)station);
return;
}
ChamplainMarkerLayer *
create_marker_layer (G_GNUC_UNUSED ChamplainView *view, ChamplainPathLayer **path)
{
......@@ -26,11 +60,17 @@ create_marker_layer (G_GNUC_UNUSED ChamplainView *view, ChamplainPathLayer **pat
ChamplainMarkerLayer *layer;
ClutterActor *layer_actor;
ClutterColor orange = { 0xf3, 0x94, 0x07, 0xbb };
LocationCallbackData callback_data;
*path = champlain_path_layer_new ();
layer = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE);
layer_actor = CLUTTER_ACTOR (layer);
/* Create callback that updates the map periodically */
/* callback_data.view = CHAMPLAIN_VIEW (view); */
/* callback_data.marker = CHAMPLAIN_MARKER (layer); */
/* g_timeout_add (1000, (GSourceFunc) location_callback, &callback_data); */
#if 0
marker = champlain_label_new_with_text ("Norway\n<span size=\"xx-small\">Oslo</span>",
"Serif 14", NULL, NULL);
......@@ -38,35 +78,32 @@ create_marker_layer (G_GNUC_UNUSED ChamplainView *view, ChamplainPathLayer **pat
champlain_label_set_alignment (CHAMPLAIN_LABEL (marker), PANGO_ALIGN_RIGHT);
champlain_label_set_color (CHAMPLAIN_LABEL (marker), &orange);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker),
59.9264569, 10.7960955);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 37.873093, -122.303769);
champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
#endif
marker = champlain_label_new_from_file ("icons/emblem-generic.png", NULL);
champlain_label_set_text (CHAMPLAIN_LABEL (marker), "New York");
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 40.77, -73.98);
champlain_label_set_text (CHAMPLAIN_LABEL (marker), "Berkeley, CA");
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 37.873093, -122.303769);
champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
g_signal_connect(CHAMPLAIN_LOCATION(marker), "button-press", G_CALLBACK(marker_function), NULL);
#if 0
marker = champlain_label_new_from_file ("icons/emblem-important.png", NULL);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 47.130885,
-70.764141);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 37.873093, -122.303769);
champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
marker = champlain_point_new ();
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 45.130885,
-65.764141);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 37.873093, -122.303769);
champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
marker = champlain_label_new_from_file ("icons/emblem-favorite.png", NULL);
champlain_label_set_draw_background (CHAMPLAIN_LABEL (marker), FALSE);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 45.41484,
-71.918907);
champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 37.873093, -122.303769);
champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
#endif
......
......@@ -40,10 +40,12 @@ GST_DEBUG_CATEGORY (play_debug);
#define GST_CAT_DEFAULT play_debug
extern GstPlay *player;
#if 0
static gboolean play_next (GstPlay * play);
static gboolean play_prev (GstPlay * play);
static void play_reset (GstPlay * play);
static void play_set_relative_volume (GstPlay * play, gdouble volume_step);
#endif
void
gnome_internet_radio_locator_player_main(gchar *streamuri, gchar *name)
......@@ -69,6 +71,7 @@ gnome_internet_radio_locator_player_main(gchar *streamuri, gchar *name)
exit (0);
}
#if 0
static void
end_of_stream_cb (GstPlayer * player, GstPlay * play)
{
......@@ -79,7 +82,8 @@ end_of_stream_cb (GstPlayer * player, GstPlay * play)
g_main_loop_quit (play->loop);
}
}
#endif
#if 0
static void
error_cb (GstPlayer * player, GError * err, GstPlay * play)
{
......@@ -94,7 +98,7 @@ error_cb (GstPlayer * player, GError * err, GstPlay * play)
g_main_loop_quit (play->loop);
}
}
#endif
static void
position_updated_cb (GstPlayer * player, GstClockTime pos, GstPlay * play)
{
......@@ -358,6 +362,7 @@ media_info_cb (GstPlayer * player, GstPlayerMediaInfo * info, GstPlay * play)
}
}
#if 0
static GstPlay *
play_new (gchar ** uris, gdouble initial_volume)
{
......@@ -405,7 +410,7 @@ play_free (GstPlay * play)
g_strfreev (play->uris);
g_free (play);
}
#endif
/* reset for new file/stream */
static void
play_reset (GstPlay * play)
......@@ -434,7 +439,7 @@ get_volume (GtkWidget *widget, GstPlay *play)
return volume;
}
#if 0
static gchar *
play_uri_get_display_name (GstPlayer * player, const gchar * uri)
{
......@@ -468,6 +473,7 @@ play_uri (GstPlayer *player, const gchar * next_uri)
}
/* returns FALSE if we have reached the end of the playlist */
#if 0
static gboolean
play_next (GstPlay * play)
{
......@@ -654,6 +660,8 @@ keyboard_cb (const gchar * key_input, gpointer user_data)
break;
}
}
#endif
#endif
void
gnome_internet_radio_locator_player_new (GstPlayer * player, const gchar * next_uri)
......@@ -664,7 +672,9 @@ gnome_internet_radio_locator_player_new (GstPlayer * player, const gchar * next_
void
gnome_internet_radio_locator_player_stop (GstPlayer *player)
{
gst_player_stop(player);
if (player != NULL) {
gst_player_stop(GST_PLAYER(player));
}
}
void
......
......@@ -41,7 +41,7 @@ typedef struct
GMainLoop *loop;
} GstPlay;
static void play_uri (GstPlayer * player, const gchar * next_uri);
void play_uri (GstPlayer *player, const gchar * next_uri);
void gnome_internet_radio_locator_player_new (GstPlayer * player, const gchar * next_uri);
......
/* $id$
*
* GNOME Internet Radio Locator
*
* Copyright (C) 2017 Ole Aamot Software
*
* Author: Ole Aamot <oka@oka.no>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <geoclue/geoclue-geocode.h>
#define foreach(item, array) \
for(int keep = 1, \
count = 0,\
size = sizeof (array) / sizeof *(array); \
keep && count != size; \
keep = !keep, count++) \
for(item = (array) + count; keep; keep = !keep)
#define min(a,b) \
({ typedef (a) _a = (a); \
typeof (b) _b = (b); \
_a < _b ? _a : _b; })
typedef struct _Position {
char *url;
float lat;
float lon;
} Position;
int
gnome_internet_radio_locator_radius (float latitude, float longitude, int radius)
{
int values[] = {0,1,2};
Position pos;