mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Menubar and toolbar fixes. New OptItem menu option. Add gtk.m4.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@918 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d8b75819d6
commit
b8072fd6f7
44
ChangeLog
44
ChangeLog
@ -1,3 +1,47 @@
|
|||||||
|
2000-07-25 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* config/gnome/gtk.m4: added (and added to the list of files in
|
||||||
|
autogen.sh).
|
||||||
|
|
||||||
|
* src/insets/insetinclude.C (unique_id): fix when we are using
|
||||||
|
lyxstring instead of basic_string<>.
|
||||||
|
* src/insets/insettext.C (LocalDispatch): ditto.
|
||||||
|
* src/support/filetools.C: ditto.
|
||||||
|
|
||||||
|
* lib/configure.m4: create the ui/ directory if necessary.
|
||||||
|
|
||||||
|
* src/LyXView.[Ch] (updateToolbar): new method.
|
||||||
|
|
||||||
|
* src/BufferView_pimpl.C (buffer): update the toolbar when
|
||||||
|
opening/closing buffer.
|
||||||
|
|
||||||
|
2000-07-24 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* src/LyXAction.C (getActionName): enhance to return also the name
|
||||||
|
and options of pseudo-actions.
|
||||||
|
(init): New lyxfunc LFUN_MATH_PANEL=="math-panel".
|
||||||
|
|
||||||
|
* lib/ui/default.ui: use OptItem in the vc submenu (intented just
|
||||||
|
as an example of what is possible). Used in File->Build too (more
|
||||||
|
useful) and in the import/export menus (to mimick the complicated
|
||||||
|
handling of linuxdoc and friends). Try to update all the entries.
|
||||||
|
|
||||||
|
* src/frontends/xforms/Menubar_pimpl.C (create_submenu): handle
|
||||||
|
optional entries.
|
||||||
|
|
||||||
|
* src/MenuBackend.C (read): Parse the new OptItem tag.
|
||||||
|
|
||||||
|
* src/MenuBackend.h: Add a new optional_ data member (used if the
|
||||||
|
entry should be omitted when the lyxfunc is disabled).
|
||||||
|
|
||||||
|
* src/frontends/xforms/Menubar_pimpl.C (string_width): new
|
||||||
|
function, used as a shortcut.
|
||||||
|
(create_submenu): align correctly the shortcuts on the widest
|
||||||
|
entry.
|
||||||
|
|
||||||
|
* src/MenuBackend.h: MenuItem.label() only returns the label of
|
||||||
|
the menu without shortcut; new method shortcut().
|
||||||
|
|
||||||
2000-07-14 Marko Vendelin <markov@ioc.ee>
|
2000-07-14 Marko Vendelin <markov@ioc.ee>
|
||||||
|
|
||||||
* src/frontends/gtk/Dialogs.C:
|
* src/frontends/gtk/Dialogs.C:
|
||||||
|
194
acinclude.m4
194
acinclude.m4
@ -4358,6 +4358,200 @@ if test -n "$LIBXDMCP"; then
|
|||||||
ac_cpp=$ac_cpp_safe
|
ac_cpp=$ac_cpp_safe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
# Configure paths for GTK+
|
||||||
|
# Owen Taylor 97-11-3
|
||||||
|
|
||||||
|
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||||
|
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AM_PATH_GTK,
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the gtk-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||||
|
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||||
|
, enable_gtktest=yes)
|
||||||
|
|
||||||
|
for module in . $4
|
||||||
|
do
|
||||||
|
case "$module" in
|
||||||
|
gthread)
|
||||||
|
gtk_config_args="$gtk_config_args gthread"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test x$gtk_config_exec_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$gtk_config_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||||
|
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||||
|
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||||
|
no_gtk=""
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
no_gtk=yes
|
||||||
|
else
|
||||||
|
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||||
|
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||||
|
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_gtktest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$GTK_LIBS $LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of gtk-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.gtktest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.gtktest");
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = g_strdup("$min_gtk_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_gtk_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||||
|
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||||
|
(gtk_micro_version != $gtk_config_micro_version))
|
||||||
|
{
|
||||||
|
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||||
|
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf ("*** was found! If gtk-config was correct, then it is best\n");
|
||||||
|
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||||
|
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||||
|
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||||
|
printf("*** required on your system.\n");
|
||||||
|
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||||
|
printf("*** before re-running configure\n");
|
||||||
|
}
|
||||||
|
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||||
|
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||||
|
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||||
|
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||||
|
{
|
||||||
|
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||||
|
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||||
|
printf("*** library (version %d.%d.%d)\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
}
|
||||||
|
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((gtk_major_version > major) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||||
|
major, minor, micro);
|
||||||
|
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||||
|
printf("***\n");
|
||||||
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
|
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
||||||
|
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||||
|
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
||||||
|
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
||||||
|
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||||
|
printf("*** so that the correct libraries are found at run-time))\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_gtk" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
echo "*** The gtk-config script installed by GTK could not be found"
|
||||||
|
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to gtk-config."
|
||||||
|
else
|
||||||
|
if test -f conf.gtktest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run GTK test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$LIBS $GTK_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||||
|
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||||
|
echo "*** came with the system with the command"
|
||||||
|
echo "***"
|
||||||
|
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||||
|
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GTK_CFLAGS=""
|
||||||
|
GTK_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
AC_SUBST(GTK_LIBS)
|
||||||
|
rm -f conf.gtktest
|
||||||
])
|
])
|
||||||
# aclocal-include.m4
|
# aclocal-include.m4
|
||||||
#
|
#
|
||||||
|
@ -24,7 +24,7 @@ fi
|
|||||||
echo -n "Generate acinclude.m4... "
|
echo -n "Generate acinclude.m4... "
|
||||||
rm -f acinclude.m4 sigc++/acinclude.m4
|
rm -f acinclude.m4 sigc++/acinclude.m4
|
||||||
touch acinclude.m4
|
touch acinclude.m4
|
||||||
for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 config/sigc++.m4 config/kde.m4 config/gnome/aclocal-include.m4 config/gnome/gnome-print-check.m4 config/gnome/compiler-flags.m4 config/gnome/gnome-pthread-check.m4 config/gnome/curses.m4 config/gnome/gnome-support.m4 config/gnome/gnome-bonobo-check.m4 config/gnome/gnome-undelfs.m4 config/gnome/gnome-common.m4 config/gnome/gnome-vfs.m4 config/gnome/gnome-fileutils.m4 config/gnome/gnome-x-checks.m4 config/gnome/gnome-ghttp-check.m4 config/gnome/gnome-xml-check.m4 config/gnome/gnome-gnorba-check.m4 config/gnome/gnome.m4 config/gnome/gnome-guile-checks.m4 config/gnome/gperf-check.m4 config/gnome/gnome-libgtop-check.m4 config/gnome/linger.m4 config/gnome/gnome-objc-checks.m4 config/gnome/need-declaration.m4 config/gnome/gnome-orbit-check.m4 config/gnome/gtk--.m4 config/gnome/gnome--.m4 ; do
|
for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 config/sigc++.m4 config/kde.m4 config/gnome/gtk.m4 config/gnome/aclocal-include.m4 config/gnome/gnome-print-check.m4 config/gnome/compiler-flags.m4 config/gnome/gnome-pthread-check.m4 config/gnome/curses.m4 config/gnome/gnome-support.m4 config/gnome/gnome-bonobo-check.m4 config/gnome/gnome-undelfs.m4 config/gnome/gnome-common.m4 config/gnome/gnome-vfs.m4 config/gnome/gnome-fileutils.m4 config/gnome/gnome-x-checks.m4 config/gnome/gnome-ghttp-check.m4 config/gnome/gnome-xml-check.m4 config/gnome/gnome-gnorba-check.m4 config/gnome/gnome.m4 config/gnome/gnome-guile-checks.m4 config/gnome/gperf-check.m4 config/gnome/gnome-libgtop-check.m4 config/gnome/linger.m4 config/gnome/gnome-objc-checks.m4 config/gnome/need-declaration.m4 config/gnome/gnome-orbit-check.m4 config/gnome/gtk--.m4 config/gnome/gnome--.m4 ; do
|
||||||
cat $fil >> acinclude.m4
|
cat $fil >> acinclude.m4
|
||||||
done
|
done
|
||||||
touch sigc++/acinclude.m4
|
touch sigc++/acinclude.m4
|
||||||
|
194
config/gnome/gtk.m4
Normal file
194
config/gnome/gtk.m4
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
# Configure paths for GTK+
|
||||||
|
# Owen Taylor 97-11-3
|
||||||
|
|
||||||
|
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||||
|
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AM_PATH_GTK,
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the gtk-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||||
|
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||||
|
, enable_gtktest=yes)
|
||||||
|
|
||||||
|
for module in . $4
|
||||||
|
do
|
||||||
|
case "$module" in
|
||||||
|
gthread)
|
||||||
|
gtk_config_args="$gtk_config_args gthread"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test x$gtk_config_exec_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$gtk_config_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||||
|
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||||
|
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||||
|
no_gtk=""
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
no_gtk=yes
|
||||||
|
else
|
||||||
|
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||||
|
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||||
|
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_gtktest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$GTK_LIBS $LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of gtk-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.gtktest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.gtktest");
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = g_strdup("$min_gtk_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_gtk_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||||
|
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||||
|
(gtk_micro_version != $gtk_config_micro_version))
|
||||||
|
{
|
||||||
|
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||||
|
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf ("*** was found! If gtk-config was correct, then it is best\n");
|
||||||
|
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||||
|
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||||
|
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||||
|
printf("*** required on your system.\n");
|
||||||
|
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||||
|
printf("*** before re-running configure\n");
|
||||||
|
}
|
||||||
|
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||||
|
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||||
|
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||||
|
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||||
|
{
|
||||||
|
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||||
|
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||||
|
printf("*** library (version %d.%d.%d)\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
}
|
||||||
|
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((gtk_major_version > major) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||||
|
major, minor, micro);
|
||||||
|
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||||
|
printf("***\n");
|
||||||
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
|
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
||||||
|
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||||
|
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
||||||
|
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
||||||
|
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||||
|
printf("*** so that the correct libraries are found at run-time))\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_gtk" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
echo "*** The gtk-config script installed by GTK could not be found"
|
||||||
|
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to gtk-config."
|
||||||
|
else
|
||||||
|
if test -f conf.gtktest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run GTK test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$LIBS $GTK_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||||
|
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||||
|
echo "*** came with the system with the command"
|
||||||
|
echo "***"
|
||||||
|
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||||
|
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GTK_CFLAGS=""
|
||||||
|
GTK_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
AC_SUBST(GTK_LIBS)
|
||||||
|
rm -f conf.gtktest
|
||||||
|
])
|
@ -62,7 +62,7 @@ LYX_SCO
|
|||||||
AC_EXEEXT
|
AC_EXEEXT
|
||||||
|
|
||||||
### Check for a C++ compiler
|
### Check for a C++ compiler
|
||||||
#AC_LANG_CPLUSPLUS
|
AC_LANG_CPLUSPLUS
|
||||||
LYX_PROG_CXX
|
LYX_PROG_CXX
|
||||||
AC_PROG_CXXCPP
|
AC_PROG_CXXCPP
|
||||||
AC_DISABLE_SHARED
|
AC_DISABLE_SHARED
|
||||||
@ -85,6 +85,8 @@ dnl we disable rtti for now
|
|||||||
dnl LYX_CXX_RTTI
|
dnl LYX_CXX_RTTI
|
||||||
AC_CHECK_HEADERS(ostream istream sstream)
|
AC_CHECK_HEADERS(ostream istream sstream)
|
||||||
LYX_CXX_STL_MODERN_STREAMS
|
LYX_CXX_STL_MODERN_STREAMS
|
||||||
|
dnl It seems this is needed by gtk/gnome stuff
|
||||||
|
AC_LANG_C
|
||||||
|
|
||||||
### We need a regex implementation, so we provide our own if none is found.
|
### We need a regex implementation, so we provide our own if none is found.
|
||||||
LYX_REGEX
|
LYX_REGEX
|
||||||
|
2
lib/configure
vendored
2
lib/configure
vendored
@ -71,7 +71,7 @@ fi
|
|||||||
|
|
||||||
#### Create the build directories if necessary
|
#### Create the build directories if necessary
|
||||||
for dir in bind clipart doc examples images kbd layouts reLyX \
|
for dir in bind clipart doc examples images kbd layouts reLyX \
|
||||||
scripts templates ; do
|
scripts templates ui ; do
|
||||||
test ! -d $dir && mkdir $dir
|
test ! -d $dir && mkdir $dir
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ fi
|
|||||||
|
|
||||||
#### Create the build directories if necessary
|
#### Create the build directories if necessary
|
||||||
for dir in bind clipart doc examples images kbd layouts reLyX \
|
for dir in bind clipart doc examples images kbd layouts reLyX \
|
||||||
scripts templates ; do
|
scripts templates ui ; do
|
||||||
test ! -d $dir && mkdir $dir
|
test ! -d $dir && mkdir $dir
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Menuset
|
|||||||
Item "View Postscript|w" "buffer-view-ps"
|
Item "View Postscript|w" "buffer-view-ps"
|
||||||
Item "Update dvi|v" "buffer-typeset"
|
Item "Update dvi|v" "buffer-typeset"
|
||||||
Item "Update Postscript|u" "buffer-typeset-ps"
|
Item "Update Postscript|u" "buffer-typeset-ps"
|
||||||
Item "Build program|B" "build-program"
|
OptItem "Build program|B" "build-program"
|
||||||
Separator
|
Separator
|
||||||
Item "Print...|P" "buffer-print"
|
Item "Print...|P" "buffer-print"
|
||||||
Item "Fax...|F" "buffer-fax"
|
Item "Fax...|F" "buffer-fax"
|
||||||
@ -68,11 +68,16 @@ Menuset
|
|||||||
End
|
End
|
||||||
|
|
||||||
Menu "export"
|
Menu "export"
|
||||||
Item "LaTeX|L" "buffer-export latex"
|
OptItem "as LaTeX|L" "buffer-export latex"
|
||||||
Item "DVI|D" "buffer-export dvi"
|
OptItem "as LinuxDoc|L" "buffer-export linuxdoc"
|
||||||
Item "Postscript|P" "buffer-export postscript"
|
OptItem "as DocBook|B" "buffer-export docbook"
|
||||||
Item "Ascii|A" "buffer-export ascii"
|
Item "as DVI|D" "buffer-export dvi"
|
||||||
Item "Custom...|C" "buffer-export custom"
|
Item "as Postscript|P" "buffer-export postscript"
|
||||||
|
Item "as Ascii|A" "buffer-export ascii"
|
||||||
|
OptItem "as HTML|H" "buffer-export html"
|
||||||
|
OptItem "as HTML|H" "buffer-export html-linuxdoc"
|
||||||
|
OptItem "as HTML|H" "buffer-export html-docbook"
|
||||||
|
OptItem "Custom...|C" "buffer-export custom"
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "edit"
|
Menu "edit"
|
||||||
@ -86,8 +91,8 @@ Menuset
|
|||||||
Item "Find & Replace...|F" "find-replace"
|
Item "Find & Replace...|F" "find-replace"
|
||||||
Item "Go to Error|E" "error-next"
|
Item "Go to Error|E" "error-next"
|
||||||
Item "Go to Note|N" "note-next"
|
Item "Go to Note|N" "note-next"
|
||||||
Submenu "Floats & Insets|I" "floats"
|
Submenu "Floats & Insets|I" "edit_floats"
|
||||||
Submenu "Table" "table"
|
Submenu "Table" "edit_table"
|
||||||
Item "Spellchecker...|S" "spellchecker"
|
Item "Spellchecker...|S" "spellchecker"
|
||||||
Item "Check TeX|h" "buffer-chktex"
|
Item "Check TeX|h" "buffer-chktex"
|
||||||
Item "Table of Contents|b" "toc-view"
|
Item "Table of Contents|b" "toc-view"
|
||||||
@ -96,23 +101,27 @@ Menuset
|
|||||||
Separator
|
Separator
|
||||||
Item "View LaTeX log file|w" "latex-view-log"
|
Item "View LaTeX log file|w" "latex-view-log"
|
||||||
Separator
|
Separator
|
||||||
Item "Paste primary selection as Lines|L" "primary-selection-paste"
|
SubMenu "Paste primary selection" "edit_paste"
|
||||||
Item "Paste primary selection as Paragraphs|g" "primary-selection-paste paragraph"
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "floats"
|
Menu "edit_floats"
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "table"
|
Menu "edit_table"
|
||||||
|
End
|
||||||
|
|
||||||
|
Menu "edit_paste"
|
||||||
|
Item "as Lines|L" "primary-selection-paste"
|
||||||
|
Item "as Paragraphs|g" "primary-selection-paste paragraph"
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "vc"
|
Menu "vc"
|
||||||
Item "Register|R" "vc-register"
|
OptItem "Register|R" "vc-register"
|
||||||
Item "Check In Changes|I" "vc-check-in"
|
OptItem "Check In Changes|I" "vc-check-in"
|
||||||
Item "Check Out for Edit|O" "vc-check-out"
|
OptItem "Check Out for Edit|O" "vc-check-out"
|
||||||
Item "Revert to last version|l" "vc-revert"
|
OptItem "Revert to last version|l" "vc-revert"
|
||||||
Item "Undo last check in|U" "vc-undo-last"
|
OptItem "Undo last check in|U" "vc-undo-last"
|
||||||
Item "Show History|H" "vc-history"
|
OptItem "Show History|H" "vc-history"
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "layout"
|
Menu "layout"
|
||||||
@ -141,6 +150,7 @@ Menuset
|
|||||||
Item "Include File...|I" "buffer-child-insert"
|
Item "Include File...|I" "buffer-child-insert"
|
||||||
Submenu "Import ascii file|a" "insert_ascii"
|
Submenu "Import ascii file|a" "insert_ascii"
|
||||||
Item "Insert LyX file|X" "file-insert"
|
Item "Insert LyX file|X" "file-insert"
|
||||||
|
Item "Insert external material...|e" "external-inset-insert"
|
||||||
Separator
|
Separator
|
||||||
Item "Footnote|F" "footnote-insert"
|
Item "Footnote|F" "footnote-insert"
|
||||||
Item "Marginnote|M" "marginpar-insert"
|
Item "Marginnote|M" "marginpar-insert"
|
||||||
@ -190,6 +200,7 @@ Menuset
|
|||||||
Item "Ellipsis|i" "dots-insert"
|
Item "Ellipsis|i" "dots-insert"
|
||||||
Item "End of sentence|E" "end-of-sentence-period-insert"
|
Item "End of sentence|E" "end-of-sentence-period-insert"
|
||||||
Item "Ordinary Quote|Q" "quote-insert"
|
Item "Ordinary Quote|Q" "quote-insert"
|
||||||
|
Item "Menu Separator|M" "menu-separator-insert"
|
||||||
End
|
End
|
||||||
|
|
||||||
Menu "math"
|
Menu "math"
|
||||||
|
@ -146,6 +146,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
|
|||||||
#else
|
#else
|
||||||
owner_->getMenus()->showMenus();
|
owner_->getMenus()->showMenus();
|
||||||
#endif
|
#endif
|
||||||
|
owner_->updateToolbar();
|
||||||
redraw();
|
redraw();
|
||||||
owner_->getDialogs()->updateBufferDependent();
|
owner_->getDialogs()->updateBufferDependent();
|
||||||
bv_->insetWakeup();
|
bv_->insetWakeup();
|
||||||
@ -156,6 +157,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
|
|||||||
#else
|
#else
|
||||||
owner_->getMenus()->hideMenus();
|
owner_->getMenus()->hideMenus();
|
||||||
#endif
|
#endif
|
||||||
|
owner_->updateToolbar();
|
||||||
updateScrollbar();
|
updateScrollbar();
|
||||||
workarea_->redraw();
|
workarea_->redraw();
|
||||||
|
|
||||||
|
@ -322,6 +322,7 @@ void LyXAction::init()
|
|||||||
{ LFUN_MATH_MODE, "math-mode", N_("Math mode"), Noop },
|
{ LFUN_MATH_MODE, "math-mode", N_("Math mode"), Noop },
|
||||||
{ LFUN_MATH_NONUMBER, "math-nonumber", "", Noop },
|
{ LFUN_MATH_NONUMBER, "math-nonumber", "", Noop },
|
||||||
{ LFUN_MATH_NUMBER, "math-number", "", Noop },
|
{ LFUN_MATH_NUMBER, "math-number", "", Noop },
|
||||||
|
{ LFUN_MATH_PANEL, "math-panel", "", Noop },
|
||||||
{ LFUN_MATH_SIZE, "math-size", "", Noop },
|
{ LFUN_MATH_SIZE, "math-size", "", Noop },
|
||||||
{ LFUN_MELT, "melt", N_("Melt"), Noop },
|
{ LFUN_MELT, "melt", N_("Melt"), Noop },
|
||||||
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
|
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
|
||||||
@ -597,10 +598,21 @@ string LyXAction::getApproxFuncName(string const & func) const
|
|||||||
|
|
||||||
string LyXAction::getActionName(int action) const
|
string LyXAction::getActionName(int action) const
|
||||||
{
|
{
|
||||||
info_map::const_iterator iit =
|
kb_action ac;
|
||||||
lyx_info_map.find(static_cast<kb_action>(action));
|
string arg;
|
||||||
|
if (isPseudoAction(action)) {
|
||||||
|
ac = retrieveActionArg(action, arg);
|
||||||
|
arg = " " +arg;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ac = static_cast<kb_action>(action);
|
||||||
|
|
||||||
return iit != lyx_info_map.end() ? (*iit).second.name : string();
|
info_map::const_iterator iit = lyx_info_map.find(ac);
|
||||||
|
|
||||||
|
if (iit != lyx_info_map.end())
|
||||||
|
return (*iit).second.name + arg;
|
||||||
|
else
|
||||||
|
return string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,11 +128,19 @@ Toolbar * LyXView::getToolbar() const
|
|||||||
return toolbar;
|
return toolbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LyXView::setLayout(int layout)
|
void LyXView::setLayout(int layout)
|
||||||
{
|
{
|
||||||
toolbar->setLayout(layout);
|
toolbar->setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LyXView::updateToolbar()
|
||||||
|
{
|
||||||
|
toolbar->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXFunc * LyXView::getLyXFunc() const
|
LyXFunc * LyXView::getLyXFunc() const
|
||||||
{
|
{
|
||||||
return lyxfunc;
|
return lyxfunc;
|
||||||
|
@ -82,6 +82,9 @@ public:
|
|||||||
/// sets the layout in the toolbar layout combox
|
/// sets the layout in the toolbar layout combox
|
||||||
void setLayout(int layout);
|
void setLayout(int layout);
|
||||||
|
|
||||||
|
/// update the toolbar
|
||||||
|
void updateToolbar();
|
||||||
|
|
||||||
/// return a pointer to the lyxfunc
|
/// return a pointer to the lyxfunc
|
||||||
LyXFunc * getLyXFunc() const;
|
LyXFunc * getLyXFunc() const;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include "support/LAssert.h"
|
||||||
#include "MenuBackend.h"
|
#include "MenuBackend.h"
|
||||||
#include "lyxlex.h"
|
#include "lyxlex.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
@ -27,8 +28,9 @@ using std::endl;
|
|||||||
MenuBackend menubackend;
|
MenuBackend menubackend;
|
||||||
|
|
||||||
|
|
||||||
MenuItem::MenuItem(Kind kind, string const & label, string const & command)
|
MenuItem::MenuItem(Kind kind, string const & label,
|
||||||
: kind_(kind), label_(label)
|
string const & command, bool optional)
|
||||||
|
: kind_(kind), label_(label), optional_(optional)
|
||||||
{
|
{
|
||||||
switch(kind) {
|
switch(kind) {
|
||||||
case Separator:
|
case Separator:
|
||||||
@ -42,6 +44,9 @@ MenuItem::MenuItem(Kind kind, string const & label, string const & command)
|
|||||||
lyxerr << "MenuItem(): LyX command `"
|
lyxerr << "MenuItem(): LyX command `"
|
||||||
<< command << "' does not exist." << endl;
|
<< command << "' does not exist." << endl;
|
||||||
}
|
}
|
||||||
|
if (optional_)
|
||||||
|
lyxerr[Debug::GUI] << "Optional item "
|
||||||
|
<< command << endl;
|
||||||
break;
|
break;
|
||||||
case Submenu:
|
case Submenu:
|
||||||
submenu_ = command;
|
submenu_ = command;
|
||||||
@ -64,6 +69,7 @@ void Menu::read(LyXLex & lex)
|
|||||||
md_documents,
|
md_documents,
|
||||||
md_endmenu,
|
md_endmenu,
|
||||||
md_lastfiles,
|
md_lastfiles,
|
||||||
|
md_optitem,
|
||||||
md_submenu,
|
md_submenu,
|
||||||
md_separator,
|
md_separator,
|
||||||
md_last
|
md_last
|
||||||
@ -74,6 +80,7 @@ void Menu::read(LyXLex & lex)
|
|||||||
{ "end", md_endmenu },
|
{ "end", md_endmenu },
|
||||||
{ "item", md_item },
|
{ "item", md_item },
|
||||||
{ "lastfiles", md_lastfiles },
|
{ "lastfiles", md_lastfiles },
|
||||||
|
{ "optitem", md_optitem },
|
||||||
{ "separator", md_separator },
|
{ "separator", md_separator },
|
||||||
{ "submenu", md_submenu }
|
{ "submenu", md_submenu }
|
||||||
};
|
};
|
||||||
@ -83,15 +90,21 @@ void Menu::read(LyXLex & lex)
|
|||||||
lex.printTable(lyxerr);
|
lex.printTable(lyxerr);
|
||||||
|
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
|
bool optional = false;
|
||||||
|
|
||||||
while (lex.IsOK() && !quit) {
|
while (lex.IsOK() && !quit) {
|
||||||
switch(lex.lex()) {
|
switch(lex.lex()) {
|
||||||
|
case md_optitem:
|
||||||
|
optional = true;
|
||||||
|
// fallback to md_item
|
||||||
case md_item: {
|
case md_item: {
|
||||||
lex.next();
|
lex.next();
|
||||||
string name = lex.GetString();
|
string name = lex.GetString();
|
||||||
lex.next();
|
lex.next();
|
||||||
string command = lex.GetString();
|
string command = lex.GetString();
|
||||||
add(MenuItem(MenuItem::Command, name, command));
|
add(MenuItem(MenuItem::Command, name,
|
||||||
|
command, optional));
|
||||||
|
optional = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case md_separator:
|
case md_separator:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
#include "support/LAssert.h"
|
#include "support/lstrings.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class LyXLex;
|
class LyXLex;
|
||||||
@ -43,16 +43,22 @@ public:
|
|||||||
Documents
|
Documents
|
||||||
};
|
};
|
||||||
/// Create a Command type MenuItem
|
/// Create a Command type MenuItem
|
||||||
MenuItem(Kind kind_, string const & label_ = string(),
|
MenuItem(Kind kind,
|
||||||
string const & command_ = string());
|
string const & label = string(),
|
||||||
|
string const & command = string(),
|
||||||
|
bool optional = false);
|
||||||
/// The label of a given menuitem
|
/// The label of a given menuitem
|
||||||
string const & label() const { return label_; }
|
string label() const { return token(label_, '|', 0); }
|
||||||
|
///
|
||||||
|
string shortcut() const { return token(label_, '|', 1); }
|
||||||
/// The kind of entry
|
/// The kind of entry
|
||||||
Kind kind() const { return kind_; }
|
Kind kind() const { return kind_; }
|
||||||
/// the action (if relevant)
|
/// the action (if relevant)
|
||||||
int action() const { return action_; }
|
int action() const { return action_; }
|
||||||
/// the description of the submenu (if relevant)
|
/// the description of the submenu (if relevant)
|
||||||
string const & submenu() const { return submenu_; }
|
string const & submenu() const { return submenu_; }
|
||||||
|
/// returns true if the entry should be ommited when disabled
|
||||||
|
bool optional() const { return optional_; }
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
Kind kind_;
|
Kind kind_;
|
||||||
@ -62,6 +68,8 @@ private:
|
|||||||
int action_;
|
int action_;
|
||||||
///
|
///
|
||||||
string submenu_;
|
string submenu_;
|
||||||
|
///
|
||||||
|
bool optional_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,9 +122,6 @@ void ToolbarDefaults::read(LyXLex & lex)
|
|||||||
|
|
||||||
while (lex.IsOK() && !quit) {
|
while (lex.IsOK() && !quit) {
|
||||||
|
|
||||||
lyxerr[Debug::GUI] << "Toolbar::read: current lex text: `"
|
|
||||||
<< lex.GetString() << '\'' << endl;
|
|
||||||
|
|
||||||
switch(lex.lex()) {
|
switch(lex.lex()) {
|
||||||
case TO_ADD:
|
case TO_ADD:
|
||||||
if (lex.next()) {
|
if (lex.next()) {
|
||||||
|
@ -140,6 +140,7 @@ enum kb_action {
|
|||||||
LFUN_MATH_SIZE, // Alejandro 150896
|
LFUN_MATH_SIZE, // Alejandro 150896
|
||||||
LFUN_MATH_MACRO, // 120 // ale970510
|
LFUN_MATH_MACRO, // 120 // ale970510
|
||||||
LFUN_MATH_MACROARG, // ale970510
|
LFUN_MATH_MACROARG, // ale970510
|
||||||
|
LFUN_MATH_PANEL,
|
||||||
LFUN_FIGURE,
|
LFUN_FIGURE,
|
||||||
LFUN_TABLE, // schedule for deletion
|
LFUN_TABLE, // schedule for deletion
|
||||||
LFUN_MELT,
|
LFUN_MELT,
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "bufferlist.h"
|
#include "bufferlist.h"
|
||||||
#include "lastfiles.h"
|
#include "lastfiles.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyx_gui_misc.h"
|
|
||||||
#include "MenuBackend.h"
|
#include "MenuBackend.h"
|
||||||
#include "Menubar_pimpl.h"
|
#include "Menubar_pimpl.h"
|
||||||
|
|
||||||
@ -50,11 +49,6 @@ char const * menu_tabstop = "aa";
|
|||||||
char const * default_tabstop = "aaaaaaaa";
|
char const * default_tabstop = "aaaaaaaa";
|
||||||
|
|
||||||
|
|
||||||
//Defined later.
|
|
||||||
extern "C"
|
|
||||||
void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button);
|
|
||||||
|
|
||||||
|
|
||||||
Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
|
Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
|
||||||
: frame_(0), owner_(view), menubackend_(&mb)
|
: frame_(0), owner_(view), menubackend_(&mb)
|
||||||
{
|
{
|
||||||
@ -66,6 +60,18 @@ Menubar::Pimpl::~Pimpl()
|
|||||||
// Should we do something here?
|
// Should we do something here?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is used a few times below.
|
||||||
|
inline
|
||||||
|
int string_width(string const & str)
|
||||||
|
{
|
||||||
|
return fl_get_string_widthTAB(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
|
||||||
|
str.c_str(), str.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
//Defined later, used in set().
|
||||||
|
extern "C"
|
||||||
|
void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button);
|
||||||
|
|
||||||
void Menubar::Pimpl::set(string const & menu_name)
|
void Menubar::Pimpl::set(string const & menu_name)
|
||||||
{
|
{
|
||||||
lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set "
|
lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set "
|
||||||
@ -151,17 +157,14 @@ void Menubar::Pimpl::set(string const & menu_name)
|
|||||||
" only submenus can appear in a menubar";
|
" only submenus can appear in a menubar";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
char const * label = idex(i->label().c_str());
|
string label = i->label();
|
||||||
char const * shortcut = scex(i->label().c_str());
|
string shortcut = i->shortcut();
|
||||||
int width = fl_get_string_width(FL_NORMAL_STYLE,
|
int width = string_width(label);
|
||||||
MENU_LABEL_SIZE,
|
|
||||||
label,
|
|
||||||
strlen(label));
|
|
||||||
obj = fl_add_button(FL_TOUCH_BUTTON,
|
obj = fl_add_button(FL_TOUCH_BUTTON,
|
||||||
air + moffset, yloc,
|
air + moffset, yloc,
|
||||||
width + mbadd,
|
width + mbadd,
|
||||||
mbheight,
|
mbheight,
|
||||||
label);
|
label.c_str());
|
||||||
fl_set_object_boxtype(obj, FL_FLAT_BOX);
|
fl_set_object_boxtype(obj, FL_FLAT_BOX);
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
|
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
|
||||||
fl_set_object_lsize(obj, MENU_LABEL_SIZE);
|
fl_set_object_lsize(obj, MENU_LABEL_SIZE);
|
||||||
@ -170,7 +173,7 @@ void Menubar::Pimpl::set(string const & menu_name)
|
|||||||
fl_set_object_gravity(obj, NorthWestGravity,
|
fl_set_object_gravity(obj, NorthWestGravity,
|
||||||
NorthWestGravity);
|
NorthWestGravity);
|
||||||
moffset += obj->w + air;
|
moffset += obj->w + air;
|
||||||
fl_set_object_shortcut(obj, shortcut, 1);
|
fl_set_object_shortcut(obj, shortcut.c_str(), 1);
|
||||||
fl_set_object_callback(obj, C_Menubar_Pimpl_MenuCallback, 1);
|
fl_set_object_callback(obj, C_Menubar_Pimpl_MenuCallback, 1);
|
||||||
ItemInfo * iteminfo = new ItemInfo(this,
|
ItemInfo * iteminfo = new ItemInfo(this,
|
||||||
new MenuItem(*i), obj);
|
new MenuItem(*i), obj);
|
||||||
@ -276,25 +279,22 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
|
|||||||
|
|
||||||
// Compute the size of the largest label (because xforms is
|
// Compute the size of the largest label (because xforms is
|
||||||
// not able to support shortcuts correctly...)
|
// not able to support shortcuts correctly...)
|
||||||
int max_width = 0, max_tabs = 0;
|
int max_width = 0;
|
||||||
int tab_width = fl_get_string_width(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
|
string widest_label;
|
||||||
menu_tabstop, strlen(menu_tabstop));
|
|
||||||
for (Menu::const_iterator i = md.begin(); i != md.end(); ++i) {
|
for (Menu::const_iterator i = md.begin(); i != md.end(); ++i) {
|
||||||
MenuItem item = (*i);
|
MenuItem item = (*i);
|
||||||
if (item.kind() == MenuItem::Command) {
|
if (item.kind() == MenuItem::Command) {
|
||||||
string label = idex(item.label().c_str());
|
string label = item.label() + '\t';
|
||||||
int width = fl_get_string_width(FL_NORMAL_STYLE,
|
int width = string_width(label);
|
||||||
MENU_LABEL_SIZE,
|
if (width > max_width) {
|
||||||
label.c_str(),
|
|
||||||
label.length());
|
|
||||||
if (width > max_width)
|
|
||||||
max_width = width;
|
max_width = width;
|
||||||
|
widest_label = label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
max_tabs = (max_width + 5)/tab_width + 1;
|
}
|
||||||
lyxerr[Debug::GUI] << "tab_width=" << tab_width
|
lyxerr[Debug::GUI] << "max_width=" << max_width
|
||||||
<< ", max_width=" << max_width
|
<< ", widest_label=`" << widest_label
|
||||||
<< ", max_tabs=" << max_tabs << endl;
|
<< "'" << endl;
|
||||||
|
|
||||||
for (Menu::const_iterator i = md.begin(); i != md.end(); ++i) {
|
for (Menu::const_iterator i = md.begin(); i != md.end(); ++i) {
|
||||||
MenuItem item = (*i);
|
MenuItem item = (*i);
|
||||||
@ -308,30 +308,27 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
|
|||||||
case MenuItem::Command: {
|
case MenuItem::Command: {
|
||||||
LyXFunc::func_status flag =
|
LyXFunc::func_status flag =
|
||||||
view->getLyXFunc()->getStatus(item.action());
|
view->getLyXFunc()->getStatus(item.action());
|
||||||
|
|
||||||
|
// handle optional entries.
|
||||||
|
if (item.optional() && (flag & LyXFunc::Disabled)) {
|
||||||
|
lyxerr[Debug::GUI]
|
||||||
|
<< "Skipping optional item "
|
||||||
|
<< item.label() << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the keys bound to this action, but keep only the
|
// Get the keys bound to this action, but keep only the
|
||||||
// first one later
|
// first one later
|
||||||
string accel = toplevel_keymap->findbinding(item.action());
|
string accel = toplevel_keymap->findbinding(item.action());
|
||||||
lyxerr[Debug::GUI] << "Command: "
|
|
||||||
<< lyxaction.getActionName(item.action())
|
|
||||||
<< " Binding " << accel << endl;
|
|
||||||
|
|
||||||
// Build the menu label from all the info
|
// Build the menu label from all the info
|
||||||
string label = idex(item.label().c_str());
|
string label = item.label();
|
||||||
|
|
||||||
if (!accel.empty()) {
|
if (!accel.empty()) {
|
||||||
// Try to be clever and add enough
|
// Try to be clever and add just enough
|
||||||
// tabs to align shortcuts.
|
// tabs to align shortcuts.
|
||||||
int width =
|
do
|
||||||
fl_get_string_width(FL_NORMAL_STYLE,
|
label += '\t';
|
||||||
MENU_LABEL_SIZE,
|
while (string_width(label) < max_width);
|
||||||
label.c_str(),
|
|
||||||
label.length());
|
|
||||||
int nb = max_tabs - width/tab_width;
|
|
||||||
lyxerr[Debug::GUI] << "label=" << label
|
|
||||||
<< ", tabs=" << nb
|
|
||||||
<< endl;
|
|
||||||
if (nb > 0)
|
|
||||||
label += string(nb, '\t');
|
|
||||||
label += accel.substr(1,accel.find(']') - 1);
|
label += accel.substr(1,accel.find(']') - 1);
|
||||||
}
|
}
|
||||||
label += "%x" + tostr(item.action()) + extra_label;
|
label += "%x" + tostr(item.action()) + extra_label;
|
||||||
@ -347,10 +344,9 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
|
|||||||
label += pupmode;
|
label += pupmode;
|
||||||
|
|
||||||
// Finally the menu shortcut
|
// Finally the menu shortcut
|
||||||
string shortcut = scex(item.label().c_str());
|
string shortcut = item.shortcut();
|
||||||
|
|
||||||
if (!shortcut.empty()) {
|
|
||||||
string xfshortcut;
|
string xfshortcut;
|
||||||
|
if (!shortcut.empty()) {
|
||||||
xfshortcut += uppercase(shortcut[0]);
|
xfshortcut += uppercase(shortcut[0]);
|
||||||
xfshortcut += '#';
|
xfshortcut += '#';
|
||||||
xfshortcut += uppercase(shortcut[0]);
|
xfshortcut += uppercase(shortcut[0]);
|
||||||
@ -365,6 +361,13 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
|
|||||||
} else
|
} else
|
||||||
fl_addtopup(menu, strpool.add(label));
|
fl_addtopup(menu, strpool.add(label));
|
||||||
|
|
||||||
|
lyxerr[Debug::GUI] << "Command: \""
|
||||||
|
<< lyxaction.getActionName(item.action())
|
||||||
|
<< "\", Binding " << accel
|
||||||
|
<< ", shortcut " << xfshortcut
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,9 +377,9 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
|
|||||||
smn, strpool);
|
smn, strpool);
|
||||||
if (submenu == -1)
|
if (submenu == -1)
|
||||||
return -1;
|
return -1;
|
||||||
string label = idex(item.label().c_str());
|
string label = item.label();
|
||||||
label += extra_label + "%m";
|
label += extra_label + "%m";
|
||||||
string shortcut = scex(item.label().c_str());
|
string shortcut = item.shortcut();
|
||||||
int n = fl_addtopup(menu, strpool.add(label), submenu);
|
int n = fl_addtopup(menu, strpool.add(label), submenu);
|
||||||
fl_setpup_shortcut(menu, n, strpool.add(shortcut));
|
fl_setpup_shortcut(menu, n, strpool.add(shortcut));
|
||||||
break;
|
break;
|
||||||
|
@ -238,7 +238,8 @@ void ToolbarCB(FL_OBJECT * ob, long ac)
|
|||||||
|
|
||||||
string res = owner->getLyXFunc()->Dispatch(int(ac));
|
string res = owner->getLyXFunc()->Dispatch(int(ac));
|
||||||
if(!res.empty())
|
if(!res.empty())
|
||||||
lyxerr[Debug::GUI] << res << endl;
|
lyxerr[Debug::GUI] << "ToolbarCB: Function returned: "
|
||||||
|
<< res << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,7 +201,8 @@ static string unique_id() {
|
|||||||
ost << "file" << ++seed << '\0';
|
ost << "file" << ++seed << '\0';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ost.str();
|
// Needed if we use lyxstring.
|
||||||
|
return ost.str().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -918,7 +918,7 @@ InsetText::LocalDispatch(BufferView * bv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
std::istringstream istr(arg);
|
std::istringstream istr(arg.c_str());
|
||||||
#else
|
#else
|
||||||
istrstream istr(arg.c_str());
|
istrstream istr(arg.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,6 +123,7 @@ extern void MenuSendto();
|
|||||||
extern void QuitLyX();
|
extern void QuitLyX();
|
||||||
extern void MenuFax(Buffer *);
|
extern void MenuFax(Buffer *);
|
||||||
extern void MenuExport(Buffer *, string const &);
|
extern void MenuExport(Buffer *, string const &);
|
||||||
|
extern void show_symbols_form(LyXFunc *);
|
||||||
|
|
||||||
extern LyXAction lyxaction;
|
extern LyXAction lyxaction;
|
||||||
// (alkis)
|
// (alkis)
|
||||||
@ -380,20 +381,31 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
|
|||||||
disable = noLaTeX || lyxrc.fax_command == "none";
|
disable = noLaTeX || lyxrc.fax_command == "none";
|
||||||
break;
|
break;
|
||||||
case LFUN_IMPORT:
|
case LFUN_IMPORT:
|
||||||
if (argument == "latex")
|
if (argument == "latex" || argument == "noweb")
|
||||||
disable = lyxrc.relyx_command == "none";
|
disable = lyxrc.relyx_command == "none";
|
||||||
if (argument == "linuxdoc")
|
else if (argument == "linuxdoc")
|
||||||
disable = lyxrc.linuxdoc_to_lyx_command == "none";
|
disable = lyxrc.linuxdoc_to_lyx_command == "none";
|
||||||
break;
|
break;
|
||||||
case LFUN_EXPORT:
|
case LFUN_EXPORT:
|
||||||
if (argument == "dvi" || argument == "postscript")
|
if (argument == "latex")
|
||||||
|
disable = ! buf->isLatex();
|
||||||
|
else if (argument == "linuxdoc")
|
||||||
|
disable = ! buf->isLinuxDoc();
|
||||||
|
else if (argument == "docbook")
|
||||||
|
disable = ! buf->isDocBook();
|
||||||
|
else if (argument == "dvi" || argument == "postscript")
|
||||||
disable = noLaTeX;
|
disable = noLaTeX;
|
||||||
if (argument == "html")
|
else if (argument == "html")
|
||||||
disable = lyxrc.html_command == "none";
|
disable = (! buf->isLatex()
|
||||||
if (argument == "html-linuxdoc")
|
|| lyxrc.html_command == "none");
|
||||||
disable = lyxrc.linuxdoc_to_html_command == "none";
|
else if (argument == "html-linuxdoc")
|
||||||
if (argument == "html-docbook")
|
disable = (! buf->isLinuxDoc()
|
||||||
disable = lyxrc.docbook_to_html_command == "none";
|
|| lyxrc.linuxdoc_to_html_command == "none");
|
||||||
|
else if (argument == "html-docbook")
|
||||||
|
disable = (! buf->isDocBook()
|
||||||
|
|| lyxrc.docbook_to_html_command == "none");
|
||||||
|
else if (argument == "custom")
|
||||||
|
disable == ! buf->isLatex();
|
||||||
break;
|
break;
|
||||||
case LFUN_UNDO:
|
case LFUN_UNDO:
|
||||||
disable = buf->undostack.empty();
|
disable = buf->undostack.empty();
|
||||||
@ -407,6 +419,9 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
|
|||||||
case LFUN_RUNCHKTEX:
|
case LFUN_RUNCHKTEX:
|
||||||
disable = lyxrc.chktex_command == "none";
|
disable = lyxrc.chktex_command == "none";
|
||||||
break;
|
break;
|
||||||
|
case LFUN_BUILDPROG:
|
||||||
|
disable = (lyxrc.literate_command == "none"
|
||||||
|
|| ! buf->isLiterate());
|
||||||
#ifndef NEW_TABULAR
|
#ifndef NEW_TABULAR
|
||||||
case LFUN_LAYOUT_TABLE:
|
case LFUN_LAYOUT_TABLE:
|
||||||
disable = ! owner->view()->text->cursor.par()->table;
|
disable = ! owner->view()->text->cursor.par()->table;
|
||||||
@ -2448,7 +2463,6 @@ string LyXFunc::Dispatch(int ac,
|
|||||||
|
|
||||||
case LFUN_MATH_MODE: // Open or create a math inset
|
case LFUN_MATH_MODE: // Open or create a math inset
|
||||||
{
|
{
|
||||||
|
|
||||||
if (owner->view()->available())
|
if (owner->view()->available())
|
||||||
owner->view()->open_new_inset(new InsetFormula);
|
owner->view()->open_new_inset(new InsetFormula);
|
||||||
setMessage(N_("Math editor mode"));
|
setMessage(N_("Math editor mode"));
|
||||||
@ -2459,6 +2473,13 @@ string LyXFunc::Dispatch(int ac,
|
|||||||
case LFUN_MATH_LIMITS:
|
case LFUN_MATH_LIMITS:
|
||||||
{
|
{
|
||||||
setErrorMessage(N_("This is only allowed in math mode!"));
|
setErrorMessage(N_("This is only allowed in math mode!"));
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LFUN_MATH_PANEL:
|
||||||
|
{
|
||||||
|
show_symbols_form(this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ extern BufferList bufferlist;
|
|||||||
|
|
||||||
extern void MenuLayoutSave();
|
extern void MenuLayoutSave();
|
||||||
extern void ShowCredits();
|
extern void ShowCredits();
|
||||||
extern void show_symbols_form(LyXFunc *);
|
|
||||||
|
|
||||||
// A bunch of wrappers
|
// A bunch of wrappers
|
||||||
|
|
||||||
@ -1997,7 +1996,7 @@ void Menus::ShowMathMenu(FL_OBJECT * ob, long)
|
|||||||
tmpfunc->Dispatch(LFUN_MATH_DISPLAY);
|
tmpfunc->Dispatch(LFUN_MATH_DISPLAY);
|
||||||
break;
|
break;
|
||||||
case 9: /* Panel */
|
case 9: /* Panel */
|
||||||
show_symbols_form(tmpfunc);
|
tmpfunc->Dispatch(LFUN_MATH_PANEL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
men->currentView()->update(BufferView::SELECT|BufferView::FITCUR);
|
men->currentView()->update(BufferView::SELECT|BufferView::FITCUR);
|
||||||
|
@ -735,7 +735,7 @@ string GetFileContents(string const & fname) {
|
|||||||
ofs << ifs.rdbuf();
|
ofs << ifs.rdbuf();
|
||||||
ifs.close();
|
ifs.close();
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
return ofs.str();
|
return ofs.str().c_str();
|
||||||
#else
|
#else
|
||||||
ofs << '\0';
|
ofs << '\0';
|
||||||
char const * tmp = ofs.str();
|
char const * tmp = ofs.str();
|
||||||
|
Loading…
Reference in New Issue
Block a user