[telegnome] Add some more default channels
- From: Colin Watson <cjwatson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [telegnome] Add some more default channels
- Date: Sat, 30 Jan 2016 13:38:05 +0000 (UTC)
commit 1017b189b97c43f3a84679f29111db4d470ce95d
Author: Colin Watson <cjwatson debian org>
Date: Sat Jan 30 13:36:21 2016 +0000
Add some more default channels
* src/gui.c (tg_gui_reload_channels): Add default channel definitions
for Teletext ČT (.cz), YLE Teksti-TV (.fi), MTV3 Tekstikanava (.fi), and
MTV1 (.hu), taken and updated from the Debian packaging.
NEWS | 1 +
src/gui.c | 48 +++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7f629f7..15c78d0 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Changes in TeleGNOME 0.1.2
* Build cleanly with -DGSEAL_ENABLE.
* Port from GnomeVFS to GIO.
* Port from gnome-config to GSettings.
+ * Add some more default channels.
Changes in TeleGNOME 0.1.1
==========================
diff --git a/src/gui.c b/src/gui.c
index b103afe..d6b0e82 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -240,8 +240,40 @@ tg_gui_reload_channels(void)
gui->channels = g_slist_append(gui->channels, (gpointer)channel);
}
if (!gui->channels) {
- /* nothing set up yet, fill in some default */
- gchar **children = g_new0(gchar *, 2);
+ /* nothing set up yet, fill in some defaults */
+ /* TODO: This is terrible; move into a separate file. */
+ gchar **children = g_new0(gchar *, 6);
+ int i = 0;
+
+ channel = tg_channel_new(
+ NULL,
+ "name", "Teletext ČT, Czech Republic",
+ "description", "Czech teletext",
+ "page-url", "http://www.ceskatelevize.cz/services/teletext/picture.php?channel=CT1&page=%03d",
+ "country", "cz",
+ NULL);
+ gui->channels = g_slist_append(gui->channels, (gpointer)channel);
+ g_object_get(channel, "uuid", &children[i++], NULL);
+ channel = tg_channel_new(
+ NULL,
+ "name", "YLE Teksti-TV, Finland",
+ "description", "Finnish teletext (YLE)",
+ "page-url", "http://www.yle.fi/tekstitv/images/P%03d_01.gif",
+ "subpage-url", "http://www.yle.fi/tekstitv/images/P%03d_%02d.gif",
+ "country", "fi",
+ NULL);
+ gui->channels = g_slist_append(gui->channels, (gpointer)channel);
+ g_object_get(channel, "uuid", &children[i++], NULL);
+ channel = tg_channel_new(
+ NULL,
+ "name", "MTV3 Tekstikanava, Finland",
+ "description", "Finnish teletext (MTV3)",
+ "page-url", "http://www.mtvtekstikanava.fi/new2008/images/%03d-01.gif",
+ "subpage-url", "http://www.mtvtekstikanava.fi/new2008/images/%03d-%02d.gif",
+ "country", "fi",
+ NULL);
+ gui->channels = g_slist_append(gui->channels, (gpointer)channel);
+ g_object_get(channel, "uuid", &children[i++], NULL);
channel = tg_channel_new(
NULL,
"name", "Ceefax, United Kingdom",
@@ -251,7 +283,17 @@ tg_gui_reload_channels(void)
"country", "gb",
NULL);
gui->channels = g_slist_append(gui->channels, (gpointer)channel);
- g_object_get(channel, "uuid", &children[0], NULL);
+ g_object_get(channel, "uuid", &children[i++], NULL);
+ channel = tg_channel_new(
+ NULL,
+ "name", "MTV1, Hungary",
+ "description", "Hungarian teletext",
+ "page-url", "http://www.teletext.hu/mtv1/images/%03d-01.gif",
+ "subpage-url", "http://www.teletext.hu/mtv1/images/%03d-%02d.gif",
+ "country", "hu",
+ NULL);
+ gui->channels = g_slist_append(gui->channels, (gpointer)channel);
+ g_object_get(channel, "uuid", &children[i++], NULL);
g_settings_set_strv(gui->settings, "channel-children",
(const gchar **) children);
g_strfreev(children);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]