Why did that last commit still build? ;-) Fixed goofs in set_selection_bounds
authorBill Haneman <billh@src.gnome.org>
Fri, 27 Apr 2001 17:30:22 +0000 (17:30 +0000)
committerBill Haneman <billh@src.gnome.org>
Fri, 27 Apr 2001 17:30:22 +0000 (17:30 +0000)
and set_caret_offset.

atk/atktext.c
atk/atktext.h

index a273436..d3959e6 100755 (executable)
@@ -289,7 +289,7 @@ atk_text_get_selection_bounds (AtkText *text,
   }
 }
 
-void
+gboolean
 atk_text_set_selection_bounds (AtkText *text,
                                gint    start_offset,
                                gint    end_offset)
@@ -310,3 +310,24 @@ atk_text_set_selection_bounds (AtkText *text,
       return FALSE;
     }
 }
+
+gboolean
+atk_text_set_selection_bounds (AtkText *text,
+                               gint    offset)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (text != NULL, FALSE);
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->set_caret_offset)
+    {
+      return (*(iface->set_caret_offset)) (text, offset);
+    }
+  else
+    {
+      return FALSE;
+    }
+}
index 51d27c1..5387593 100755 (executable)
@@ -91,7 +91,7 @@ struct _AtkTextIface
   void           (* get_selection_bounds)         (AtkText          *text,
                                                    gint             *start_offset,
                                                    gint             *end_offset);
-  void           (* set_selection_bounds)         (AtkText          *text,
+  gboolean       (* set_selection_bounds)         (AtkText          *text,
                                                    gint             start_offset,
                                                    gint             end_offset);
   gboolean       (* set_caret_offset)             (AtkText          *text,
@@ -143,7 +143,7 @@ gchar*        atk_text_get_selected_text                  (AtkText          *tex
 void          atk_text_get_selection_bounds               (AtkText          *text,
                                                            gint             *start_offset,
                                                            gint             *end_offset);
-void          atk_text_set_selection_bounds               (AtkText          *text,
+gboolean      atk_text_set_selection_bounds               (AtkText          *text,
                                                            gint             start_offset,
                                                            gint             end_offset);
 gboolean      atk_text_set_caret_offset                   (AtkText          *text,