[evolution-patches] [gtkhtml+composer] #36972 Composer overrides selection
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, Not Zed <notzed novell com>, Rodney Dawes <dobey novell com>, Rodrigo Moya <rodrigo novell com>
- Subject: [evolution-patches] [gtkhtml+composer] #36972 Composer overrides selection
- Date: Wed, 06 Apr 2005 11:34:12 +0200
The gtkhtml part of patch adds new API (new gtkhtml's command), but I think it's still worth for 2.2.x as well as the bug is pretty annoying.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.686
diff -u -p -r1.686 ChangeLog
--- ChangeLog 17 Mar 2005 02:12:24 -0000 1.686
+++ ChangeLog 6 Apr 2005 09:25:37 -0000
@@ -1,3 +1,10 @@
+2005-04-06 Radek Doulik <rodo novell com>
+
+ * e-msg-composer.c (delete_old_signature): block gtkhtml's
+ selection so that we don't set primary X selection
+
+ Fixes #36972
+
2005-03-16 Not Zed <NotZed Ximian com>
** See bug #73347
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.501
diff -u -p -r1.501 e-msg-composer.c
--- e-msg-composer.c 15 Mar 2005 21:04:24 -0000 1.501
+++ e-msg-composer.c 6 Apr 2005 09:25:52 -0000
@@ -4800,6 +4800,7 @@ delete_old_signature (EMsgComposer *comp
/* printf ("delete_old_signature\n"); */
CORBA_exception_init (&ev);
+ GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "block-selection", &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-bod", &ev);
if (GNOME_GtkHTML_Editor_Engine_searchByData (composer->editor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
/* printf ("found\n"); */
@@ -4811,6 +4812,7 @@ delete_old_signature (EMsgComposer *comp
GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "signature", "0", &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete-back", &ev);
}
+ GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "unblock-selection", &ev);
CORBA_exception_free (&ev);
}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2113
diff -u -p -r1.2113 ChangeLog
--- ChangeLog 6 Apr 2005 08:01:41 -0000 1.2113
+++ ChangeLog 6 Apr 2005 09:27:12 -0000
@@ -1,3 +1,9 @@
+2005-04-06 Radek Doulik <rodo novell com>
+
+ * added [un]block-selection commands. these are going to be used
+ from evolution's composer to avoid selection overriding when
+ changing signature (#36972)
+
2005-04-04 Yu Mengjie <meng-jie yu sun com>
* gtkhtml.c: (idle_handler), (gtk_html_adjust_cursor_position):
Index: gtkhtml-enums.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml-enums.h,v
retrieving revision 1.38
diff -u -p -r1.38 gtkhtml-enums.h
--- gtkhtml-enums.h 1 Nov 2004 12:20:26 -0000 1.38
+++ gtkhtml-enums.h 6 Apr 2005 09:27:13 -0000
@@ -222,6 +222,9 @@ typedef enum {
GTK_HTML_COMMAND_EDITABLE_ON,
GTK_HTML_COMMAND_EDITABLE_OFF,
+
+ GTK_HTML_COMMAND_BLOCK_SELECTION,
+ GTK_HTML_COMMAND_UNBLOCK_SELECTION,
} GtkHTMLCommandType;
typedef enum {
Index: gtkhtml-properties.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml-properties.c,v
retrieving revision 1.98
diff -u -p -r1.98 gtkhtml-properties.c
--- gtkhtml-properties.c 19 Nov 2004 10:19:52 -0000 1.98
+++ gtkhtml-properties.c 6 Apr 2005 09:27:15 -0000
@@ -303,6 +303,8 @@ static GEnumValue _gtk_html_command_valu
{ GTK_HTML_COMMAND_CELL_RSPAN_DEC, "GTK_HTML_COMMAND_CELL_RSPAN_DEC", "rspan-dec" },
{ GTK_HTML_COMMAND_EDITABLE_ON, "GTK_HTML_COMMAND_EDITABLE_ON", "editable-on" },
{ GTK_HTML_COMMAND_EDITABLE_OFF, "GTK_HTML_COMMAND_EDITABLE_OFF", "editable-off" },
+ { GTK_HTML_COMMAND_BLOCK_SELECTION, "GTK_HTML_COMMAND_BLOCK_SELECTION", "block-selection" },
+ { GTK_HTML_COMMAND_UNBLOCK_SELECTION, "GTK_HTML_COMMAND_UNBLOCK_SELECTION", "unblock-selection" },
{ 0, NULL, NULL }
};
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.596
diff -u -p -r1.596 gtkhtml.c
--- gtkhtml.c 6 Apr 2005 08:01:41 -0000 1.596
+++ gtkhtml.c 6 Apr 2005 09:27:19 -0000
@@ -4679,6 +4679,12 @@ command (GtkHTML *html, GtkHTMLCommandTy
case GTK_HTML_COMMAND_EDITABLE_OFF:
gtk_html_set_editable (html, FALSE);
break;
+ case GTK_HTML_COMMAND_BLOCK_SELECTION:
+ html_engine_block_selection (html->engine);
+ break;
+ case GTK_HTML_COMMAND_UNBLOCK_SELECTION:
+ html_engine_unblock_selection (html->engine);
+ break;
default:
rv = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]