Commit f979dc05 authored by Jan Djärv's avatar Jan Djärv
Browse files

* xterm.c (xg_scroll_callback): Call gtk_range_get_adjustment to

get GtkAdjustment as widget now is a GtkRange.

* gtkutil.c (xg_create_scroll_bar): Connect to value-changed on
GtkRange to avoid memory leak.
parent 8793a2bd
2003-04-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xterm.c (xg_scroll_callback): Call gtk_range_get_adjustment to
get GtkAdjustment as widget now is a GtkRange.
* gtkutil.c (xg_create_scroll_bar): Connect to value-changed on
GtkRange to avoid memory leak.
2003-04-09 Kenichi Handa <handa@m17n.org>
* xfaces.c (Vface_font_rescale_alist): New variable.
......
......@@ -2512,25 +2512,25 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name)
scroll_id = xg_store_widget_in_map (wscroll);
g_signal_connect (G_OBJECT (vadj),
g_signal_connect (G_OBJECT (wscroll),
"value-changed",
scroll_callback,
(gpointer)bar);
(gpointer) bar);
g_signal_connect (G_OBJECT (wscroll),
"destroy",
G_CALLBACK (xg_gtk_scroll_destroy),
(gpointer)scroll_id);
(gpointer) scroll_id);
/* Connect to button press and button release to detect if any scroll bar
has the pointer. */
g_signal_connect (G_OBJECT (wscroll),
"button-press-event",
G_CALLBACK (scroll_bar_button_cb),
(gpointer)bar);
(gpointer) bar);
g_signal_connect (G_OBJECT (wscroll),
"button-release-event",
G_CALLBACK (scroll_bar_button_cb),
(gpointer)bar);
(gpointer) bar);
gtk_fixed_put (GTK_FIXED (f->output_data.x->edit_widget),
wscroll, -1, -1);
......
......@@ -4190,11 +4190,11 @@ xm_scroll_callback (widget, client_data, call_data)
#else /* !USE_MOTIF, i.e. Xaw or GTK */
#ifdef USE_GTK
/* Scroll bar callback for GTK scroll bars. WIDGET is the scroll
bar adjustment widget. DATA is a pointer to the scroll_bar structure. */
bar widget. DATA is a pointer to the scroll_bar structure. */
static void
xg_scroll_callback (widget, data)
GtkWidget *widget;
GtkRange *widget;
gpointer data;
{
struct scroll_bar *bar = (struct scroll_bar *) data;
......@@ -4204,7 +4204,7 @@ xg_scroll_callback (widget, data)
int diff;
int part = -1, whole = 0, portion = 0;
GtkAdjustment *adj = GTK_ADJUSTMENT (widget);
GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (widget));
if (xg_ignore_gtk_scrollbar) return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment