Author: kalikiana Date: 2009-11-10 15:47:47 +0200 (Tue, 10 Nov 2009) New Revision: 19489
Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkentry.c Log: 2009-11-10 Christian Dywan <christ...@lanedo.com> Fixes: NB#143062 - Browser, "Save page as" title right-aligned * gtk/gtkentry.c (gtk_entry_set_selection_bounds): Flip the direction of the selection so that the leftmost part of text is visible when the text is too long to fit the entry. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2009-11-05 15:15:17 UTC (rev 19488) +++ projects/haf/trunk/gtk+/ChangeLog 2009-11-10 13:47:47 UTC (rev 19489) @@ -1,3 +1,11 @@ +2009-11-10 Christian Dywan <christ...@lanedo.com> + + Fixes: NB#143062 - Browser, "Save page as" title right-aligned + + * gtk/gtkentry.c (gtk_entry_set_selection_bounds): Flip the direction of + the selection so that the leftmost part of text is visible when the text + is too long to fit the entry. + 2009-11-05 Michael Natterer <mi...@lanedo.com> * debian/changelog: Release 2.14.7-1maemo15 Modified: projects/haf/trunk/gtk+/gtk/gtkentry.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkentry.c 2009-11-05 15:15:17 UTC (rev 19488) +++ projects/haf/trunk/gtk+/gtk/gtkentry.c 2009-11-10 13:47:47 UTC (rev 19489) @@ -2747,6 +2747,10 @@ gint end) { GtkEntry *entry = GTK_ENTRY (editable); +#ifdef MAEMO_CHANGES + GtkWidget *widget = GTK_WIDGET (editable); + gboolean flip = FALSE; +#endif if (start < 0) start = entry->text_length; @@ -2755,11 +2759,25 @@ #ifndef MAEMO_CHANGES _gtk_entry_reset_im_context (entry); -#endif /* !MAEMO_CHANGES */ gtk_entry_set_positions (entry, MIN (end, entry->text_length), MIN (start, entry->text_length)); +#else + if (gtk_widget_has_screen (widget)) + { + GtkSettings *settings = gtk_widget_get_settings (widget); + g_object_get (settings, "gtk-touchscreen-mode", &flip, NULL); + } + if (flip) + gtk_entry_set_positions (entry, + MIN (start, entry->text_length), + MIN (end, entry->text_length)); + else + gtk_entry_set_positions (entry, + MIN (end, entry->text_length), + MIN (start, entry->text_length)); +#endif /* !MAEMO_CHANGES */ gtk_entry_update_primary_selection (entry); } _______________________________________________ maemo-commits mailing list maemo-commits@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-commits