summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-03-26 20:04:29 +0000
committerPacho Ramos <pacho@gentoo.org>2011-03-26 20:04:29 +0000
commit4492f4931ea571d5519d8be0be1d0726805cbb84 (patch)
treede4be26f7349d6bb0c821dc074f59b6d69a1d766 /gnome-extra/yelp/files
parentStable on amd64 wrt bug #360625 (diff)
downloadgentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.tar.gz
gentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.tar.bz2
gentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.zip
Include upstream patches and opensuse fixes for crashes when printing and freezing problems.
(Portage version: 2.1.9.44/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/yelp/files')
-rw-r--r--gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch116
-rw-r--r--gnome-extra/yelp/files/yelp-2.30.2-html-print.patch41
-rw-r--r--gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch33
-rw-r--r--gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch38
-rw-r--r--gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch28
5 files changed, 256 insertions, 0 deletions
diff --git a/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch b/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch
new file mode 100644
index 000000000000..2b5e1840fde5
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch
@@ -0,0 +1,116 @@
+commit fd70739a133053042360d14fd7e6bc9db884e021
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Sun Feb 20 16:00:00 2011 +0100
+
+ Fix small freezes when moving window
+
+ This is similar to ce9025ff: we only save the window size after a
+ timeout, to stop always saving a file which calls fsync() and is
+ therefore slow.
+
+ We also don't save the size if it hasn't changed.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642813
+
+diff --git a/src/yelp-window.c b/src/yelp-window.c
+index abad787..ea57576 100644
+--- a/src/yelp-window.c
++++ b/src/yelp-window.c
+@@ -284,6 +284,10 @@ struct _YelpWindowPriv {
+ gulong cancel_handler;
+ gulong finish_handler;
+
++ guint resize_timeout;
++ gint saved_width;
++ gint saved_height;
++
+ gint toc_pause;
+
+ GtkActionGroup *action_group;
+@@ -510,8 +514,12 @@ window_init (YelpWindow *window)
+ width = YELP_CONFIG_WIDTH_DEFAULT;
+ if (height == 0)
+ height = YELP_CONFIG_HEIGHT_DEFAULT;
++
+ }
+
++ window->priv->saved_width = width;
++ window->priv->saved_height = height;
++
+ g_free (config_path);
+ g_key_file_free (keyfile);
+
+@@ -538,6 +546,10 @@ window_finalize (GObject *object)
+ YelpWindow *window = YELP_WINDOW (object);
+ YelpWindowPriv *priv = window->priv;
+
++ if (window->priv->resize_timeout)
++ g_source_remove (window->priv->resize_timeout);
++ window->priv->resize_timeout = 0;
++
+ g_object_unref (priv->action_group);
+ g_object_unref (priv->ui_manager);
+
+@@ -1810,26 +1822,22 @@ window_set_loading (YelpWindow *window)
+ /** Window Callbacks **********************************************************/
+
+ static gboolean
+-window_configure_cb (GtkWidget *widget,
+- GdkEventConfigure *event,
+- gpointer data)
++save_window_size (YelpWindow *window,
++ gpointer data)
+ {
+- gint width, height;
+ GKeyFile *keyfile;
+ GError *config_error = NULL;
+ gchar *sdata, *config_path;
+ gsize config_size;
+
+- gtk_window_get_size (GTK_WINDOW (widget), &width, &height);
+-
+ keyfile = g_key_file_new();
+
+ config_path = g_strconcat (g_get_home_dir(), YELP_CONFIG_PATH, NULL);
+
+ g_key_file_set_integer (keyfile, YELP_CONFIG_GEOMETRY_GROUP,
+- YELP_CONFIG_WIDTH, width);
++ YELP_CONFIG_WIDTH, window->priv->saved_width);
+ g_key_file_set_integer (keyfile, YELP_CONFIG_GEOMETRY_GROUP,
+- YELP_CONFIG_HEIGHT, height);
++ YELP_CONFIG_HEIGHT, window->priv->saved_height);
+
+ sdata = g_key_file_to_data (keyfile, &config_size, NULL);
+
+@@ -1846,6 +1854,31 @@ window_configure_cb (GtkWidget *widget,
+ return FALSE;
+ }
+
++static gboolean
++window_configure_cb (GtkWidget *widget,
++ GdkEventConfigure *event,
++ gpointer data)
++{
++ gint width, height;
++ YelpWindow *window = YELP_WINDOW (widget);
++
++ gtk_window_get_size (GTK_WINDOW (widget), &width, &height);
++
++ if (width == window->priv->saved_width &&
++ height == window->priv->saved_height)
++ return FALSE;
++
++ window->priv->saved_width = width;
++ window->priv->saved_height = height;
++
++ if (window->priv->resize_timeout)
++ g_source_remove (window->priv->resize_timeout);
++
++ window->priv->resize_timeout = g_timeout_add (200, (GSourceFunc) save_window_size, widget);
++
++ return FALSE;
++}
++
+ /** Gecko Callbacks ***********************************************************/
+
+ static void
diff --git a/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch b/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch
new file mode 100644
index 000000000000..a6a7c44a0f4b
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch
@@ -0,0 +1,41 @@
+commit ea6d2b724ae5b868e08b8ba3593ff79666912b81
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Sun Feb 20 15:55:13 2011 +0100
+
+ Fix crash and infinite loop when printing HTML document
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642811
+
+diff --git a/src/yelp-window.c b/src/yelp-window.c
+index 1221ba3..abad787 100644
+--- a/src/yelp-window.c
++++ b/src/yelp-window.c
+@@ -1181,6 +1181,8 @@ yelp_window_load (YelpWindow *window, const gchar *uri)
+ (void *) window);
+ g_free (faux_frag_id);
+ priv->current_document = doc;
++ } else {
++ window->priv->current_document = NULL;
+ }
+
+ Exit:
+@@ -2190,6 +2192,8 @@ window_print_page_cb (GtkAction *action, YelpWindow *window)
+ * There are more sinister forces at work...
+ */
+
++ yelp_html_set_base_uri (html, priv->uri);
++
+ switch (priv->current_type) {
+ case YELP_RRN_TYPE_HTML:
+ yelp_html_open_stream (html, "text/html");
+@@ -2204,8 +2208,8 @@ window_print_page_cb (GtkAction *action, YelpWindow *window)
+ g_assert_not_reached ();
+ }
+
+- while ((g_input_stream_read_all
+- ((GInputStream *)stream, buffer, BUFFER_SIZE, &n, NULL, NULL))) {
++ while ((n = g_input_stream_read
++ ((GInputStream *)stream, buffer, BUFFER_SIZE, NULL, NULL))) {
+ yelp_html_write (html, buffer, n);
+ }
+
diff --git a/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch b/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch
new file mode 100644
index 000000000000..787476f9dcff
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch
@@ -0,0 +1,33 @@
+From d8a0c136b10d174beae8fd5cfeeb83ef18e83846 Mon Sep 17 00:00:00 2001
+From: Shaun McCance <shaunm@gnome.org>
+Date: Thu, 18 Nov 2010 16:41:43 +0000
+Subject: [yelp-utils] Use g_build_filename to avoid missing slash problem
+
+We were assuming the results of g_get_system_data_dirs have a trailing
+slash. They might not, if you set XDG_DATA_DIRS without them.
+---
+diff --git a/src/yelp-utils.c b/src/yelp-utils.c
+index 7fb79e5..0027e08 100644
+--- a/src/yelp-utils.c
++++ b/src/yelp-utils.c
+@@ -116,15 +116,15 @@ resolve_process_ghelp (char *uri, gchar **result)
+ hash = NULL;
+ }
+ for (i = 0; type != YELP_RRN_TYPE_MAL && dirs[i]; i++) {
+- gchar *path = g_strdup_printf ("%sgnome/help/%s", dirs[i], dir);
++ gchar *path = g_build_filename (dirs[i], "gnome", "help", dir, NULL);
+ if (g_file_test (path, G_FILE_TEST_IS_DIR)) {
+ const gchar * const *langs = g_get_language_names ();
+ gint j;
+ for (j = 0; type != YELP_RRN_TYPE_MAL && langs[j]; j++) {
+- gchar *index = g_strdup_printf ("%sgnome/help/%s/%s/index.page", dirs[i], dir, langs[j]);
++ gchar *index = g_build_filename (dirs[i], "gnome", "help", dir, langs[j], "index.page", NULL);
+ if (g_file_test (index, G_FILE_TEST_IS_REGULAR)) {
+ type = YELP_RRN_TYPE_MAL;
+- *result = g_strdup_printf ("%sgnome/help/%s/%s/", dirs[i], dir, langs[j]);
++ *result = g_build_filename (dirs[i], "gnome", "help", dir, langs[j], NULL);
+ }
+ g_free (index);
+ }
+--
+cgit v0.9
diff --git a/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch b/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch
new file mode 100644
index 000000000000..a0833c9cdda1
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch
@@ -0,0 +1,38 @@
+commit b1b83204de2eef17e746c82138325b997d1684fd
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Sun Feb 20 14:48:40 2011 +0100
+
+ Fix crash when printing a whole document
+
+ We use g_strfreev() on an array with const strings. That's bad :-)
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642808
+
+diff --git a/src/yelp-db-print.c b/src/yelp-db-print.c
+index b85eea6..6a48f84 100644
+--- a/src/yelp-db-print.c
++++ b/src/yelp-db-print.c
+@@ -477,17 +477,17 @@ dbprint_process (YelpDbprint *dbprint)
+ params_max += 20;
+ params = g_renew (gchar *, params, params_max);
+ }
+- params[params_i++] = "db.chunk.extension";
++ params[params_i++] = g_strdup ("db.chunk.extension");
+ params[params_i++] = g_strdup ("\"\"");
+- params[params_i++] = "db.chunk.info_basename";
++ params[params_i++] = g_strdup ("db.chunk.info_basename");
+ params[params_i++] = g_strdup ("\"index\"");
+- params[params_i++] = "db.chunk.max_depth";
++ params[params_i++] = g_strdup ("db.chunk.max_depth");
+ params[params_i++] = g_strdup ("0");
+- params[params_i++] = "db2html.navbar.top";
++ params[params_i++] = g_strdup ("db2html.navbar.top");
+ params[params_i++] = g_strdup ("0");
+- params[params_i++] = "db2html.navbar.bottom";
++ params[params_i++] = g_strdup ("db2html.navbar.bottom");
+ params[params_i++] = g_strdup ("0");
+- params[params_i++] = "db2html.sidenav";
++ params[params_i++] = g_strdup ("db2html.sidenav");
+ params[params_i++] = g_strdup ("0");
+
+ params[params_i] = NULL;
diff --git a/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch b/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch
new file mode 100644
index 000000000000..7a7798d6b924
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch
@@ -0,0 +1,28 @@
+From f79bf2d8e632771275e89b67a218b22bb699afa7 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Wed, 22 Dec 2010 21:11:01 +0000
+Subject: Add schemehandler information to the desktop file
+
+This should arrange things so that gtk_show_uri (..."ghelp:epiphany"...)
+will just work.
+---
+diff --git a/yelp.desktop.in.in b/yelp.desktop.in.in
+index 6c71b95..02e8cdf 100644
+--- a/yelp.desktop.in.in
++++ b/yelp.desktop.in.in
+@@ -2,7 +2,7 @@
+ _Name=Help
+ _Comment=Get help with GNOME
+ OnlyShowIn=GNOME;
+-Exec=yelp
++Exec=yelp %u
+ Icon=help-browser
+ StartupNotify=true
+ Terminal=false
+@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
+ X-GNOME-Bugzilla-Product=Yelp
+ X-GNOME-Bugzilla-Component=general
+ X-GNOME-Bugzilla-Version=@VERSION@
++MimeType=x-scheme-handler/ghelp;x-scheme-handler/help;x-scheme-handler/info;x-scheme-handler/man;
+--
+cgit v0.9