Re: [gedit-list] big thanks



On Wed, 2004-08-04 at 22:53 +0200, Robert Staudinger wrote:
> Hello, 
> 
> gedit-devs, let me give you a big thanks for developing such a useful
> tool!

Thanks!

> I'm editing latex docs for some time now and gedit rocks! And
> spellchecking is very handy.
> It only seems to me that clicking on suggested corrections does not
> apply the selected word (v2.6.1 from debian). 
> 

Good suggestion! Can you please file a bug in bugzilla.gnome.org? This
way it will not get lost and we will have a chance to discuss it with
Paolo Maggi when he comes back.

The attached patch implements it: it's against cvs HEAD, but should
apply cleanly to 2.6.


ciao
	paolo
Index: plugins/spell/gedit-spell-checker-dialog.c
===================================================================
RCS file: /cvs/gnome/gedit/plugins/spell/gedit-spell-checker-dialog.c,v
retrieving revision 1.6
diff -u -p -r1.6 gedit-spell-checker-dialog.c
--- plugins/spell/gedit-spell-checker-dialog.c	27 Nov 2002 16:40:07 -0000	1.6
+++ plugins/spell/gedit-spell-checker-dialog.c	4 Aug 2004 21:27:16 -0000
@@ -106,6 +106,10 @@ static void	change_button_clicked_handle
 								 GeditSpellCheckerDialog *dlg);
 static void	change_all_button_clicked_handler 		(GtkButton *button, 
 								 GeditSpellCheckerDialog *dlg);
+static void	suggestions_list_row_activated_handler		(GtkTreeView *selection,
+								GtkTreePath *path,
+								GtkTreeViewColumn *column,
+								GeditSpellCheckerDialog *dlg);
 
 
 static GtkWindowClass *parent_class = NULL;
@@ -334,6 +338,9 @@ gedit_spell_checker_dialog_init (GeditSp
 	g_signal_connect (G_OBJECT (dlg->change_all_button), "clicked",
 			  G_CALLBACK (change_all_button_clicked_handler), dlg);
 
+	g_signal_connect (G_OBJECT (dlg->suggestions_list), "row-activated",
+			  G_CALLBACK (suggestions_list_row_activated_handler), dlg);
+
 	g_object_unref (G_OBJECT (gui));
 }
 
@@ -642,7 +649,6 @@ check_word_button_clicked_handler (GtkBu
 	}
 }
 
-
 static void
 add_word_button_clicked_handler (GtkButton *button, GeditSpellCheckerDialog *dlg)
 {
@@ -741,6 +745,18 @@ change_button_clicked_handler (GtkButton
 	g_free (change);	
 }
 
+/* double click on one of the suggestions is like clicking on "change" */
+static void
+suggestions_list_row_activated_handler (GtkTreeView *selection,
+		GtkTreePath *path,
+		GtkTreeViewColumn *column,
+		GeditSpellCheckerDialog *dlg)
+{
+	g_return_if_fail (GEDIT_IS_SPELL_CHECKER_DIALOG (dlg));
+
+	change_button_clicked_handler (GTK_BUTTON (dlg->change_button), dlg);
+}
+
 static void
 change_all_button_clicked_handler (GtkButton *button, GeditSpellCheckerDialog *dlg)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]