]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkpango.c
Made GtkBubble/SelectionWindow private at the moment
[~andy/gtk] / gtk / gtkpango.c
index 6af3a8337c8d703e4e46ba56181ebbb2e65fd8fe..40c94f3c13c05ac8a29a1129104f64d22ec37476 100644 (file)
@@ -13,8 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.Free
  */
 /*
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
@@ -50,6 +49,8 @@ struct _GtkFillLayoutRendererClass
   PangoRendererClass parent_class;
 };
 
+GType _gtk_fill_layout_renderer_get_type (void);
+
 G_DEFINE_TYPE (GtkFillLayoutRenderer, _gtk_fill_layout_renderer, PANGO_TYPE_RENDERER)
 
 static void
@@ -693,6 +694,7 @@ _gtk_pango_move_lines (PangoLayout *layout,
   text = pango_layout_get_text (layout);
   index = g_utf8_offset_to_pointer (text, offset) - text;
   lines = pango_layout_get_lines (layout);
+  line = NULL;
 
   num = 0;
   for (l = lines; l; l = l->next)
@@ -1142,7 +1144,7 @@ _gtk_pango_get_text_after (PangoLayout     *layout,
       if (end < n_attrs - 1)
         {
           end = _gtk_pango_move_words (layout, end, 1);
-          while (!attrs[end].is_word_end && end < n_attrs - 1)
+          while (!attrs[end].is_word_start && end < n_attrs - 1)
             end = _gtk_pango_move_chars (layout, end, 1);
         }
       break;
@@ -1157,7 +1159,7 @@ _gtk_pango_get_text_after (PangoLayout     *layout,
     case ATK_TEXT_BOUNDARY_SENTENCE_START:
       if (_gtk_pango_is_inside_sentence (layout, end))
         end = _gtk_pango_move_sentences (layout, end, 1);
-      while (!attrs[end].is_sentence_end && end < n_attrs - 1)
+      while (!attrs[end].is_sentence_start && end < n_attrs - 1)
         end = _gtk_pango_move_chars (layout, end, 1);
       start = end;
       if (end < n_attrs - 1)
@@ -1244,7 +1246,7 @@ _gtk_pango_get_text_at (PangoLayout     *layout,
       if (_gtk_pango_is_inside_word (layout, end))
         end = _gtk_pango_move_words (layout, end, 1);
       while (!attrs[end].is_word_start && end < n_attrs - 1)
-        end = _gtk_pango_move_chars (layout, end, -1);
+        end = _gtk_pango_move_chars (layout, end, 1);
       break;
 
     case ATK_TEXT_BOUNDARY_WORD_END:
@@ -1261,7 +1263,7 @@ _gtk_pango_get_text_at (PangoLayout     *layout,
         start = _gtk_pango_move_sentences (layout, start, -1);
       if (_gtk_pango_is_inside_sentence (layout, end))
         end = _gtk_pango_move_sentences (layout, end, 1);
-      while (!attrs[end].is_word_end && end < n_attrs - 1)
+      while (!attrs[end].is_sentence_start && end < n_attrs - 1)
         end = _gtk_pango_move_chars (layout, end, 1);
       break;