mirror of https://github.com/GNOME/gimp.git
set the sensitivity of the cursor label before converting the coordinates
2006-07-13 Sven Neumann <sven@gimp.org> * app/display/gimpstatusbar.c (gimp_statusbar_set_cursor): set the sensitivity of the cursor label before converting the coordinates to the display unit (bug #347339).
This commit is contained in:
parent
597954af46
commit
2600229df1
|
@ -1,3 +1,9 @@
|
|||
2006-07-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/display/gimpstatusbar.c (gimp_statusbar_set_cursor): set the
|
||||
sensitivity of the cursor label before converting the coordinates
|
||||
to the display unit (bug #347339).
|
||||
|
||||
2006-07-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/bmp/bmp.[ch]
|
||||
|
|
|
@ -651,6 +651,18 @@ gimp_statusbar_set_cursor (GimpStatusbar *statusbar,
|
|||
|
||||
shell = statusbar->shell;
|
||||
|
||||
if (x < 0 ||
|
||||
y < 0 ||
|
||||
x >= shell->display->image->width ||
|
||||
y >= shell->display->image->height)
|
||||
{
|
||||
gtk_widget_set_sensitive (statusbar->cursor_label, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (statusbar->cursor_label, TRUE);
|
||||
}
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (statusbar->unit_combo));
|
||||
store = GIMP_UNIT_STORE (model);
|
||||
|
||||
|
@ -672,18 +684,6 @@ gimp_statusbar_set_cursor (GimpStatusbar *statusbar,
|
|||
}
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (statusbar->cursor_label), buffer);
|
||||
|
||||
if (x < 0 ||
|
||||
y < 0 ||
|
||||
x >= statusbar->shell->display->image->width ||
|
||||
y >= statusbar->shell->display->image->height)
|
||||
{
|
||||
gtk_widget_set_sensitive (statusbar->cursor_label, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (statusbar->cursor_label, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue