# HG changeset patch
# User John W. Eaton
We Need Your Help
" diff -r 39edc0fccf58 -r df4e0018036a libgui/src/resource-manager.cc --- a/libgui/src/resource-manager.cc Mon Dec 02 15:36:21 2013 -0500 +++ b/libgui/src/resource-manager.cc Mon Dec 02 15:44:15 2013 -0500 @@ -192,18 +192,29 @@ qt_settings.close (); // Get the default monospaced font and replace placeholder - QFont fixed_font = QFont (); +#if defined (HAVE_QFONT_MONOSPACE) + QFont fixed_font; fixed_font.setStyleHint (QFont::Monospace); - settings_text.replace("__default_font__",fixed_font.defaultFamily ()); - settings_text.replace("__default_font_size__","10"); + QString default_family = fixed_font.defaultFamily (); +#elif defined (Q_WS_X11) || defined (Q_WS_WIN) + QString default_family = "Courier New"; +#elif defined (Q_WS_MAC) + QString default_family = "Courier"; +#else + QString default_family = "courier"; +#endif + settings_text.replace ("__default_font__", default_family); + settings_text.replace ("__default_font_size__", "10"); QFile user_settings (settings_file); - if (!user_settings.open (QIODevice::WriteOnly)) + + if (! user_settings.open (QIODevice::WriteOnly)) return; QTextStream out (&user_settings); + out << settings_text; - user_settings.flush (); + user_settings.close (); } diff -r 39edc0fccf58 -r df4e0018036a libinterp/Makefile.am --- a/libinterp/Makefile.am Mon Dec 02 15:36:21 2013 -0500 +++ b/libinterp/Makefile.am Mon Dec 02 15:44:15 2013 -0500 @@ -187,8 +187,8 @@ $(LIBOCTINTERP_LINK_DEPS) # Increment these as needed and according to the rules in the libtool manual: -liboctinterp_current = 1 -liboctinterp_revision = 1 +liboctinterp_current = 2 +liboctinterp_revision = 0 liboctinterp_age = 0 liboctinterp_version_info = $(liboctinterp_current):$(liboctinterp_revision):$(liboctinterp_age) diff -r 39edc0fccf58 -r df4e0018036a libinterp/corefcn/file-io.cc --- a/libinterp/corefcn/file-io.cc Mon Dec 02 15:36:21 2013 -0500 +++ b/libinterp/corefcn/file-io.cc Mon Dec 02 15:44:15 2013 -0500 @@ -2222,7 +2222,7 @@ @deftypefn {Built-in Function} {} SEEK_CUR ()\n\ Return the numerical value to pass to @code{fseek} to\n\ position the file pointer relative to the current position.\n\ -@seealso{SEEK_SET, SEEK_END}.\n\ +@seealso{SEEK_SET, SEEK_END}\n\ @end deftypefn") { return const_value ("SEEK_CUR", args, 0); @@ -2233,7 +2233,7 @@ @deftypefn {Built-in Function} {} SEEK_END ()\n\ Return the numerical value to pass to @code{fseek} to\n\ position the file pointer relative to the end of the file.\n\ -@seealso{SEEK_SET, SEEK_CUR}.\n\ +@seealso{SEEK_SET, SEEK_CUR}\n\ @end deftypefn") { return const_value ("SEEK_END", args, 1); diff -r 39edc0fccf58 -r df4e0018036a libinterp/corefcn/input.cc --- a/libinterp/corefcn/input.cc Mon Dec 02 15:36:21 2013 -0500 +++ b/libinterp/corefcn/input.cc Mon Dec 02 15:44:15 2013 -0500 @@ -137,7 +137,10 @@ void set_default_prompts (void) { - VPS1 = "\\s:\\#> "; + // Use literal "octave" instead of "\\s" to avoid setting the prompt + // to "octave.exe" or "octave-gui", etc. + + VPS1 = "octave:\\#> "; VPS2 = "> "; VPS4 = "+ "; @@ -1237,7 +1240,7 @@ Query or set the primary prompt string. When executing interactively,\n\ Octave displays the primary prompt when it is ready to read a command.\n\ \n\ -The default value of the primary prompt string is @qcode{\"\\s:\\#> \"}.\n\ +The default value of the primary prompt string is @qcode{\"octave:\\#> \"}.\n\ To change it, use a command like\n\ \n\ @example\n\ diff -r 39edc0fccf58 -r df4e0018036a liboctave/Makefile.am --- a/liboctave/Makefile.am Mon Dec 02 15:36:21 2013 -0500 +++ b/liboctave/Makefile.am Mon Dec 02 15:44:15 2013 -0500 @@ -104,8 +104,8 @@ $(LIBOCTAVE_LINK_DEPS) # Increment these as needed and according to the rules in the libtool manual: -liboctave_current = 1 -liboctave_revision = 1 +liboctave_current = 2 +liboctave_revision = 0 liboctave_age = 0 liboctave_version_info = $(liboctave_current):$(liboctave_revision):$(liboctave_age) diff -r 39edc0fccf58 -r df4e0018036a m4/acinclude.m4 --- a/m4/acinclude.m4 Mon Dec 02 15:36:21 2013 -0500 +++ b/m4/acinclude.m4 Mon Dec 02 15:44:15 2013 -0500 @@ -359,6 +359,30 @@ fi ]) dnl +dnl Check whether Qt provides QFont::Monospace +dnl +AC_DEFUN([OCTAVE_CHECK_QFONT_MONOSPACE], [ + AC_CACHE_CHECK([whether Qt provides QFont::Monospace], + [octave_cv_decl_qfont_monospace], + [AC_LANG_PUSH(C++) + ac_octave_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include