mirror of https://github.com/GNOME/gimp.git
app/interface.c tweak to make status bar update correctly (most of the
Sat Dec 12 17:36:51 GMT 1998 Austin Donnelly <austin@greenend.org.uk> * app/interface.c * app/gdisplay.c: tweak to make status bar update correctly (most of the time). As Sven has already noted, there seems to be a GTK bug involved. * app/disp_callbacks.c: only update the cursor co-ords if we actually know them. Gets rid of silly (0,0) announcements.
This commit is contained in:
parent
95d87dca4e
commit
0db6dcf168
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Sat Dec 12 17:36:51 GMT 1998 Austin Donnelly <austin@greenend.org.uk>
|
||||
|
||||
* app/interface.c
|
||||
* app/gdisplay.c: tweak to make status bar update correctly (most
|
||||
of the time). As Sven has already noted, there seems to be a GTK
|
||||
bug involved.
|
||||
|
||||
* app/disp_callbacks.c: only update the cursor co-ords if we
|
||||
actually know them. Gets rid of silly (0,0) announcements.
|
||||
|
||||
Thu Dec 10 19:09:53 CET 1998 Marc Lehmann <pcg@goof.com>
|
||||
|
||||
* configure.in: check only for "perl", not "perl5.005xx".
|
||||
|
|
|
@ -936,7 +936,6 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
|
|||
cursor_label_width =
|
||||
gdk_string_width ( gtk_widget_get_style(gdisp->cursor_label)->font, buffer );
|
||||
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
|
||||
gtk_widget_queue_resize (gdisp->statusarea);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1443,7 +1442,6 @@ gdisplay_expose_full (GDisplay *gdisp)
|
|||
gdisplay_add_display_area (gdisp, 0, 0,
|
||||
gdisp->disp_width,
|
||||
gdisp->disp_height);
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
}
|
||||
|
||||
/**************************************************/
|
||||
|
|
|
@ -102,7 +102,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gint return_val = FALSE;
|
||||
static gboolean scrolled = FALSE;
|
||||
static guint key_signal_id = 0;
|
||||
int update_cursor = 1;
|
||||
int update_cursor = FALSE;
|
||||
|
||||
tx = ty = 0;
|
||||
|
||||
|
@ -170,11 +170,10 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
|
||||
case GDK_PROXIMITY_OUT:
|
||||
gdisp->proximity = FALSE;
|
||||
update_cursor = 0;
|
||||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
update_cursor = 0; /* Actually, should figure out tx,ty here */
|
||||
/* Actually, should figure out tx,ty here */
|
||||
break;
|
||||
|
||||
case GDK_BUTTON_PRESS:
|
||||
|
@ -208,6 +207,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
/* reset the current tool if we're changing gdisplays */
|
||||
|
@ -243,6 +243,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
popup_shell = gdisp->shell;
|
||||
gdisplay_set_menu_sensitivity (gdisp);
|
||||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 3, bevent->time);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -275,6 +276,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->button_release_func) (active_tool, bevent, gdisp);
|
||||
|
@ -310,6 +312,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
tx = mevent->x;
|
||||
ty = mevent->y;
|
||||
}
|
||||
update_cursor = TRUE;
|
||||
|
||||
if (!gdisp->proximity)
|
||||
{
|
||||
|
@ -339,6 +342,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, mevent->x, mevent->y, &tx, &ty);
|
||||
mevent->x = tx;
|
||||
mevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->motion_func) (active_tool, mevent, gdisp);
|
||||
|
@ -484,8 +488,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 1, event->time);
|
||||
|
||||
/* Stop the signal emission so the button doesn't grab the
|
||||
* pointer away from us
|
||||
*/
|
||||
* pointer away from us */
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gint return_val = FALSE;
|
||||
static gboolean scrolled = FALSE;
|
||||
static guint key_signal_id = 0;
|
||||
int update_cursor = 1;
|
||||
int update_cursor = FALSE;
|
||||
|
||||
tx = ty = 0;
|
||||
|
||||
|
@ -170,11 +170,10 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
|
||||
case GDK_PROXIMITY_OUT:
|
||||
gdisp->proximity = FALSE;
|
||||
update_cursor = 0;
|
||||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
update_cursor = 0; /* Actually, should figure out tx,ty here */
|
||||
/* Actually, should figure out tx,ty here */
|
||||
break;
|
||||
|
||||
case GDK_BUTTON_PRESS:
|
||||
|
@ -208,6 +207,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
/* reset the current tool if we're changing gdisplays */
|
||||
|
@ -243,6 +243,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
popup_shell = gdisp->shell;
|
||||
gdisplay_set_menu_sensitivity (gdisp);
|
||||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 3, bevent->time);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -275,6 +276,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->button_release_func) (active_tool, bevent, gdisp);
|
||||
|
@ -310,6 +312,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
tx = mevent->x;
|
||||
ty = mevent->y;
|
||||
}
|
||||
update_cursor = TRUE;
|
||||
|
||||
if (!gdisp->proximity)
|
||||
{
|
||||
|
@ -339,6 +342,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, mevent->x, mevent->y, &tx, &ty);
|
||||
mevent->x = tx;
|
||||
mevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->motion_func) (active_tool, mevent, gdisp);
|
||||
|
@ -484,8 +488,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 1, event->time);
|
||||
|
||||
/* Stop the signal emission so the button doesn't grab the
|
||||
* pointer away from us
|
||||
*/
|
||||
* pointer away from us */
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
|
||||
}
|
||||
|
||||
|
|
|
@ -936,7 +936,6 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
|
|||
cursor_label_width =
|
||||
gdk_string_width ( gtk_widget_get_style(gdisp->cursor_label)->font, buffer );
|
||||
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
|
||||
gtk_widget_queue_resize (gdisp->statusarea);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1443,7 +1442,6 @@ gdisplay_expose_full (GDisplay *gdisp)
|
|||
gdisplay_add_display_area (gdisp, 0, 0,
|
||||
gdisp->disp_width,
|
||||
gdisp->disp_height);
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
}
|
||||
|
||||
/**************************************************/
|
||||
|
|
|
@ -102,7 +102,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gint return_val = FALSE;
|
||||
static gboolean scrolled = FALSE;
|
||||
static guint key_signal_id = 0;
|
||||
int update_cursor = 1;
|
||||
int update_cursor = FALSE;
|
||||
|
||||
tx = ty = 0;
|
||||
|
||||
|
@ -170,11 +170,10 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
|
||||
case GDK_PROXIMITY_OUT:
|
||||
gdisp->proximity = FALSE;
|
||||
update_cursor = 0;
|
||||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
update_cursor = 0; /* Actually, should figure out tx,ty here */
|
||||
/* Actually, should figure out tx,ty here */
|
||||
break;
|
||||
|
||||
case GDK_BUTTON_PRESS:
|
||||
|
@ -208,6 +207,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
/* reset the current tool if we're changing gdisplays */
|
||||
|
@ -243,6 +243,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
popup_shell = gdisp->shell;
|
||||
gdisplay_set_menu_sensitivity (gdisp);
|
||||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 3, bevent->time);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -275,6 +276,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, bevent->x, bevent->y, &tx, &ty);
|
||||
bevent->x = tx;
|
||||
bevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->button_release_func) (active_tool, bevent, gdisp);
|
||||
|
@ -310,6 +312,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
tx = mevent->x;
|
||||
ty = mevent->y;
|
||||
}
|
||||
update_cursor = TRUE;
|
||||
|
||||
if (!gdisp->proximity)
|
||||
{
|
||||
|
@ -339,6 +342,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
gdisplay_snap_point (gdisp, mevent->x, mevent->y, &tx, &ty);
|
||||
mevent->x = tx;
|
||||
mevent->y = ty;
|
||||
update_cursor = TRUE;
|
||||
}
|
||||
|
||||
(* active_tool->motion_func) (active_tool, mevent, gdisp);
|
||||
|
@ -484,8 +488,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
gtk_menu_popup (GTK_MENU (gdisp->popup), NULL, NULL, NULL, NULL, 1, event->time);
|
||||
|
||||
/* Stop the signal emission so the button doesn't grab the
|
||||
* pointer away from us
|
||||
*/
|
||||
* pointer away from us */
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
|
||||
}
|
||||
|
||||
|
|
|
@ -714,6 +714,8 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->cursor_label = gtk_label_new (" ");
|
||||
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
gdisp->statusbar = gtk_statusbar_new ();
|
||||
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
|
||||
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
|
||||
|
@ -765,8 +767,6 @@ create_display_shell (GDisplay* gdisp,
|
|||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (gdisp->shell);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning DODGY?
|
||||
#endif
|
||||
|
|
|
@ -714,6 +714,8 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->cursor_label = gtk_label_new (" ");
|
||||
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
gdisp->statusbar = gtk_statusbar_new ();
|
||||
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
|
||||
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
|
||||
|
@ -765,8 +767,6 @@ create_display_shell (GDisplay* gdisp,
|
|||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (gdisp->shell);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning DODGY?
|
||||
#endif
|
||||
|
|
|
@ -936,7 +936,6 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
|
|||
cursor_label_width =
|
||||
gdk_string_width ( gtk_widget_get_style(gdisp->cursor_label)->font, buffer );
|
||||
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
|
||||
gtk_widget_queue_resize (gdisp->statusarea);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1443,7 +1442,6 @@ gdisplay_expose_full (GDisplay *gdisp)
|
|||
gdisplay_add_display_area (gdisp, 0, 0,
|
||||
gdisp->disp_width,
|
||||
gdisp->disp_height);
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
}
|
||||
|
||||
/**************************************************/
|
||||
|
|
|
@ -714,6 +714,8 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->cursor_label = gtk_label_new (" ");
|
||||
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
gdisp->statusbar = gtk_statusbar_new ();
|
||||
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
|
||||
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
|
||||
|
@ -765,8 +767,6 @@ create_display_shell (GDisplay* gdisp,
|
|||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (gdisp->shell);
|
||||
|
||||
gdisplay_resize_cursor_label (gdisp);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning DODGY?
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue