/* Functions for creating and updating GTK widgets.
-Copyright (C) 2003-2014 Free Software Foundation, Inc.
+Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#define remove_submenu(w) gtk_menu_item_remove_submenu ((w))
#endif
+#if ! GTK_CHECK_VERSION (2, 14, 0)
+#define gtk_adjustment_configure(adj, xvalue, xlower, \
+ xupper, xstep_increment, \
+ xpage_increment, xpagesize) \
+ do { \
+ adj->lower = xlower; \
+ adj->upper = xupper; \
+ adj->page_size = xpagesize; \
+ gtk_adjustment_set_value (adj, xvalue); \
+ adj->page_increment = xpage_increment; \
+ adj->step_increment = xstep_increment; \
+ } while (0)
+#endif /* < Gtk+ 2.14 */
+
#ifdef HAVE_FREETYPE
#if GTK_CHECK_VERSION (3, 2, 0)
#define USE_NEW_GTK_FONT_CHOOSER 1
x_wait_for_event (f, ConfigureNotify);
}
else
- adjust_frame_size (f, -1, -1, 5, 0, Qnil);
+ adjust_frame_size (f, -1, -1, 5, 0, Qxg_frame_set_char_size);
}
/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
if (x_gtk_file_dialog_help_text)
{
- msgbuf[0] = '\0';
+ char *z = msgbuf;
/* Gtk+ 2.10 has the file name text entry box integrated in the dialog.
Show the C-l help text only for versions < 2.10. */
if (gtk_check_version (2, 10, 0) && action != GTK_FILE_CHOOSER_ACTION_SAVE)
- strcat (msgbuf, "\nType C-l to display a file name text entry box.\n");
- strcat (msgbuf, "\nIf you don't like this file selector, use the "
+ z = stpcpy (z, "\nType C-l to display a file name text entry box.\n");
+ strcpy (z, "\nIf you don't like this file selector, use the "
"corresponding\nkey binding or customize "
"use-file-dialog to turn it off.");
block_input ();
adj = gtk_range_get_adjustment (GTK_RANGE (wscroll));
-#if GTK_CHECK_VERSION (2, 3, 16)
gtk_adjustment_configure (adj, (gdouble) value, (gdouble) lower,
(gdouble) upper, (gdouble) step_increment,
(gdouble) page_increment, (gdouble) pagesize);
-#else
- gtk_adjustment_set_lower (adj, (gdouble) lower);
- gtk_adjustment_set_upper (adj, (gdouble) upper);
- gtk_adjustment_set_page_size (adj, (gdouble) pagesize);
- gtk_adjustment_set_value (adj, (gdouble) value);
- gtk_adjustment_set_page_increment (adj, (gdouble) page_increment);
- gtk_adjustment_set_step_increment (adj, (gdouble) step_increment);
-#endif
gtk_adjustment_changed (adj);
unblock_input ();
}