[bluefish/f16] Cumulative bugfix update for 2.0.3
Paul Howarth
pghmcfc at fedoraproject.org
Mon Dec 12 11:59:41 UTC 2011
commit cd8ec78b2799e4e2b961c1e89dd6d4cef83538d4
Author: Paul Howarth <paul at city-fan.org>
Date: Mon Dec 12 11:56:45 2011 +0000
Cumulative bugfix update for 2.0.3
- Fix segfault on save file (Gnome bug 645936, #691129)
- Fix crash on exit (Gnome bug 665410, #751535)
- Update patch for #683497 with further changes from upstream; this may also
fix Gnome bug 644495 (#668784, #678737) and 657163 (#732460)
bluefish.spec | 27 +++++++++++++++++++-
fedora_bug_683497.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++-
fedora_bug_691129.patch | 20 +++++++++++++++
fedora_bug_751535.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 162 insertions(+), 4 deletions(-)
---
diff --git a/bluefish.spec b/bluefish.spec
index 74c20e3..8e5cdbf 100644
--- a/bluefish.spec
+++ b/bluefish.spec
@@ -1,6 +1,6 @@
%global pkgver 2.0.3
#global prerel rc2
-%global rpmrel 4
+%global rpmrel 5
Name: bluefish
Version: %{pkgver}
@@ -13,6 +13,8 @@ Source0: http://www.bennewitz.com/bluefish/stable/source/bluefish-%{version}%{?p
Patch0: bluefish_bug_643150_643153.patch
Patch1: fedora_bug_683497.patch
Patch2: fedora_bug_720990.patch
+Patch3: fedora_bug_691129.patch
+Patch4: fedora_bug_751535.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires: desktop-file-utils
BuildRequires: enchant-devel >= 1.4.2
@@ -74,9 +76,14 @@ Files common to every architecture version of %{name}.
# https://bugzilla.redhat.com/show_bug.cgi?id=680626
%patch0 -p0
-# Workaround for a crash-on-close bug
+# Workaround for crash-on-close bugs
# https://bugzilla.gnome.org/show_bug.cgi?id=637990
+# https://bugzilla.gnome.org/show_bug.cgi?id=644495
+# https://bugzilla.gnome.org/show_bug.cgi?id=657163
+# https://bugzilla.redhat.com/show_bug.cgi?id=668784
+# https://bugzilla.redhat.com/show_bug.cgi?id=678737
# https://bugzilla.redhat.com/show_bug.cgi?id=683497
+# https://bugzilla.redhat.com/show_bug.cgi?id=732460
%patch1 -p0
# Fix crash in _gtk_text_btree_get_chars_changed_stamp
@@ -84,6 +91,16 @@ Files common to every architecture version of %{name}.
# https://bugzilla.redhat.com/show_bug.cgi?id=720990
%patch2 -p0
+# Fix segfault on save file
+# https://bugzilla.gnome.org/show_bug.cgi?id=645936
+# https://bugzilla.redhat.com/show_bug.cgi?id=691129
+%patch3 -p1
+
+# Fix crash on exit
+# https://bugzilla.gnome.org/show_bug.cgi?id=665410
+# https://bugzilla.redhat.com/show_bug.cgi?id=751535
+%patch4 -p1
+
%build
%configure --disable-dependency-tracking \
--disable-static \
@@ -160,6 +177,12 @@ fi
%{_mandir}/man1/%{name}.1*
%changelog
+* Mon Dec 5 2011 Paul Howarth <paul at city-fan.org> - 2.0.3-5
+- Fix segfault on save file (Gnome bug 645936, #691129)
+- Fix crash on exit (Gnome bug 665410, #751535)
+- Update patch for #683497 with further changes from upstream; this may also
+ fix Gnome bug 644495 (#668784, #678737) and 657163 (#732460)
+
* Fri Jul 22 2011 Paul Howarth <paul at city-fan.org> - 2.0.3-4
- Fix crash in _gtk_text_btree_get_chars_changed_stamp
(Gnome bug 654838, #720990)
diff --git a/fedora_bug_683497.patch b/fedora_bug_683497.patch
index fdc6cbb..6835529 100644
--- a/fedora_bug_683497.patch
+++ b/fedora_bug_683497.patch
@@ -1,18 +1,74 @@
+This patch built from upstream svn changesets 6446, 6828 and 6829.
+
Index: src/file_autosave.c
===================================================================
--- src/file_autosave.c (revision 6439)
+++ src/file_autosave.c (working copy)
-@@ -178,9 +178,10 @@
+@@ -178,9 +178,12 @@
/* cancel running autosave */
if (doc->autosave_progress) {
- file_checkNsave_cancel(doc->autosave_action);
- main_v->autosave_progress = g_list_delete_link(main_v->autosave_progress, doc->autosave_progress);
- doc->autosave_progress = NULL;
-+ if (doc->autosave_action)
++ if (doc->autosave_action) {
+ file_checkNsave_cancel(doc->autosave_action);
++ doc->autosave_action = NULL;
++ }
+ main_v->autosave_progress = g_list_delete_link(main_v->autosave_progress, doc->autosave_progress);
+ doc->autosave_progress = NULL;
}
if (doc->autosave_uri) {
+Index: src/file.c
+===================================================================
+--- src/file.c (revision 6827)
++++ src/file.c (revision 6829)
+@@ -401,7 +401,10 @@
+ g_file_replace_contents_finish(cns->uri,res,&etag,&error);
+ if (error) {
+ DEBUG_MSG("checkNsave_replace_async_lcb,error %d: %s\n",error->code,error->message);
+- if (error->code == G_IO_ERROR_WRONG_ETAG) {
++ if (error->code == G_IO_ERROR_CANCELLED) {
++ cns->callback_func(CHECKANDSAVE_ERROR_CANCELLED, error, cns->callback_data);
++ checkNsave_cleanup(cns);
++ } else if (error->code == G_IO_ERROR_WRONG_ETAG) {
+ if (cns->callback_func(CHECKANDSAVE_ERROR_MODIFIED,error, cns->callback_data) == CHECKNSAVE_CONT) {
+ g_file_replace_contents_async(cns->uri,cns->buffer->data,cns->buffer_size
+ ,NULL,TRUE
+@@ -467,12 +470,25 @@
+ checkNsave_cleanup(cns);
+ }
+
+-void file_checkNsave_cancel(gpointer cns) {
+- g_cancellable_cancel(((TcheckNsave *)cns)->cancelab);
++void file_checkNsave_cancel(gpointer data) {
++ TcheckNsave *cns = data;
++ if (!cns)
++ return;
++ /* if the checkNsave is still on the queue, and not yet started, the cancellable is NULL
++ and we should remove it from the queue */
++ if (cns->cancelab) {
++ g_cancellable_cancel(cns->cancelab);
++ return;
++ }
++ queue_remove(&sfqueue, cns);
++ cns->callback_func(CHECKANDSAVE_ERROR_CANCELLED, NULL, cns->callback_data);
++ checkNsave_cleanup(cns);
++ return;
+ }
+
+ static void file_checkNsave_run(gpointer data) {
+ TcheckNsave *cns=data;
++ cns->cancelab = g_cancellable_new();
+ g_file_replace_contents_async(cns->uri,cns->buffer->data,cns->buffer_size
+ ,cns->etag,cns->backup
+ ,G_FILE_CREATE_NONE,cns->cancelab
+@@ -482,7 +498,6 @@
+ gpointer file_checkNsave_uri_async(GFile *uri, GFileInfo *info, Trefcpointer *buffer, gsize buffer_size, gboolean check_modified, gboolean backup, CheckNsaveAsyncCallback callback_func, gpointer callback_data) {
+ TcheckNsave *cns;
+ cns = g_slice_new0(TcheckNsave);
+- cns->cancelab = g_cancellable_new();
+ /*cns->etag=NULL;*/
+ cns->callback_data = callback_data;
+ cns->callback_func = callback_func;
diff --git a/fedora_bug_691129.patch b/fedora_bug_691129.patch
new file mode 100644
index 0000000..065e900
--- /dev/null
+++ b/fedora_bug_691129.patch
@@ -0,0 +1,20 @@
+Index: bluefish/src/file_dialogs.c
+===================================================================
+--- bluefish/src/file_dialogs.c (revision 6601)
++++ bluefish/src/file_dialogs.c (revision 6602)
+@@ -553,7 +553,6 @@
+ }
+ /* if the user wanted to close the doc we should do very diffferent things here !! */
+ doc->action.save = NULL;
+- gtk_text_view_set_editable(GTK_TEXT_VIEW(doc->view), TRUE);
+ if (doc->action.close_doc) {
+ Tbfwin *bfwin = doc->bfwin;
+ gboolean close_window = doc->action.close_window;
+@@ -564,6 +563,7 @@
+ return CHECKNSAVE_STOP; /* it actually doesn't matter what we return, this was the last callback anyway */
+ } else {
+ /* YES! we're done! update the fileinfo ! */
++ gtk_text_view_set_editable(GTK_TEXT_VIEW(doc->view), TRUE);
+ DEBUG_MSG("doc_checkNsave_lcb, re-set async doc->fileinfo (current=%p)\n", doc->fileinfo);
+ if (doc->fileinfo)
+ g_object_unref(doc->fileinfo);
diff --git a/fedora_bug_751535.patch b/fedora_bug_751535.patch
new file mode 100644
index 0000000..1696b62
--- /dev/null
+++ b/fedora_bug_751535.patch
@@ -0,0 +1,59 @@
+This patch is based on changeset:7042 in upstream svn.
+
+--- bluefish-2.0.3/src/gui.c
++++ bluefish-2.0.3/src/gui.c
+@@ -298,8 +298,9 @@
+ return bfwin->leftpanel_notebook;
+ }
+
+-static void left_panel_cleanup(Tbfwin *bfwin) {
+- DEBUG_MSG("left_panel_cleanup called for bfwin %p\n",bfwin);
++static void left_panel_destroy_cleanup(Tbfwin *bfwin) {
++ g_print("left_panel_destroy_cleanup called for bfwin %p\n", bfwin);
++ gtk_widget_destroy(bfwin->leftpanel_notebook);
+ bmark_cleanup(bfwin);
+ fb2_cleanup(bfwin);
+ if (main_v->sidepanel_destroygui) {
+@@ -319,9 +320,7 @@
+ void left_panel_rebuild(Tbfwin *bfwin) {
+ if (bfwin->hpane) {
+ DEBUG_MSG("left_panel_rebuild, destroying widgets for bfwin %p\n",bfwin);
+- gtk_widget_destroy(bfwin->leftpanel_notebook);
+- DEBUG_MSG("left_panel_rebuild, cleanup for bfwin %p\n",bfwin);
+- left_panel_cleanup(bfwin);
++ left_panel_destroy_cleanup(bfwin);
+ DEBUG_MSG("left_panel_rebuild, re-init\n");
+ left_panel_build(bfwin);
+ if (main_v->props.left_panel_left) {
+@@ -352,8 +351,8 @@
+ gtk_container_remove(GTK_CONTAINER(bfwin->middlebox), bfwin->notebook_box);
+ } else {
+ gtk_container_remove(GTK_CONTAINER(bfwin->hpane), bfwin->notebook_box);
++ left_panel_destroy_cleanup(bfwin);
+ gtk_widget_destroy(bfwin->hpane);
+- left_panel_cleanup(bfwin);
+ bfwin->hpane = NULL;
+ }
+ }
+@@ -781,8 +780,8 @@
+ #ifdef HAVE_LIBENCHANT
+ unload_spell_dictionary(bfwin);
+ #endif
+- fb2_cleanup(bfwin);
+- bmark_cleanup(bfwin);
++ g_print("gui_bfwin_cleanup called for bfwin %p\n",bfwin);
++ left_panel_destroy_cleanup(bfwin);
+ outputbox_cleanup(bfwin);
+ snr2_cleanup(bfwin);
+ g_object_unref(ifactory);
+@@ -804,9 +803,9 @@
+
+ main_v->bfwinlist = g_list_remove(main_v->bfwinlist, bfwin);
+ DEBUG_MSG("main_window_destroy_lcb, bfwin(%p) is removed from bfwinlist\n",bfwin);
+- gui_bfwin_cleanup(bfwin);
+ DEBUG_MSG("main_window_destroy_lcb, will destroy the window now\n");
+ gtk_widget_destroy(bfwin->main_window);
++ gui_bfwin_cleanup(bfwin);
+ DEBUG_MSG("main_window_destroy_lcb, going to free bfwin %p\n",bfwin);
+ #ifdef IDENTSTORING
+ bftextview2_identifier_hash_destroy(bfwin);
More information about the scm-commits
mailing list