[Commits] gtkaspell.c 1.9.2.80 1.9.2.81
colin at claws-mail.org
colin at claws-mail.org
Wed Sep 12 11:23:15 CEST 2012
Update of /home/claws-mail/claws/src/gtk
In directory srv:/tmp/cvs-serv1241/src/gtk
Modified Files:
Tag: gtk2
gtkaspell.c
Log Message:
2012-09-12 [colin] 3.8.1cvs52
* src/addressbook.c
* src/addrharvest.c
* src/addrindex.c
* src/addritem.c
* src/compose.c
* src/edittags.c
* src/folder.c
* src/imap.c
* src/inc.c
* src/ldif.c
* src/mainwindow.c
* src/mbox.c
* src/mimeview.c
* src/mutt.c
* src/partial_download.c
* src/prefs_filtering_action.c
* src/prefs_toolbar.c
* src/printing.c
* src/procheader.c
* src/procmime.c
* src/procmsg.c
* src/summaryview.c
* src/textview.c
* src/common/utils.c
* src/etpan/imap-thread.c
* src/gtk/gtkaspell.c
* src/plugins/pgpcore/sgpgme.c
More fixes from bug #1961:
- Write-only variables
- Null pointer dereferences
- A couple other fixes for which the reporter
was unsure, but which showed problems.
More details in bug #1961 comments.
Index: gtkaspell.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/gtkaspell.c,v
retrieving revision 1.9.2.80
retrieving revision 1.9.2.81
diff -u -d -r1.9.2.80 -r1.9.2.81
--- gtkaspell.c 29 Aug 2012 15:25:43 -0000 1.9.2.80
+++ gtkaspell.c 12 Sep 2012 09:23:13 -0000 1.9.2.81
@@ -561,7 +561,7 @@
GtkAspell *gtkaspell)
{
int origpos;
- gint start, end;
+ gint start;
cm_return_if_fail(gtkaspell->gtkaspeller->speller);
@@ -569,7 +569,6 @@
return;
start = gtk_text_iter_get_offset(startiter);
- end = gtk_text_iter_get_offset(enditer);
origpos = get_textview_buffer_offset(gtkaspell->gtktext);
if (start) {
check_at(gtkaspell, start - 1);
@@ -961,12 +960,9 @@
{
gint start, end;
char buf[GTKASPELLWORDSIZE];
- GtkTextView *gtktext;
cm_return_val_if_fail(from_pos >= 0, FALSE);
- gtktext = gtkaspell->gtktext;
-
if (!get_word_from_pos(gtkaspell, from_pos, buf, sizeof(buf),
&start, &end))
return FALSE;
@@ -1272,7 +1268,7 @@
static void replace_real_word(GtkAspell *gtkaspell, const gchar *newword)
{
- int oldlen, newlen, wordlen;
+ int oldlen, newlen;
gint origpos;
gint pos;
GtkTextView *gtktext;
@@ -1287,7 +1283,6 @@
origpos = gtkaspell->orig_pos;
pos = origpos;
oldlen = gtkaspell->end_pos - gtkaspell->start_pos;
- wordlen = strlen(gtkaspell->theword);
newlen = strlen(newword); /* FIXME: multybyte characters? */
@@ -1342,10 +1337,7 @@
/* Accept this word for this session */
static void add_word_to_session_cb(GtkWidget *w, gpointer data)
{
- GtkTextView *gtktext;
GtkAspell *gtkaspell = (GtkAspell *) data;
- gtktext = gtkaspell->gtktext;
-
enchant_dict_add_to_session(gtkaspell->gtkaspeller->speller, gtkaspell->theword, strlen(gtkaspell->theword));
@@ -1436,7 +1428,6 @@
static PangoFontDescription *font_desc;
GtkWidget *dialog;
GtkWidget *label;
- GtkWidget *w_hbox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *entry;
@@ -1474,8 +1465,6 @@
thelabel = g_strdup_printf(_("<span weight=\"bold\" "
"size=\"larger\">Replace \"%s\" with: </span>"),
utf8buf);
- /* for title label */
- w_hbox = gtk_hbox_new(FALSE, 0);
icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
@@ -1524,8 +1513,6 @@
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
gtk_widget_show(label);
- hbox = gtk_hbox_new(TRUE, 0);
-
gtkut_stock_button_set_create(&confirm_area,
&cancel_button, GTK_STOCK_CANCEL,
&ok_button, GTK_STOCK_OK,
@@ -1813,8 +1800,6 @@
if (gtkaspellcheckers->dictionary_list == NULL)
gtkaspell_get_dictionary_list(FALSE);
- tmp = gtkaspellcheckers->dictionary_list;
-
menu = gtk_menu_new();
curmenu = menu;
@@ -1868,12 +1853,10 @@
{
GtkWidget *item, *submenu;
char *caption;
- GtkTextView *gtktext;
GtkAccelGroup *accel;
GList *l = gtkaspell->suggestions_list;
gchar *utf8buf;
GSList *list = NULL;
- gtktext = gtkaspell->gtktext;
if (l == NULL)
return NULL;
@@ -2274,10 +2257,6 @@
static void set_point_continue(GtkAspell *gtkaspell)
{
- GtkTextView *gtktext;
-
- gtktext = gtkaspell->gtktext;
-
gtkaspell->ctx.set_position(gtkaspell->ctx.data, gtkaspell->orig_pos);
if (gtkaspell->continue_check)
More information about the Commits
mailing list