Commit 43f862f7 authored by Andreas Schwab's avatar Andreas Schwab

* src/gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.

parent 810928a2
2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
* gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
* xfns.c (x_set_scroll_bar_default_width): Move declarations
before statements.
......
......@@ -3329,11 +3329,15 @@ xg_get_widget_from_map (int idx)
int
xg_get_default_scrollbar_width (FRAME_PTR f)
{
GtkWidget *wscroll = gtk_vscrollbar_new (gtk_adjustment_new (XG_SB_MIN,
XG_SB_MIN,
XG_SB_MAX,
0.1, 0.1, 0.1));
#ifdef HAVE_GTK3
GtkAdjustment *vadj;
#else
GtkObject *vadj;
#endif
GtkWidget *wscroll;
int w = 0, b = 0;
vadj = gtk_adjustment_new (XG_SB_MIN, XG_SB_MIN, XG_SB_MAX, 0.1, 0.1, 0.1);
wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj));
gtk_widget_style_get (wscroll, "slider-width", &w, "trough-border", &b, NULL);
gtk_widget_destroy (wscroll);
w += 2*b;
......
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