1
1

1999-06-14 Federico Mena Quintero <federico@nuclecu.unam.mx>

* gdesktop.c (icon_is_in_area): Fixed off-by-one error in
	intersection computation.

	* gdesktop-icon.c (desktop_icon_reshape): Set the correct values
	for dicon->text_x and dicon->text_y.
Этот коммит содержится в:
Miguel de Icaza 1999-06-14 22:50:45 +00:00
родитель 386c434f73
Коммит b24460e51c
3 изменённых файлов: 64 добавлений и 55 удалений

Просмотреть файл

@ -1,3 +1,11 @@
1999-06-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (icon_is_in_area): Fixed off-by-one error in
intersection computation.
* gdesktop-icon.c (desktop_icon_reshape): Set the correct values
for dicon->text_x and dicon->text_y.
1999-06-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gwidget.c (x_update_input): Unblock the changed signal *after*

Просмотреть файл

@ -417,6 +417,8 @@ desktop_icon_reshape (DesktopIcon *dicon)
dicon->icon_w = icon_width;
dicon->icon_h = icon_height;
gnome_canvas_item_get_bounds (dicon->text, &x1, &y1, &x2, &y2);
dicon->text_x = x1;
dicon->text_y = y1;
dicon->text_w = text_width;

Просмотреть файл

@ -2543,16 +2543,16 @@ icon_is_in_area (DesktopIconInfo *dii, int x1, int y1, int x2, int y2)
if (x1 == x2 && y1 == y2)
return FALSE;
if (x1 < dicon->icon_x + dicon->icon_w - 1
&& x2 > dicon->icon_x
&& y1 < dicon->icon_y + dicon->icon_h - 1
&& y2 > dicon->icon_y)
if (x1 < dicon->icon_x + dicon->icon_w
&& x2 >= dicon->icon_x
&& y1 < dicon->icon_y + dicon->icon_h
&& y2 >= dicon->icon_y)
return TRUE;
if (x1 < dicon->text_x + dicon->text_w - 1
&& x2 > dicon->text_x
&& y1 < dicon->text_y + dicon->text_h - 1
&& y2 > dicon->text_y)
if (x1 < dicon->text_x + dicon->text_w
&& x2 >= dicon->text_x
&& y1 < dicon->text_y + dicon->text_h
&& y2 >= dicon->text_y)
return TRUE;
return FALSE;
@ -2600,7 +2600,8 @@ update_drag_selection (int x, int y)
if (in_area) {
if (invert) {
if (dii->selected == dii->tmp_selected) {
desktop_icon_select (DESKTOP_ICON (dii->dicon), !dii->selected);
desktop_icon_select (DESKTOP_ICON (dii->dicon),
!dii->selected);
dii->selected = !dii->selected;
}
} else if (additive) {
@ -2967,5 +2968,3 @@ desktop_create_url (const char *filename, const char *title, const char *url, co
gnome_metadata_set (filename, "icon-filename", strlen (icon) + 1, icon);
}
}