plug-ins/imagemap/imap_main.c applied patch from Kevin Hurewitz that adds
2007-05-25 Sven Neumann <sven@gimp.org> * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_object.[ch]: applied patch from Kevin Hurewitz that adds keyboard control for resizing an area (bug #439226). svn path=/trunk/; revision=22609
This commit is contained in:

committed by
Sven Neumann

parent
1c1ee4dd21
commit
ec1161c139
@ -294,6 +294,28 @@ object_move(Object_t *obj, gint dx, gint dy)
|
||||
object_emit_geometry_signal(obj);
|
||||
}
|
||||
|
||||
void
|
||||
object_move_sash(Object_t *obj, gint dx, gint dy)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
obj->class->get_dimensions(obj, &x, &y, &width, &height);
|
||||
if (dx == 0)
|
||||
x += (width / 2);
|
||||
else
|
||||
x += width;
|
||||
|
||||
if (dy == 0)
|
||||
y += (height / 2);
|
||||
else
|
||||
y += height;
|
||||
|
||||
MoveSashFunc_t sash_func = obj->class->near_sash(obj, x, y);
|
||||
if (sash_func) {
|
||||
sash_func(obj, dx, dy);
|
||||
object_emit_geometry_signal(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
object_remove(Object_t *obj)
|
||||
{
|
||||
@ -927,6 +949,17 @@ object_list_send_to_back(ObjectList_t *list)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
object_list_move_sash_selected(ObjectList_t *list, gint dx, gint dy)
|
||||
{
|
||||
GList *p;
|
||||
for (p = list->list; p; p = p->next) {
|
||||
Object_t *obj = (Object_t*) p->data;
|
||||
if (obj->selected)
|
||||
object_move_sash(obj, dx, dy);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_xml_attrib(const gchar *attrib, const gchar *value,
|
||||
const gchar *default_text, gpointer param,
|
||||
|
Reference in New Issue
Block a user