kalev pushed to empathy (f22). "Backport a fix for a wayland crash and a number of dialog width fixes"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat May 9 22:25:04 UTC 2015


From 64db66ebea95f32a25a895adf630aacfdb2a1b29 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember at gmail.com>
Date: Sat, 9 May 2015 23:12:07 +0200
Subject: Backport a fix for a wayland crash and a number of dialog width fixes


diff --git a/0001-Preferences-Fix-width-of-dialog.patch b/0001-Preferences-Fix-width-of-dialog.patch
new file mode 100644
index 0000000..4588716
--- /dev/null
+++ b/0001-Preferences-Fix-width-of-dialog.patch
@@ -0,0 +1,36 @@
+From 4cf6b1a8a581f63d9a39844ab7968df1453eed0e Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at gnome.org>
+Date: Tue, 21 Apr 2015 19:17:36 -0500
+Subject: [PATCH 1/8] Preferences: Fix width of dialog
+
+If we don't set a width limit, the labels will never wrap, and the
+preferences dialog will expand to fill the entire screen horizontally.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741771
+---
+ src/empathy-preferences.ui | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
+index 9aa204f..a8015ac 100644
+--- a/src/empathy-preferences.ui
++++ b/src/empathy-preferences.ui
+@@ -650,6 +650,7 @@
+                             <property name="can_focus">False</property>
+                             <property name="xalign">0</property>
+                             <property name="label" translatable="yes">Echo cancellation helps to make your voice sound clearer to the other person, but may cause problems on some computers. If you or the other person hear strange noises or glitches during calls, try turning echo cancellation off and restarting the call.</property>
++                            <property name="max_width_chars">60</property>
+                             <property name="wrap">True</property>
+                             <attributes>
+                               <attribute name="scale" value="0.80000000000000004"/>
+@@ -777,6 +778,7 @@
+                             <property name="can_focus">False</property>
+                             <property name="xalign">0</property>
+                             <property name="label" translatable="yes">Reduced location accuracy means that nothing more precise than your city, state and country will be published.  GPS coordinates will be accurate to 1 decimal place.</property>
++                            <property name="max_width_chars">60</property>
+                             <property name="wrap">True</property>
+                             <attributes>
+                               <attribute name="scale" value="0.80000000000000004"/>
+-- 
+2.4.0
+
diff --git a/0002-Fix-preferences-with-modern-gtk.patch b/0002-Fix-preferences-with-modern-gtk.patch
new file mode 100644
index 0000000..2ffc845
--- /dev/null
+++ b/0002-Fix-preferences-with-modern-gtk.patch
@@ -0,0 +1,36 @@
+From 389f01f85c8d0fb904552764a1f54533cc3fa5be Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <scampa.giovanni at gmail.com>
+Date: Tue, 3 Mar 2015 00:55:54 -0800
+Subject: [PATCH 2/8] Fix preferences with modern gtk+
+
+Set the scrolled windows to expand so that they cover the entire
+preference window vertically.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=745504
+---
+ src/empathy-preferences.ui | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
+index a8015ac..b3a829a 100644
+--- a/src/empathy-preferences.ui
++++ b/src/empathy-preferences.ui
+@@ -545,6 +545,7 @@
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="shadow_type">in</property>
++                    <property name="vexpand">True</property>
+                     <child>
+                       <object class="GtkTreeView" id="treeview_sounds">
+                         <property name="visible">True</property>
+@@ -881,6 +882,7 @@
+                         <property name="visible">True</property>
+                         <property name="can_focus">False</property>
+                         <property name="shadow_type">in</property>
++                        <property name="vexpand">True</property>
+                         <child>
+                           <object class="GtkTreeView" id="treeview_spell_checker">
+                             <property name="visible">True</property>
+-- 
+2.4.0
+
diff --git a/0005-Limit-width-of-first-run-dialog.patch b/0005-Limit-width-of-first-run-dialog.patch
new file mode 100644
index 0000000..c378fa8
--- /dev/null
+++ b/0005-Limit-width-of-first-run-dialog.patch
@@ -0,0 +1,25 @@
+From 4cac3d17dc232fbdeeba0f95a45a776ce3df734c Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at gnome.org>
+Date: Tue, 21 Apr 2015 19:36:08 -0500
+Subject: [PATCH 5/8] Limit width of first run dialog
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747460
+---
+ libempathy-gtk/empathy-local-xmpp-assistant-widget.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+index 6ee8711..ff34b16 100644
+--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
++++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+@@ -85,6 +85,7 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object)
+         "details below are correct."));
+   gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5);
+   gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
++  gtk_label_set_max_width_chars (GTK_LABEL (w), 60);
+   gtk_grid_attach (GTK_GRID (self), w, 0, 0, 1, 1);
+   gtk_widget_show (w);
+ 
+-- 
+2.4.0
+
diff --git a/0008-Don-t-crash-when-running-in-Wayland.patch b/0008-Don-t-crash-when-running-in-Wayland.patch
new file mode 100644
index 0000000..c985b63
--- /dev/null
+++ b/0008-Don-t-crash-when-running-in-Wayland.patch
@@ -0,0 +1,81 @@
+From 193e853c8b0d3c1222d7565eb209354f460cad9b Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at gnome.org>
+Date: Sat, 9 May 2015 09:59:49 -0500
+Subject: [PATCH 8/8] Don't crash when running in Wayland
+
+It's wrong to use X11-specific APIs without checking:
+
+* If GTK+ was compiled with support for X11
+* If the application is currently running in X11
+---
+ libempathy-gtk/empathy-avatar-image.c | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c
+index 78a3e5f..1468802 100644
+--- a/libempathy-gtk/empathy-avatar-image.c
++++ b/libempathy-gtk/empathy-avatar-image.c
+@@ -119,6 +119,19 @@ avatar_image_finalize (GObject *object)
+ 	G_OBJECT_CLASS (empathy_avatar_image_parent_class)->finalize (object);
+ }
+ 
++#ifdef GDK_WINDOWING_X11
++static gboolean
++running_in_x11 (void)
++{
++	GdkDisplay* display;
++
++	display = gdk_display_get_default ();
++	if (!display)
++		return FALSE;
++
++	return GDK_IS_X11_DISPLAY (display);
++}
++
+ static GdkFilterReturn
+ avatar_image_filter_func (GdkXEvent  *gdkxevent,
+ 			  GdkEvent   *event,
+@@ -128,6 +141,9 @@ avatar_image_filter_func (GdkXEvent  *gdkxevent,
+ 	Atom                   atom;
+ 	EmpathyAvatarImagePriv *priv;
+ 
++	if (!running_in_x11 ())
++		return GDK_FILTER_CONTINUE;
++
+ 	priv = GET_PRIV (data);
+ 
+ 	if (xevent->type == PropertyNotify) {
+@@ -151,6 +167,9 @@ avatar_image_add_filter (EmpathyAvatarImage *avatar_image)
+ 	gint       mask;
+ 	XWindowAttributes attrs;
+ 
++	if (!running_in_x11 ())
++		return;
++
+ 	mask = PropertyChangeMask;
+ 
+ 	window = gdk_x11_get_default_root_xwindow ();
+@@ -167,6 +186,20 @@ avatar_image_add_filter (EmpathyAvatarImage *avatar_image)
+ 
+ 	gdk_window_add_filter (NULL, avatar_image_filter_func, avatar_image);
+ }
++#else
++static GdkFilterReturn
++avatar_image_filter_func (GdkXEvent  *gdkxevent,
++			  GdkEvent   *event,
++			  gpointer    data)
++{
++	return GDK_FILTER_CONTINUE;
++}
++
++static void
++avatar_image_add_filter (EmpathyAvatarImage *avatar_image)
++{
++}
++#endif
+ 
+ static void
+ avatar_image_remove_filter (EmpathyAvatarImage *avatar_image)
+-- 
+2.4.0
+
diff --git a/empathy.spec b/empathy.spec
index 7a3c4e3..ed22884 100644
--- a/empathy.spec
+++ b/empathy.spec
@@ -28,6 +28,12 @@ Source1:	%{name}-README.ConnectionManagers
 # Backported symbolic icon from upstream
 Source2:	https://git.gnome.org/browse/empathy/plain/data/icons/hicolor_apps_scalable_empathy-symbolic.svg
 
+# Backported patches from upstream
+Patch0:		0001-Preferences-Fix-width-of-dialog.patch
+Patch1:		0002-Fix-preferences-with-modern-gtk.patch
+Patch2:		0005-Limit-width-of-first-run-dialog.patch
+Patch3:		0008-Don-t-crash-when-running-in-Wayland.patch
+
 BuildRequires:	enchant-devel >= %{enchant_version}
 BuildRequires:	iso-codes-devel
 BuildRequires:	desktop-file-utils
@@ -85,6 +91,10 @@ It is built on top of the Telepathy framework.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 # force this to be regenerated
 rm data/empathy.desktop
 
@@ -207,6 +217,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %changelog
 * Sat May 09 2015 Kalev Lember <kalevlember at gmail.com> - 3.12.9-2
 - Backport symbolic app icon from upstream
+- Backport a fix for a wayland crash and a number of dialog width fixes
 
 * Thu Apr 16 2015 Kalev Lember <kalevlember at gmail.com> - 3.12.9-1
 - Update to 3.12.9
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/empathy.git/commit/?h=f22&id=64db66ebea95f32a25a895adf630aacfdb2a1b29


More information about the scm-commits mailing list