gimp r26516 - in branches/soc-2008-tagging: . app/widgets
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26516 - in branches/soc-2008-tagging: . app/widgets
- Date: Tue, 12 Aug 2008 13:51:01 +0000 (UTC)
Author: aurisj
Date: Tue Aug 12 13:51:00 2008
New Revision: 26516
URL: http://svn.gnome.org/viewvc/gimp?rev=26516&view=rev
Log:
2008-08-12 Aurimas JuÅka <aurisj svn gnome org>
* app/widgets/gimptagentry.c (gimp_tag_entry_select_jellybean):
some fixes of directional selections.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/widgets/gimptagentry.c
Modified: branches/soc-2008-tagging/app/widgets/gimptagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagentry.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimptagentry.c Tue Aug 12 13:51:00 2008
@@ -1492,36 +1492,46 @@
case TAG_SEARCH_LEFT:
{
- if (selection_start == selection_end
- && (tag_entry->mask->str[selection_start] == 'w'
- || tag_entry->mask->str[selection_start] == 's')
- && selection_start > 0)
+ if (selection_start == selection_end)
{
- while ((tag_entry->mask->str[selection_start] == 'w'
- || tag_entry->mask->str[selection_start] == 's')
- && selection_start > 0)
+ if (selection_start > 0
+ && tag_entry->mask->str[selection_start] == 't'
+ && tag_entry->mask->str[selection_start - 1] == 'w')
{
selection_start--;
}
- selection_end = selection_start + 1;
+ if ((tag_entry->mask->str[selection_start] == 'w'
+ || tag_entry->mask->str[selection_start] == 's')
+ && selection_start > 0)
+ {
+ while ((tag_entry->mask->str[selection_start] == 'w'
+ || tag_entry->mask->str[selection_start] == 's')
+ && selection_start > 0)
+ {
+ selection_start--;
+ }
+ selection_end = selection_start + 1;
+ }
}
}
break;
case TAG_SEARCH_RIGHT:
{
- if (selection_start == selection_end
- && (tag_entry->mask->str[selection_start] == 'w'
- || tag_entry->mask->str[selection_start] == 's')
- && selection_start < tag_entry->mask->len - 1)
+ if (selection_start == selection_end)
{
- while ((tag_entry->mask->str[selection_start] == 'w'
- || tag_entry->mask->str[selection_start] == 's')
- && selection_start < tag_entry->mask->len - 1)
- {
- selection_start++;
- }
- selection_end = selection_start + 1;
+ if ((tag_entry->mask->str[selection_start] == 'w'
+ || tag_entry->mask->str[selection_start] == 's')
+ && selection_start < tag_entry->mask->len - 1)
+ {
+ while ((tag_entry->mask->str[selection_start] == 'w'
+ || tag_entry->mask->str[selection_start] == 's')
+ && selection_start < tag_entry->mask->len - 1)
+ {
+ selection_start++;
+ }
+ selection_end = selection_start + 1;
+ }
}
}
break;
@@ -1569,8 +1579,17 @@
&& (tag_entry->mask->str[selection_start] == 't')
&& selection_start < selection_end)
{
- gtk_editable_select_region (GTK_EDITABLE (tag_entry),
- selection_start, selection_end);
+ if (search_dir == TAG_SEARCH_LEFT)
+ {
+ gtk_editable_select_region (GTK_EDITABLE (tag_entry),
+ selection_end, selection_start);
+ }
+ else if (search_dir == TAG_SEARCH_RIGHT)
+ {
+ gtk_editable_select_region (GTK_EDITABLE (tag_entry),
+ selection_start, selection_end);
+ }
+
return TRUE;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]