aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--src/compose.c6
-rw-r--r--src/textview.c7
4 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cf4a249c..895acd33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-20
+
+ * src/compose.c: compose_destroy()
+ src/textview/c: textview_destroy(): remove selection clipboard
+ before destruction (fixes crash with GTK+ 2.10 when closing window
+ while selection is active).
+
2006-09-19
* libsylph/utils.[ch]
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 2d8d2f98..e6ef45f7 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2006-09-20
+
+ * src/compose.c: compose_destroy()
+ src/textview/c: textview_destroy(): 解放する前に selection クリップ
+ ボードを取り除くようにした(選択状態でウィンドウを閉じると GTK+ 2.10
+ でクラッシュするのを修正)。
+
2006-09-19
* libsylph/utils.[ch]
diff --git a/src/compose.c b/src/compose.c
index 78cd461d..42bf2083 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5139,6 +5139,8 @@ static void compose_destroy(Compose *compose)
GtkTreeIter iter;
gboolean valid;
AttachInfo *ainfo;
+ GtkTextBuffer *buffer;
+ GtkClipboard *clipboard;
compose_list = g_list_remove(compose_list, compose);
@@ -5200,6 +5202,10 @@ static void compose_destroy(Compose *compose)
gtk_widget_destroy(compose->paned);
gtk_widget_destroy(compose->popupmenu);
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(compose->text));
+ clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ gtk_text_buffer_remove_selection_clipboard(buffer, clipboard);
+
gtk_widget_destroy(compose->window);
g_free(compose);
diff --git a/src/textview.c b/src/textview.c
index 89db0b52..6ba4a262 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1267,6 +1267,13 @@ void textview_clear(TextView *textview)
void textview_destroy(TextView *textview)
{
+ GtkTextBuffer *buffer;
+ GtkClipboard *clipboard;
+
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview->text));
+ clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ gtk_text_buffer_remove_selection_clipboard(buffer, clipboard);
+
textview_uri_list_remove_all(textview->uri_list);
textview->uri_list = NULL;
g_free(textview);