plug-ins/imagemap/imap_circle.c plug-ins/imagemap/imap_cmd_gimp_guides.c
2004-10-25 Sven Neumann <sven@gimp.org> * plug-ins/imagemap/imap_circle.c * plug-ins/imagemap/imap_cmd_gimp_guides.c * plug-ins/imagemap/imap_cmd_guides.c * plug-ins/imagemap/imap_default_dialog.[ch] * plug-ins/imagemap/imap_edit_area_info.c * plug-ins/imagemap/imap_grid.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_misc.c * plug-ins/imagemap/imap_polygon.c * plug-ins/imagemap/imap_preferences.c * plug-ins/imagemap/imap_rectangle.c * plug-ins/imagemap/imap_selection.c * plug-ins/imagemap/imap_source.c * plug-ins/imagemap/imap_toolbar.c * plug-ins/imagemap/imap_tools.c: reviewed for HIG compliance. Various other minor fixes. Closes bug #150004.
This commit is contained in:
committed by
Sven Neumann
parent
1cea494214
commit
537890aacb
@ -50,18 +50,18 @@ static MoveSashFunc_t rectangle_near_sash(Object_t *obj, gint x, gint y);
|
||||
static gboolean rectangle_point_is_on(Object_t *obj, gint x, gint y);
|
||||
static void rectangle_get_dimensions(Object_t *obj, gint *x, gint *y,
|
||||
gint *width, gint *height);
|
||||
static void rectangle_resize(Object_t *obj, gint percentage_x,
|
||||
static void rectangle_resize(Object_t *obj, gint percentage_x,
|
||||
gint percentage_y);
|
||||
static void rectangle_move(Object_t *obj, gint dx, gint dy);
|
||||
static gpointer rectangle_create_info_widget(GtkWidget *frame);
|
||||
static void rectangle_fill_info_tab(Object_t *obj, gpointer data);
|
||||
static void rectangle_set_initial_focus(Object_t *obj, gpointer data);
|
||||
static void rectangle_update(Object_t *obj, gpointer data);
|
||||
static void rectangle_write_csim(Object_t *obj, gpointer param,
|
||||
static void rectangle_write_csim(Object_t *obj, gpointer param,
|
||||
OutputFunc_t output);
|
||||
static void rectangle_write_cern(Object_t *obj, gpointer param,
|
||||
static void rectangle_write_cern(Object_t *obj, gpointer param,
|
||||
OutputFunc_t output);
|
||||
static void rectangle_write_ncsa(Object_t *obj, gpointer param,
|
||||
static void rectangle_write_ncsa(Object_t *obj, gpointer param,
|
||||
OutputFunc_t output);
|
||||
static const gchar* rectangle_get_stock_icon_name(void);
|
||||
|
||||
@ -107,7 +107,7 @@ create_rectangle(gint x, gint y, gint width, gint height)
|
||||
}
|
||||
|
||||
static void
|
||||
draw_any_rectangle(GdkWindow *window, GdkGC *gc, gint x, gint y, gint w,
|
||||
draw_any_rectangle(GdkWindow *window, GdkGC *gc, gint x, gint y, gint w,
|
||||
gint h)
|
||||
{
|
||||
if (w < 0) {
|
||||
@ -182,12 +182,12 @@ rectangle_draw_sashes(Object_t *obj, GdkWindow *window, GdkGC *gc)
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width / 2, rectangle->y);
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width, rectangle->y);
|
||||
draw_sash(window, gc, rectangle->x, rectangle->y + rectangle->height / 2);
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width,
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width,
|
||||
rectangle->y + rectangle->height / 2);
|
||||
draw_sash(window, gc, rectangle->x, rectangle->y + rectangle->height);
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width / 2,
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width / 2,
|
||||
rectangle->y + rectangle->height);
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width,
|
||||
draw_sash(window, gc, rectangle->x + rectangle->width,
|
||||
rectangle->y + rectangle->height);
|
||||
}
|
||||
|
||||
@ -267,18 +267,18 @@ rectangle_near_sash(Object_t *obj, gint x, gint y)
|
||||
return MoveUpperSash;
|
||||
else if (near_sash(rectangle->x + rectangle->width, rectangle->y, x, y))
|
||||
return MoveUpperRightSash;
|
||||
else if (near_sash(rectangle->x, rectangle->y + rectangle->height / 2,
|
||||
else if (near_sash(rectangle->x, rectangle->y + rectangle->height / 2,
|
||||
x, y))
|
||||
return MoveLeftSash;
|
||||
else if (near_sash(rectangle->x + rectangle->width,
|
||||
else if (near_sash(rectangle->x + rectangle->width,
|
||||
rectangle->y + rectangle->height / 2, x, y))
|
||||
return MoveRightSash;
|
||||
else if (near_sash(rectangle->x, rectangle->y + rectangle->height, x, y))
|
||||
return MoveLowerLeftSash;
|
||||
else if (near_sash(rectangle->x + rectangle->width / 2,
|
||||
else if (near_sash(rectangle->x + rectangle->width / 2,
|
||||
rectangle->y + rectangle->height, x, y))
|
||||
return MoveLowerSash;
|
||||
else if (near_sash(rectangle->x + rectangle->width,
|
||||
else if (near_sash(rectangle->x + rectangle->width,
|
||||
rectangle->y + rectangle->height, x, y))
|
||||
return MoveLowerRightSash;
|
||||
return NULL;
|
||||
@ -292,7 +292,7 @@ rectangle_point_is_on(Object_t *obj, gint x, gint y)
|
||||
y >= rectangle->y && y <= rectangle->y + rectangle->height;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
rectangle_get_dimensions(Object_t *obj, gint *x, gint *y,
|
||||
gint *width, gint *height)
|
||||
{
|
||||
@ -303,7 +303,7 @@ rectangle_get_dimensions(Object_t *obj, gint *x, gint *y,
|
||||
*height = rectangle->height;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
rectangle_resize(Object_t *obj, gint percentage_x, gint percentage_y)
|
||||
{
|
||||
Rectangle_t *rectangle = ObjectToRectangle(obj);
|
||||
@ -381,37 +381,36 @@ rectangle_create_info_widget(GtkWidget *frame)
|
||||
|
||||
table = gtk_table_new(4, 4, FALSE);
|
||||
gtk_container_add(GTK_CONTAINER(frame), table);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(table), 0);
|
||||
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 6);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 6);
|
||||
gtk_widget_show(table);
|
||||
|
||||
|
||||
label = create_label_in_table(table, 0, 0, _("Upper left _x:"));
|
||||
props->x = create_spin_button_in_table(table, label, 0, 1, 1, 0,
|
||||
props->x = create_spin_button_in_table(table, label, 0, 1, 1, 0,
|
||||
max_width - 1);
|
||||
g_signal_connect(props->x, "value_changed",
|
||||
g_signal_connect(props->x, "value_changed",
|
||||
G_CALLBACK(x_changed_cb), (gpointer) props);
|
||||
create_label_in_table(table, 0, 3, _("pixels"));
|
||||
|
||||
label = create_label_in_table(table, 1, 0, _("Upper left _y:"));
|
||||
props->y = create_spin_button_in_table(table, label, 1, 1, 1, 0,
|
||||
props->y = create_spin_button_in_table(table, label, 1, 1, 1, 0,
|
||||
max_height - 1);
|
||||
g_signal_connect(props->y, "value_changed",
|
||||
g_signal_connect(props->y, "value_changed",
|
||||
G_CALLBACK(y_changed_cb), (gpointer) props);
|
||||
create_label_in_table(table, 1, 3, _("pixels"));
|
||||
|
||||
label = create_label_in_table(table, 2, 0, _("_Width:"));
|
||||
props->width = create_spin_button_in_table(table, label, 2, 1, 1, 1,
|
||||
props->width = create_spin_button_in_table(table, label, 2, 1, 1, 1,
|
||||
max_width);
|
||||
g_signal_connect(props->width, "value_changed",
|
||||
g_signal_connect(props->width, "value_changed",
|
||||
G_CALLBACK(width_changed_cb), (gpointer) props);
|
||||
create_label_in_table(table, 2, 3, _("pixels"));
|
||||
|
||||
label = create_label_in_table(table, 3, 0, _("_Height:"));
|
||||
props->height = create_spin_button_in_table(table, label, 3, 1, 1, 1,
|
||||
props->height = create_spin_button_in_table(table, label, 3, 1, 1, 1,
|
||||
max_height);
|
||||
g_signal_connect(props->height, "value_changed",
|
||||
g_signal_connect(props->height, "value_changed",
|
||||
G_CALLBACK(height_changed_cb), (gpointer) props);
|
||||
create_label_in_table(table, 3, 3, _("pixels"));
|
||||
|
||||
@ -423,7 +422,7 @@ rectangle_create_info_widget(GtkWidget *frame)
|
||||
return props;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
rectangle_fill_info_tab(Object_t *obj, gpointer data)
|
||||
{
|
||||
Rectangle_t *rectangle = ObjectToRectangle(obj);
|
||||
@ -433,18 +432,18 @@ rectangle_fill_info_tab(Object_t *obj, gpointer data)
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->x), rectangle->x);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->y), rectangle->y);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->width), rectangle->width);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->height),
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->height),
|
||||
rectangle->height);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
rectangle_set_initial_focus(Object_t *obj, gpointer data)
|
||||
{
|
||||
RectangleProperties_t *props = (RectangleProperties_t*) data;
|
||||
gtk_widget_grab_focus(props->x);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
rectangle_update(Object_t* obj, gpointer data)
|
||||
{
|
||||
Rectangle_t *rectangle = ObjectToRectangle(obj);
|
||||
@ -498,7 +497,7 @@ rectangle_factory_finish(Object_t *obj, gint x, gint y)
|
||||
rectangle->height = y - rectangle->y;
|
||||
|
||||
rectangle_normalize(obj);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user