[packages/gnome-voice] - fixed typing issues and some bugs; release 4
qboosh
qboosh at pld-linux.org
Sun Aug 31 19:29:31 CEST 2025
commit b2c5980d651ea5aa57f94bc33896abc03c1b5c93
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Aug 31 19:32:14 2025 +0200
- fixed typing issues and some bugs; release 4
gnome-voice-types.patch | 158 ++++++++++++++++++++++++++++++++++++++++++++++++
gnome-voice.spec | 6 +-
2 files changed, 162 insertions(+), 2 deletions(-)
---
diff --git a/gnome-voice.spec b/gnome-voice.spec
index 1a41976..1250f86 100644
--- a/gnome-voice.spec
+++ b/gnome-voice.spec
@@ -2,12 +2,13 @@ Summary: GNOME Voice - public voice mapping application for GNOME
Summary(pl.UTF-8): GNOME Voice - aplikacja GNOME z mapą publicznych rozgłośni radiowych
Name: gnome-voice
Version: 1.2.0
-Release: 3
+Release: 4
License: GPL v3+
Group: X11/Applications/Sound
Source0: https://download.gnome.org/sources/gnome-voice/1.2/%{name}-%{version}.tar.xz
# Source0-md5: e994f0b145aed81b696521f5c44146b0
-URL: https://www.gnome.org/
+Patch0: %{name}-types.patch
+URL: https://wiki.gnome.org/Apps/Voice
BuildRequires: clutter-gtk-devel >= 1.8.4
BuildRequires: geoclue2-devel >= 2.6.0
BuildRequires: gettext-tools
@@ -40,6 +41,7 @@ darmowych, publicznych rozgłośni radiowych w środowisku GNOME.
%prep
%setup -q
+%patch -P0 -p1
%build
%configure
diff --git a/gnome-voice-types.patch b/gnome-voice-types.patch
new file mode 100644
index 0000000..643bf4b
--- /dev/null
+++ b/gnome-voice-types.patch
@@ -0,0 +1,158 @@
+--- gnome-voice-1.2.0/src/gnome-voice-file.h.orig 2022-11-27 05:26:09.000000000 +0100
++++ gnome-voice-1.2.0/src/gnome-voice-file.h 2025-08-31 17:56:05.596170930 +0200
+@@ -29,8 +29,8 @@ struct _VoiceWindow {
+ };
+
+ struct _LocationInfo {
+- gdouble *lat;
+- gdouble *lon;
++ gchar *lat;
++ gchar *lon;
+ gchar *city;
+ };
+
+--- gnome-voice-1.2.0/src/gnome-voice-file.c.orig 2022-11-27 05:25:49.000000000 +0100
++++ gnome-voice-1.2.0/src/gnome-voice-file.c 2025-08-31 17:56:37.409699752 +0200
+@@ -27,17 +27,17 @@ gnome_voice_file_parser (VoiceInfo *info
+ if ((!xmlStrcmp (sub->name, (const xmlChar *) "location"))) {
+ LocationInfo *location = g_new0 (LocationInfo, 1);
+ info->location = location;
+- info->location->city = (gchar *) xmlNodeListGetString (sub, sub->xmlChildrenNode, 1);
++ info->location->city = (gchar *) xmlNodeListGetString (doc, sub->xmlChildrenNode, 1);
+ g_print ("location:city:%s\n", info->location->city);
+- info->location->lat = (gdouble *)xmlGetProp(sub, (const xmlChar *)"lat");
++ info->location->lat = (gchar *)xmlGetProp(sub, (const xmlChar *)"lat");
+ g_print ("location:lat:%s\n", info->location->lat);
+- info->location->lon = (gdouble *)xmlGetProp(sub, (const xmlChar *)"lon");
++ info->location->lon = (gchar *)xmlGetProp(sub, (const xmlChar *)"lon");
+ g_print ("location:lon:%s\n", info->location->lon);
+ }
+ if ((!xmlStrcmp (sub->name, (const xmlChar *) "stream"))) {
+ StreamInfo *stream = g_new0 (StreamInfo, 1);
+ info->stream = stream;
+- info->stream->uri = (gchar *) xmlNodeListGetString (sub, sub->xmlChildrenNode, 1);
++ info->stream->uri = (gchar *) xmlNodeListGetString (doc, sub->xmlChildrenNode, 1);
+ g_print ("stream:uri:%s\n", info->stream->uri);
+ /* Create the voice player */
+ player = gst_player_new (NULL, gst_player_g_main_context_signal_dispatcher_new(NULL));
+--- gnome-voice-1.2.0/src/gnome-voice-main.c.orig 2022-11-28 11:31:41.000000000 +0100
++++ gnome-voice-1.2.0/src/gnome-voice-main.c 2025-08-31 18:44:18.780606461 +0200
+@@ -72,12 +72,12 @@ marker_function (ChamplainMarker *self,
+ VoiceInfo *voinfo;
+ player = gst_player_new (NULL, gst_player_g_main_context_signal_dispatcher_new(NULL));
+ voinfo = gnome_voice_file_loader (voinfo, voice_filename);
++ station = (gchar *)champlain_label_get_text (CHAMPLAIN_LABEL (self));
++ station_link = strtok(station, "\n");
+ while (voinfo != NULL) {
+- if (strcasecmp(voinfo->location, station_link)==0) {
+- station = (gchar *)champlain_label_get_text (CHAMPLAIN_LABEL (self));
+- station_link = strtok(station, "\n");
++ if (strcasecmp(voinfo->location->city, station_link)==0) {
+ player = gst_player_new (NULL, gst_player_g_main_context_signal_dispatcher_new(NULL));
+- gst_player_set_uri (GST_PLAYER (player), voinfo->stream);
++ gst_player_set_uri (GST_PLAYER (player), voinfo->stream->uri);
+ gst_player_play(GST_PLAYER (player));
+ }
+ voinfo = voinfo->next;
+@@ -98,7 +98,7 @@ create_marker_layer (G_GNUC_UNUSED Champ
+ gchar *station = NULL, *station_link;
+ VoiceInfo *voinfo = gnome_voice_file_loader (voinfo, voice_filename);
+ *path = champlain_path_layer_new ();
+- champlain_path_layer_set_stroke_color(path, &city_color);
++ champlain_path_layer_set_stroke_color(*path, &city_color);
+ layer = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE);
+ layer_actor = CLUTTER_ACTOR (layer);
+ while (voinfo != NULL) {
+@@ -595,6 +595,7 @@ static void gv_wizard_close(GtkAssistant
+ GError *error = NULL;
+ GBytes *bytes;
+ gchar *voicegram_save_url;
++ char lenstr[30];
+ voiceinfo = (VoiceInfo *) data;
+ /* Geographical Position System Location. */
+ /* lat_gps = gclue_location_get_latitude (location); */
+@@ -614,8 +615,9 @@ static void gv_wizard_close(GtkAssistant
+ fprintf(voice_pointer, " <stream>https://www.gnomevoice.org/stream/data/%s%s</stream>\n", timebuffer, ".voice");
+ fprintf(voice_pointer, " </station>\n");
+ fprintf(voice_pointer, "</voice>\n");
++ sprintf(lenstr, "%ld", ftell(voice_pointer));
+ fclose(voice_pointer);
+- voicegram_save_url = g_strconcat(g_strconcat("https://www.gnomevoice.org/stream/?notBefore=", g_date_time_format_iso8601 (t_timebuffer), NULL), g_strconcat("¬After=",g_date_time_format_iso8601 (t_timebuffer), "&label=GNOME&sofset=0&eofset=", NULL), g_strconcat(strlen(voice_pointer), "&MAX_FILE_SIZE=5000000&userfile=", filename_voice, NULL));
++ voicegram_save_url = g_strconcat(g_strconcat("https://www.gnomevoice.org/stream/?notBefore=", g_date_time_format_iso8601 (t_timebuffer), NULL), g_strconcat("¬After=",g_date_time_format_iso8601 (t_timebuffer), "&label=GNOME&sofset=0&eofset=", NULL), g_strconcat(lenstr, "&MAX_FILE_SIZE=5000000&userfile=", filename_voice, NULL));
+ msg = soup_message_new ("POST", voicegram_save_url);
+ soup_message_set_request (msg, "application/xml",
+ SOUP_MEMORY_COPY,
+@@ -730,7 +732,7 @@ main (gint argc, gchar **argv)
+ gtk_clutter_init(&argc, &argv);
+ window = gtk_clutter_window_new ();
+ introduction = gtk_assistant_new();
+- gtk_container_add (GTK_WINDOW (window), introduction);
++ gtk_container_add (GTK_CONTAINER (window), introduction);
+ gtk_widget_set_size_request(GTK_WIDGET(introduction), 640, 480);
+ gtk_window_set_title(GTK_WINDOW(introduction), "Voice 1.2.0");
+ g_signal_connect(G_OBJECT(introduction), "destroy",
+@@ -739,8 +741,8 @@ main (gint argc, gchar **argv)
+ page[1].widget = gtk_box_new(FALSE, 5);
+ title_label = gtk_label_new(_("Voicegram:"));
+ title_entry = gtk_entry_new();
+- gtk_entry_set_max_length (title_entry, 256);
+- if (g_strcmp0(title_entry, NULL)!=0) gtk_entry_set_text(GTK_ENTRY(title_entry), g_strconcat(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), "/GNOME.voice", NULL)); else gtk_entry_set_text(GTK_ENTRY(title_entry), gtk_entry_get_text(GTK_ENTRY(title_entry)));
++ gtk_entry_set_max_length (GTK_ENTRY (title_entry), 256);
++ if (g_strcmp0(gtk_entry_get_text(GTK_ENTRY(title_entry)), NULL)!=0) gtk_entry_set_text(GTK_ENTRY(title_entry), g_strconcat(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), "/GNOME.voice", NULL)); else gtk_entry_set_text(GTK_ENTRY(title_entry), gtk_entry_get_text(GTK_ENTRY(title_entry)));
+ gtk_box_pack_start(GTK_BOX(page[1].widget), GTK_WIDGET(title_label),
+ FALSE, FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(page[1].widget), GTK_WIDGET(title_entry),
+@@ -748,7 +750,7 @@ main (gint argc, gchar **argv)
+ page[2].widget = gtk_box_new(FALSE, 5);
+ filename_label = gtk_label_new(_("Filename:"));
+ filename_entry = gtk_entry_new();
+- if (g_strcmp0(filename_entry, NULL)!=0) gtk_entry_set_text(GTK_ENTRY(filename_entry), g_strconcat ("GNOME.ogg", NULL)); else gtk_entry_set_text(GTK_ENTRY(filename_entry), gtk_entry_get_text(GTK_ENTRY(filename_entry)));
++ if (g_strcmp0(gtk_entry_get_text(GTK_ENTRY(filename_entry)), NULL)!=0) gtk_entry_set_text(GTK_ENTRY(filename_entry), g_strconcat ("GNOME.ogg", NULL)); else gtk_entry_set_text(GTK_ENTRY(filename_entry), gtk_entry_get_text(GTK_ENTRY(filename_entry)));
+ gtk_box_pack_start(GTK_BOX(page[2].widget), GTK_WIDGET(filename_label),
+ FALSE, FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(page[2].widget), GTK_WIDGET(filename_entry),
+@@ -800,9 +802,9 @@ main (gint argc, gchar **argv)
+ enc = gst_element_factory_make("vorbisenc", "vorbis_enc");
+ muxer = gst_element_factory_make("oggmux", "oggmux");
+ sink = gst_element_factory_make("filesink", "sink");
+- filename = g_strconcat("file://", g_get_host_name(), g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), gtk_entry_get_text(filename_entry), NULL);
++ filename = g_strconcat("file://", g_get_host_name(), g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), gtk_entry_get_text(GTK_ENTRY(filename_entry)), NULL);
+ g_object_set(G_OBJECT(sink), "location",
+- g_strconcat(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), "/", gtk_entry_get_text(filename_entry), NULL));
++ g_strconcat(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC), "/", gtk_entry_get_text(GTK_ENTRY(filename_entry)), NULL));
+ gst_bin_add_many(GST_BIN(pipeline), src, conv, enc, muxer, sink, NULL);
+ gst_element_link_many(src, conv, enc, muxer, sink, NULL);
+
+@@ -812,7 +814,7 @@ main (gint argc, gchar **argv)
+ GST_TAG_MERGE_APPEND,
+ GST_TAG_TITLE, g_get_real_name(),
+ GST_TAG_ARTIST, g_get_real_name(),
+- GST_TAG_ALBUM, gtk_entry_get_text(filename_entry),
++ GST_TAG_ALBUM, gtk_entry_get_text(GTK_ENTRY(filename_entry)),
+ GST_TAG_COMMENT, "Voice 1.2.0",
+ GST_TAG_DATE, g_date_time_format_iso8601 (datestamp),
+ NULL);
+@@ -824,8 +826,8 @@ main (gint argc, gchar **argv)
+ /* vosc = (VOSCWindow *)g_new0(VOSCWindow, 1); */
+ stage = clutter_stage_new ();
+
+- wizard = gtk_clutter_window_get_stage (GTK_WINDOW (window));
+- clutter_stage_set_title (stage, g_strconcat(PACKAGE, " ", VERSION, " - ", "http://www.gnomevoice.org/", " - ", "https://wiki.gnome.org/Apps/Voice", NULL));
++ wizard = gtk_clutter_window_get_stage (GTK_CLUTTER_WINDOW (window));
++ clutter_stage_set_title (CLUTTER_STAGE(stage), g_strconcat(PACKAGE, " ", VERSION, " - ", "http://www.gnomevoice.org/", " - ", "https://wiki.gnome.org/Apps/Voice", NULL));
+ clutter_actor_set_size (stage, 800, 600);
+ g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
+ /* Create the map view */
+@@ -838,9 +840,9 @@ main (gint argc, gchar **argv)
+ /* Create the voice_marker layer */
+ // layer = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE);
+ world = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE);
+- layer = create_marker_layer (actor, &path);
+- champlain_view_add_layer (actor, CHAMPLAIN_LAYER (path));
+- champlain_view_add_layer (actor, CHAMPLAIN_LAYER (layer));
++ layer = create_marker_layer (CHAMPLAIN_VIEW (actor), &path);
++ champlain_view_add_layer (CHAMPLAIN_VIEW (actor), CHAMPLAIN_LAYER (path));
++ champlain_view_add_layer (CHAMPLAIN_VIEW (actor), CHAMPLAIN_LAYER (layer));
+
+ clutter_actor_show (CLUTTER_ACTOR (layer));
+ clutter_actor_show (CLUTTER_ACTOR (world));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gnome-voice.git/commitdiff/b2c5980d651ea5aa57f94bc33896abc03c1b5c93
More information about the pld-cvs-commit
mailing list