summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-07-29 17:49:52 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-07-29 17:49:52 +0000
commit89e2f6ea6cc55ea52a983771714b2fa827f33573 (patch)
tree45cfa718253c9507cf46d83fc24933920044bcdc /media-sound/gnomeradio/files
parentUse -j1 for build/install (bug #326987). (diff)
downloadgentoo-2-89e2f6ea6cc55ea52a983771714b2fa827f33573.tar.gz
gentoo-2-89e2f6ea6cc55ea52a983771714b2fa827f33573.tar.bz2
gentoo-2-89e2f6ea6cc55ea52a983771714b2fa827f33573.zip
Import Fedora patchset. Fix V4L2 detection wrt #325127 by Jaime Martin. Fix crash in main view.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/gnomeradio/files')
-rw-r--r--media-sound/gnomeradio/files/gnomeradio-1.8-crash.patch166
-rw-r--r--media-sound/gnomeradio/files/gnomeradio-1.8-v4l2.patch24
2 files changed, 190 insertions, 0 deletions
diff --git a/media-sound/gnomeradio/files/gnomeradio-1.8-crash.patch b/media-sound/gnomeradio/files/gnomeradio-1.8-crash.patch
new file mode 100644
index 000000000000..60b66723a358
--- /dev/null
+++ b/media-sound/gnomeradio/files/gnomeradio-1.8-crash.patch
@@ -0,0 +1,166 @@
+From 7694c70f99731724dad64444484d070ff760db89 Mon Sep 17 00:00:00 2001
+From: Jörgen Scheibengruber <mfcn@src.gnome.org>
+Date: Sat, 13 Sep 2008 21:00:09 +0000
+Subject: Don't update menus while main-view and tray-icon are not visible yet
+
+ * src/gui.c (main):
+ * src/prefs.c (add_button_clicked_cb), (del_button_clicked_cb),
+ (name_cell_edited_cb):
+ Don't update menus while main-view and tray-icon are not visible yet
+
+
+svn path=/trunk/; revision=208
+---
+diff --git a/ChangeLog b/ChangeLog
+index 973a754..814a52d 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,12 @@
+ 2008-09-13 Jörgen Scheibengruber <mfcn@gmx.de>
+
++ * src/gui.c (main):
++ * src/prefs.c (add_button_clicked_cb), (del_button_clicked_cb),
++ (name_cell_edited_cb):
++ Don't update menus while main-view and tray-icon are not visible yet
++
++2008-09-13 Jörgen Scheibengruber <mfcn@gmx.de>
++
+ * configure.in:
+ * src/Makefile.am:
+
+diff --git a/src/gui.c b/src/gui.c
+index faca2b7..6c2155f 100644
+--- a/src/gui.c
++++ b/src/gui.c
+@@ -54,6 +54,8 @@ GtkTooltips *tooltips;
+ int mom_ps;
+ gnomeradio_settings settings;
+
++gboolean main_visible;
++
+ static GtkWidget *drawing_area;
+ static GdkPixmap *digits, *signal_s, *stereo;
+ static GtkWidget *freq_scale;
+@@ -1110,6 +1112,7 @@ int main(int argc, char* argv[])
+ NULL);
+ gtk_window_set_default_icon_name("gnomeradio");
+ /* Main app */
++ main_visible = FALSE;
+ app = gnome_radio_gui();
+
+ /* Initizialize GStreamer */
+@@ -1150,6 +1153,7 @@ int main(int argc, char* argv[])
+ preset_combo_set_item(mom_ps);
+
+ gtk_widget_show_all(app);
++ main_visible = TRUE;
+
+ /* Create an tray icon */
+ create_tray_icon(app);
+diff --git a/src/prefs.c b/src/prefs.c
+index 425d116..7b8ee20 100644
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -30,6 +30,8 @@ extern GtkTooltips *tooltips;
+ extern int mom_ps;
+ extern gnomeradio_settings settings;
+
++extern gboolean main_visible;
++
+ static GtkWidget *device_entry;
+ static GtkWidget *mixer_combo;
+ static GtkWidget *mute_on_exit_cb;
+@@ -310,16 +312,18 @@ static void add_button_clicked_cb(GtkWidget *widget, gpointer data)
+ v_scb = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(list_view));
+ gtk_adjustment_set_value(v_scb, v_scb->upper);
+
+- gtk_combo_box_append_text(GTK_COMBO_BOX(preset_combo), ps->title);
+- mom_ps = g_list_length(settings.presets) - 1;
+- preset_combo_set_item(mom_ps);
+-
+- menuitems = GTK_MENU_SHELL(tray_menu)->children;
+- menuitem = gtk_menu_item_new_with_label(ps->title);
+-
+- gtk_menu_shell_insert(GTK_MENU_SHELL(tray_menu), menuitem, mom_ps);
+- g_signal_connect(G_OBJECT(menuitem), "activate", (GCallback)preset_menuitem_activate_cb, (gpointer)mom_ps);
+- gtk_widget_show(menuitem);
++ if (main_visible) {
++ gtk_combo_box_append_text(GTK_COMBO_BOX(preset_combo), ps->title);
++ mom_ps = g_list_length(settings.presets) - 1;
++ preset_combo_set_item(mom_ps);
++
++ menuitems = GTK_MENU_SHELL(tray_menu)->children;
++ menuitem = gtk_menu_item_new_with_label(ps->title);
++
++ gtk_menu_shell_insert(GTK_MENU_SHELL(tray_menu), menuitem, mom_ps);
++ g_signal_connect(G_OBJECT(menuitem), "activate", (GCallback)preset_menuitem_activate_cb, (gpointer)mom_ps);
++ gtk_widget_show(menuitem);
++ }
+
+ buffer = g_strdup_printf("%d", g_list_length(settings.presets) - 1);
+ path = gtk_tree_path_new_from_string(buffer);
+@@ -356,15 +360,17 @@ static void del_button_clicked_cb(GtkWidget *widget, gpointer data)
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(list_store), &iter, path);
+ gtk_list_store_remove(list_store, &iter);
+
+- gtk_combo_box_remove_text(GTK_COMBO_BOX(preset_combo), *row + 1);
+- if (--mom_ps < 0) mom_ps = 0;
+- if (!g_list_length(settings.presets)) mom_ps = -1;
+- preset_combo_set_item(mom_ps);
++ if (main_visible) {
++ gtk_combo_box_remove_text(GTK_COMBO_BOX(preset_combo), *row + 1);
++ if (--mom_ps < 0) mom_ps = 0;
++ if (!g_list_length(settings.presets)) mom_ps = -1;
++ preset_combo_set_item(mom_ps);
+
+- menuitems = GTK_MENU_SHELL(tray_menu)->children;
+- g_assert(*row < g_list_length(menuitems));
+- menuitem = g_list_nth_data(menuitems, *row);
+- gtk_widget_destroy(menuitem);
++ menuitems = GTK_MENU_SHELL(tray_menu)->children;
++ g_assert(*row < g_list_length(menuitems));
++ menuitem = g_list_nth_data(menuitems, *row);
++ gtk_widget_destroy(menuitem);
++ }
+
+ gtk_tree_path_prev(path);
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(list_view), path, NULL, FALSE);
+@@ -420,20 +426,22 @@ static void name_cell_edited_cb(GtkCellRendererText *cellrenderertext, gchar *pa
+ if (ps->title) g_free(ps->title);
+ ps->title = g_strdup(new_val);
+
+- gtk_combo_box_remove_text(GTK_COMBO_BOX(preset_combo), *row + 1);
+- gtk_combo_box_insert_text(GTK_COMBO_BOX(preset_combo), *row + 1, ps->title);
+- mom_ps = *row;
+- preset_combo_set_item(mom_ps);
+-
+- menuitems = GTK_MENU_SHELL(tray_menu)->children;
+- g_assert(mom_ps < g_list_length(menuitems));
+- menuitem = g_list_nth_data(menuitems, mom_ps);
+- gtk_widget_destroy(menuitem);
+- menuitem = gtk_menu_item_new_with_label(ps->title);
+-
+- gtk_menu_shell_insert(GTK_MENU_SHELL(tray_menu), menuitem, *row);
+- g_signal_connect(G_OBJECT(menuitem), "activate", (GCallback)preset_menuitem_activate_cb, (gpointer)mom_ps);
+- gtk_widget_show(menuitem);
++ if (main_visible) {
++ gtk_combo_box_remove_text(GTK_COMBO_BOX(preset_combo), *row + 1);
++ gtk_combo_box_insert_text(GTK_COMBO_BOX(preset_combo), *row + 1, ps->title);
++ mom_ps = *row;
++ preset_combo_set_item(mom_ps);
++
++ menuitems = GTK_MENU_SHELL(tray_menu)->children;
++ g_assert(mom_ps < g_list_length(menuitems));
++ menuitem = g_list_nth_data(menuitems, mom_ps);
++ gtk_widget_destroy(menuitem);
++ menuitem = gtk_menu_item_new_with_label(ps->title);
++
++ gtk_menu_shell_insert(GTK_MENU_SHELL(tray_menu), menuitem, *row);
++ g_signal_connect(G_OBJECT(menuitem), "activate", (GCallback)preset_menuitem_activate_cb, (gpointer)mom_ps);
++ gtk_widget_show(menuitem);
++ }
+
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(list_store), &iter, path);
+ gtk_list_store_set(GTK_LIST_STORE(list_store), &iter, 0, new_val, -1);
+--
+cgit v0.8.3.1
diff --git a/media-sound/gnomeradio/files/gnomeradio-1.8-v4l2.patch b/media-sound/gnomeradio/files/gnomeradio-1.8-v4l2.patch
new file mode 100644
index 000000000000..b527cdd2b3a5
--- /dev/null
+++ b/media-sound/gnomeradio/files/gnomeradio-1.8-v4l2.patch
@@ -0,0 +1,24 @@
+--- src/prefs.c
++++ src/prefs.c
+@@ -112,7 +112,7 @@
+ /* Load general settings */
+ settings.device = gconf_client_get_string(client, "/apps/gnomeradio/device" , NULL);
+ if (!settings.device)
+- settings.device = g_strdup("/dev/radio");
++ settings.device = g_strdup("/dev/radio0");
+ settings.driver = gconf_client_get_string(client, "/apps/gnomeradio/driver" , NULL);
+ if (!settings.driver)
+ settings.driver = g_strdup("any");
+--- src/radio.c
++++ src/radio.c
+@@ -41,9 +41,9 @@
+ }
+
+ switch (driver) {
++ case DRIVER_ANY:
+ case DRIVER_V4L2:
+ goto try_v4l2;
+- case DRIVER_ANY:
+ case DRIVER_V4L1:
+ default:
+ goto try_v4l1;