[cheese/f17] Fix missing images on buttons, also fixes the "Gtk-WARNING **: Attempting to

Hans de Goede jwrdegoede at fedoraproject.org
Wed Jun 6 12:45:11 UTC 2012


commit 75042e90b95483999243b2c306a43779cd9857a8
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Wed Jun 6 14:45:23 2012 +0200

    Fix missing images on buttons, also fixes the "Gtk-WARNING **: Attempting to
    
      add a widget with type GtkImage to a GtkButton ..." warnings (gnome#677543)
    - Fix cheese crashing when started on machines with v4l2 radio or vbi devices
      (rhbz#810429, gnome#677544)

 ...-Stop-warnings-caused-by-the-mode-buttons.patch |   53 ++++++++++++++++++++
 ...-ui-Fix-images-missing-from-effect-button.patch |   50 ++++++++++++++++++
 ...ce-monitor-Don-t-add-NULL-devices-to-the-.patch |   35 +++++++++++++
 cheese.spec                                        |   22 +++++++-
 4 files changed, 157 insertions(+), 3 deletions(-)
---
diff --git a/0002-Stop-warnings-caused-by-the-mode-buttons.patch b/0002-Stop-warnings-caused-by-the-mode-buttons.patch
new file mode 100644
index 0000000..a4373db
--- /dev/null
+++ b/0002-Stop-warnings-caused-by-the-mode-buttons.patch
@@ -0,0 +1,53 @@
+From 99991c361340fc0372fc65b039a051638f04a49b Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Mon, 12 Mar 2012 15:52:56 +0100
+Subject: [PATCH 2/4] Stop warnings caused by the mode buttons
+
+Once we've set the related action, the label will have been synced, and
+we won't be able to add an image to the button.
+
+Setting "use-action-appearance" to False before setting the
+related-action works around the problem. See GTK+ bug 671912.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=671913
+---
+ data/cheese-main-window.ui |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/data/cheese-main-window.ui b/data/cheese-main-window.ui
+index a435114..bdc84c5 100644
+--- a/data/cheese-main-window.ui
++++ b/data/cheese-main-window.ui
+@@ -50,8 +50,8 @@
+                         <property name="column-spacing">2</property>
+                         <child>
+                           <object class="GtkToggleButton" id="photo_toggle_button">
+-                            <property name="related-action">photo_mode</property>
+                             <property name="use-action-appearance">False</property>
++                            <property name="related-action">photo_mode</property>
+                             <property name="tooltip_text" translatable="yes">Photo mode</property>
+                             <child>
+                               <object class="GtkImage" id="photo_toggle_button_image">
+@@ -62,8 +62,8 @@
+                         </child>
+                         <child>
+                           <object class="GtkToggleButton" id="video_toggle_button">
+-                            <property name="related-action">video_mode</property>
+                             <property name="use-action-appearance">False</property>
++                            <property name="related-action">video_mode</property>
+                             <property name="tooltip_text" translatable="yes">Video mode</property>
+                             <child>
+                               <object class="GtkImage" id="video_toggle_button_image">
+@@ -74,8 +74,8 @@
+                         </child>
+                         <child>
+                           <object class="GtkToggleButton" id="burst_toggle_button">
+-                            <property name="related-action">burst_mode</property>
+                             <property name="use-action-appearance">False</property>
++                            <property name="related-action">burst_mode</property>
+                             <property name="tooltip_text" translatable="yes">Photo burst mode</property>
+                             <child>
+                               <object class="GtkImage" id="burst_toggle_button_image">
+-- 
+1.7.10.2
+
diff --git a/0003-main-window-ui-Fix-images-missing-from-effect-button.patch b/0003-main-window-ui-Fix-images-missing-from-effect-button.patch
new file mode 100644
index 0000000..ddc0799
--- /dev/null
+++ b/0003-main-window-ui-Fix-images-missing-from-effect-button.patch
@@ -0,0 +1,50 @@
+From 8a707dacf8615f88615a53ffe6eeb1ad65d94967 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Wed, 6 Jun 2012 11:23:47 +0200
+Subject: [PATCH 3/4] main-window-ui: Fix images missing from effect buttons
+
+Commit 4cb11731e62b51c684993e43000c933ea97785c2 fixed the images missing from
+the photo / video / burst buttons, but the same problem also affects the
+previous effects-page, effects, next effects-page buttons. This patch fixes
+them too.
+
+Note that unlike the commit message of commit 4cb11731 suggest this
+not only fixes the printing of warnings to the console, it also fixes
+the pixmaps actually missing from the buttons.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ data/cheese-main-window.ui |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/data/cheese-main-window.ui b/data/cheese-main-window.ui
+index bdc84c5..b0760bd 100644
+--- a/data/cheese-main-window.ui
++++ b/data/cheese-main-window.ui
+@@ -126,6 +126,7 @@
+                         <property name="column-spacing">0</property>
+                         <child>
+                           <object class="GtkButton" id="effects_prev_page_button">
++                            <property name="use-action-appearance">False</property>
+                             <property name="related-action">effects_page_prev</property>
+                             <property name="width-request">32</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+@@ -141,6 +142,7 @@
+                           <object class="GtkToggleButton" id="effects_toggle_button">
+                             <property name="vexpand">False</property>
+                             <property name="hexpand">False</property>
++                            <property name="use-action-appearance">False</property>
+                             <property name="related-action">effects_toggle</property>
+                             <property name="tooltip_text" translatable="yes">Effects</property>
+                             <child>
+@@ -165,6 +167,7 @@
+                         </child>
+                         <child>
+                           <object class="GtkButton" id="effects_next_page_button">
++                            <property name="use-action-appearance">False</property>
+                             <property name="related-action">effects_page_next</property>
+                             <property name="width-request">32</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+-- 
+1.7.10.2
+
diff --git a/0004-camera-device-monitor-Don-t-add-NULL-devices-to-the-.patch b/0004-camera-device-monitor-Don-t-add-NULL-devices-to-the-.patch
new file mode 100644
index 0000000..c27f42c
--- /dev/null
+++ b/0004-camera-device-monitor-Don-t-add-NULL-devices-to-the-.patch
@@ -0,0 +1,35 @@
+From ab319f83cd02e1a75c4d546deaefb27da70b51e6 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Tue, 5 Jun 2012 14:54:13 +0200
+Subject: [PATCH 4/4] camera-device-monitor: Don't add NULL devices to the
+ camera list
+
+cheese_camera_device_monitor_set_up_device() will return NULL for non
+video devices (ie vbi & radio devices). Emitting the added signal with
+such a NULL device, causes it to get added to the camera list, which later
+on causes cheese to crash.
+
+This patch fixes this by not emitting the added signal for non camera devices.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ libcheese/cheese-camera-device-monitor.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libcheese/cheese-camera-device-monitor.c b/libcheese/cheese-camera-device-monitor.c
+index d8b5a10..aa723c7 100644
+--- a/libcheese/cheese-camera-device-monitor.c
++++ b/libcheese/cheese-camera-device-monitor.c
+@@ -214,7 +214,8 @@ cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor *monitor,
+                                     GUdevDevice               *udevice)
+ {
+   CheeseCameraDevice *device = cheese_camera_device_monitor_set_up_device (udevice);
+-  g_signal_emit (monitor, monitor_signals[ADDED], 0, device);
++  if (device)
++    g_signal_emit (monitor, monitor_signals[ADDED], 0, device);
+ }
+ 
+ /*
+-- 
+1.7.10.2
+
diff --git a/cheese.spec b/cheese.spec
index 6a8c28e..798a22e 100644
--- a/cheese.spec
+++ b/cheese.spec
@@ -1,7 +1,7 @@
 Name:           cheese
 Epoch:          2
 Version:        3.4.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Application for taking pictures and movies from a webcam
 
 Group:          Amusements/Graphics
@@ -11,7 +11,13 @@ URL:            http://projects.gnome.org/cheese/
 Source0:        http://download.gnome.org/sources/cheese/3.4/%{name}-%{version}.tar.xz
 
 # https://bugzilla.gnome.org/show_bug.cgi?id=671110
-Patch0: 0001-Avoid-a-code-generation-problem.patch
+Patch1: 0001-Avoid-a-code-generation-problem.patch
+# Cherry picked from upstream git
+Patch2: 0002-Stop-warnings-caused-by-the-mode-buttons.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=677543
+Patch3: 0003-main-window-ui-Fix-images-missing-from-effect-button.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=677544
+Patch4: 0004-camera-device-monitor-Don-t-add-NULL-devices-to-the-.patch
 
 BuildRequires: gtk3-devel >= 3.0.0
 BuildRequires: gstreamer-devel >= 0.10.23
@@ -69,7 +75,11 @@ for writing applications that require a webcam display widget.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
 
 %build
 %configure --disable-static
@@ -144,6 +154,12 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %{_datadir}/gir-1.0/Cheese-3.0.gir
 
 %changelog
+* Tue Jun  5 2012 Hans de Goede <hdegoede at redhat.com> - 2:3.4.2-2
+- Fix missing images on buttons, also fixes the "Gtk-WARNING **: Attempting to
+  add a widget with type GtkImage to a GtkButton ..." warnings (gnome#677543)
+- Fix cheese crashing when started on machines with v4l2 radio or vbi devices
+  (rhbz#810429, gnome#677544)
+
 * Tue May 15 2012 Richard Hughes <hughsient at gmail.com> - 2:3.4.2-1
 - Update to 3.4.2
 


More information about the scm-commits mailing list