~ubuntu-branches/ubuntu/utopic/gnomeradio/utopic

« back to all changes in this revision

Viewing changes to debian/patches/gnomeradio-g_list.patch

  • Committer: Package Import Robot
  • Author(s): POJAR GEORGE
  • Date: 2013-12-24 10:38:24 UTC
  • Revision ID: package-import@ubuntu.com-20131224103824-ud5r2yrtyblv9ew6
Tags: 1.8-2ubuntu26
* debian/patches/gnomeradio-g_object.patch: Removed useless calls to the
  G_OBJECT() macro. (LP: #1267306)
* Updated debian/patches/gnomeradio-about.patch: Update COPYING file with
  latest versions from gnu.org. (LP: #1266203)
* Updated debian/patches/gnomeradio-gtk_stock.patch: UI make it more sleek, 
  remove relief from the UI buttons. (LP: #1265154)
* Updated debian/patches/gnomeradio-gtk_application.patch: Make the main
  window a GtkApplicationWindow.
* Updated debian/patches/gnomeradio-ngettext.patch: Fix localization, use
  g_dngettext instead of ngettext.
* Updated debian/patches/gnomeradio-record_information.patch: Use GDateTime
  instead of time_t.
* Moved changes from debian/patches/gnomeradio-thread_safe.patch to
  debian/patches/gnomeradio-alsa.patch and removed it as result.
* debian/control: Updated to Standards-Version 3.9.5, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
Index: gnomeradio-1.8/src/gui.c
5
5
===================================================================
6
 
--- gnomeradio-1.8.orig/src/gui.c       2013-12-04 05:58:02.730838625 +0000
7
 
+++ gnomeradio-1.8/src/gui.c    2013-12-04 05:58:02.726838625 +0000
8
 
@@ -186,13 +186,13 @@
 
6
--- gnomeradio-1.8.orig/src/gui.c       2014-01-05 13:44:22.648035647 +0000
 
7
+++ gnomeradio-1.8/src/gui.c    2014-01-05 13:44:22.644035647 +0000
 
8
@@ -189,7 +189,7 @@
9
9
                timeout_id = 0;
10
10
                gtk_widget_destroy(data.dialog);
11
11
        } else {
12
12
-               if (g_list_length(data.stations) > 0) {
13
13
+               if (data.stations != NULL) {
14
 
                        gfloat f = *((gfloat*)data.stations->data);
15
 
                        gtk_adjustment_set_value(adj, f*STEPS);
16
 
                        radio_set_freq(f);
17
 
                        
18
14
                        GtkWidget *dialog;
19
 
-                       GList *ptr;
20
 
+                       GList *l;
21
 
                        
22
 
                        char *text = g_strdup_printf (ngettext ("%d station found.\n"
23
 
                                                                "Do you want to add it as preset?",
24
 
@@ -207,15 +207,16 @@
25
 
                        int response = gtk_dialog_run(GTK_DIALOG(dialog));
26
 
                        gtk_widget_destroy(dialog);
27
 
 
28
 
-                       for (ptr = data.stations; ptr; ptr = ptr->next) {
29
 
+                       for (l = data.stations; l; l = l->next) {
 
15
                        GList *l;
 
16
                        guint num;
 
17
@@ -215,11 +215,12 @@
30
18
                                if (response == GTK_RESPONSE_YES) {
31
19
                                        preset *ps = g_malloc0(sizeof(preset));
32
20
                                        ps->title = g_strdup(_("unnamed"));
33
 
-                                       ps->freq = *((gfloat*)ptr->data);
 
21
-                                       ps->freq = *((gfloat*)l->data);
34
22
-                                       settings.presets = g_list_append(settings.presets, ps);
35
23
+                                       ps->freq = *((gfloat*) l->data);
36
24
+                                       settings.presets = g_list_prepend(settings.presets, ps);
37
25
                                }
38
 
-                               g_free(ptr->data);
 
26
-                               g_free(l->data);
 
27
-                       }       
39
28
+                               g_free (l->data);
40
 
                        }       
 
29
+                       }
41
30
+                       settings.presets = g_list_reverse(settings.presets);
42
31
                }
43
32
        }       
44
33
 }      
45
 
@@ -1325,7 +1326,7 @@
 
34
@@ -1331,7 +1332,7 @@
46
35
 
47
36
 int main(int argc, char* argv[])
48
37
 {
51
40
        DBusGProxy *proxy;
52
41
        GError *err = NULL;
53
42
        gboolean do_scan = FALSE;
54
 
@@ -1400,10 +1401,11 @@
 
43
@@ -1406,10 +1407,11 @@
55
44
        create_tray_menu(app);
56
45
        
57
46
        gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(preset_combo), _("manual"));
67
56
        gtk_widget_show_all(app);
68
57
Index: gnomeradio-1.8/src/prefs.c
69
58
===================================================================
70
 
--- gnomeradio-1.8.orig/src/prefs.c     2013-12-04 05:58:02.730838625 +0000
71
 
+++ gnomeradio-1.8/src/prefs.c  2013-12-04 05:58:02.726838625 +0000
 
59
--- gnomeradio-1.8.orig/src/prefs.c     2014-01-05 13:44:22.648035647 +0000
 
60
+++ gnomeradio-1.8/src/prefs.c  2014-01-05 13:44:22.644035647 +0000
72
61
@@ -179,8 +179,10 @@
73
62
                else
74
63
                        ps->freq = freq;