[evolution-patches] Cleanups for gtkhtml



Here's a few cleanups for gtkhtml

Cheers
Kjartan

Index: components/html-editor/body.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/body.c,v
retrieving revision 1.58
diff -u -p -r1.58 body.c
--- components/html-editor/body.c	15 May 2006 09:49:55 -0000	1.58
+++ components/html-editor/body.c	22 Aug 2006 16:58:16 -0000
@@ -283,7 +283,7 @@ body_properties (GtkHTMLControlData *cd,
 	}
 
 
-	atk_object_set_name (gtk_widget_get_accessible (GTK_FILE_CHOOSER (data->pixmap_entry)), _("Background Image File Path"));
+	atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (data->pixmap_entry)), _("Background Image File Path"));
 
 	t1 = gtk_table_new (2, 2, FALSE);
 	gtk_table_set_col_spacings (GTK_TABLE (t1), 6);
Index: components/html-editor/editor-control-factory.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/editor-control-factory.c,v
retrieving revision 1.148
diff -u -p -r1.148 editor-control-factory.c
--- components/html-editor/editor-control-factory.c	11 Sep 2005 04:32:56 -0000	1.148
+++ components/html-editor/editor-control-factory.c	22 Aug 2006 16:58:16 -0000
@@ -54,6 +54,7 @@
 #include "Editor.h"
 
 #include "gtkhtml.h"
+#include "gtkhtml-private.h"
 #include "gtkhtml-properties.h"
 #include "htmlcursor.h"
 #include "htmlengine.h"
Index: components/html-editor/popup.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/popup.c,v
retrieving revision 1.91
diff -u -p -r1.91 popup.c
--- components/html-editor/popup.c	6 Jun 2006 05:37:34 -0000	1.91
+++ components/html-editor/popup.c	22 Aug 2006 16:58:16 -0000
@@ -286,12 +286,6 @@ link_prop_dialog (GtkWidget *mi, GtkHTML
 }
 
 static void
-spell_check_cb (GtkWidget *mi, GtkHTMLControlData *cd)
-{
-	spell_check_dialog (cd, FALSE);
-}
-
-static void
 replace_suggestion_cb (GtkWidget *mi, GtkHTMLControlData *cd)
 {
 	html_engine_replace_spell_word_with (cd->html->engine, g_object_get_data (G_OBJECT (mi), "rep_word"));
Index: components/html-editor/toolbar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/toolbar.c,v
retrieving revision 1.75
diff -u -p -r1.75 toolbar.c
--- components/html-editor/toolbar.c	25 Apr 2006 11:09:17 -0000	1.75
+++ components/html-editor/toolbar.c	22 Aug 2006 16:58:16 -0000
@@ -29,7 +29,8 @@
 #else
 #include <glib/gi18n.h>
 #endif
-#include <gnome.h>
+#include <libgnomeui/gnome-app-helper.h>
+#include <libgnomeui/gnome-icon-theme.h>
 #include <bonobo.h>
 
 #include "gi-color-combo.h"
Index: src/gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.623
diff -u -p -r1.623 gtkhtml.c
--- src/gtkhtml.c	17 Aug 2006 06:43:54 -0000	1.623
+++ src/gtkhtml.c	22 Aug 2006 16:58:16 -0000
@@ -169,7 +169,7 @@ static void     cursor_move            (
 static gboolean command                (GtkHTML *html, GtkHTMLCommandType com_type);
 static gint     mouse_change_pos       (GtkWidget *widget, GdkWindow *window, gint x, gint y, gint state);
 static void     add_bindings           (GtkHTMLClass *klass);
-static gchar *  get_value_nick         (GtkHTMLCommandType com_type);					
+static const gchar *  get_value_nick         (GtkHTMLCommandType com_type);					
 static void	gtk_html_adjust_cursor_position (GtkHTML *html);
 
 
@@ -5532,7 +5532,7 @@ gtk_html_set_editor_api (GtkHTML *html, 
 	gtk_html_api_set_language (html);
 }
 
-static gchar *
+static const gchar *
 get_value_nick (GtkHTMLCommandType com_type)
 {
 	GEnumValue *val;
Index: src/htmlcluev.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlcluev.c,v
retrieving revision 1.83
diff -u -p -r1.83 htmlcluev.c
--- src/htmlcluev.c	29 Apr 2005 06:51:14 -0000	1.83
+++ src/htmlcluev.c	22 Aug 2006 16:58:16 -0000
@@ -486,8 +486,8 @@ check_point (HTMLObject *self,
 		parent = HTML_OBJECT (clue)->parent;
 		obj = html_object_check_point (HTML_OBJECT (clue),
 					       painter,
-					       x - HTML_OBJECT (clue)->parent->x,
-					       y - HTML_OBJECT (clue)->parent->y + HTML_OBJECT (clue)->parent->ascent,
+					       x - parent->x,
+					       y - parent->y + parent->ascent,
 					       offset_return,
 					       for_cursor);
 		if (obj != NULL) {
@@ -503,8 +503,8 @@ check_point (HTMLObject *self,
 		parent = HTML_OBJECT (clue)->parent;
 		obj = html_object_check_point (HTML_OBJECT (clue),
 					       painter,
-					       x - HTML_OBJECT (clue)->parent->x,
-					       y - HTML_OBJECT (clue)->parent->y + HTML_OBJECT (clue)->parent->ascent,
+					       x - parent->x,
+					       y - parent->y + parent->ascent,
 					       offset_return,
 					       for_cursor);
 		if (obj != NULL) {
Index: src/htmlobject.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlobject.c,v
retrieving revision 1.192
diff -u -p -r1.192 htmlobject.c
--- src/htmlobject.c	26 Apr 2006 09:46:56 -0000	1.192
+++ src/htmlobject.c	22 Aug 2006 16:58:16 -0000
@@ -1676,7 +1676,8 @@ move_object_downtree_cursor (HTMLObject 
 			if (html_object_accepts_cursor (obj))
 				break;
 			last_obj = obj;
-			if (obj = move_object_downtree_cursor (obj, down_fn, next_fn))
+			obj = move_object_downtree_cursor (obj, down_fn, next_fn);
+			if (obj)
 				break;
 			obj = last_obj;
 		}
Index: src/htmltextslave.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltextslave.c,v
retrieving revision 1.195
diff -u -p -r1.195 htmltextslave.c
--- src/htmltextslave.c	28 Feb 2006 20:51:54 -0000	1.195
+++ src/htmltextslave.c	22 Aug 2006 16:58:16 -0000
@@ -740,7 +740,7 @@ draw_text (HTMLTextSlave *self,
 	HTMLText *text = self->owner;
 	GSList *cur;
 	int run_width;
-	int selection_start_index, selection_end_index;
+	int selection_start_index = 0, selection_end_index = 0;
 	int isect_start, isect_end;
 	gboolean selection;
 	GdkColor selection_fg, selection_bg;


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