Mercurial > octave-nkf
changeset 16522:bfff338c56d1
set default terminal font for the GUI from the configure script
* configure.ac (DEFAULT_TERMINAL_FONT, DEFAULT_TERMINAL_FONT_SIZE):
New variables. Set depending on system type.
* common.mk: Substitute them here.
(do_subst_qt_settings): New macro.
* libgui/default-qt-settings.in: Rename from default-qt-settings.
Substitute terminal font and size.
* libgui/Makefile.am (EXTRA_DIST): Distribute default-qt-settings.in
instead of default-qt-settings.
(default-qt-settings): New rule.
* run-octave.in (OCTAVE_DEFAULT_QT_SETTINGS): Look in build directory
for default-qt-settings file.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 16 Apr 2013 13:10:29 -0400 |
parents | dbc7018be4be |
children | 62d8aaf6ba8f |
files | build-aux/common.mk configure.ac libgui/Makefile.am libgui/default-qt-settings libgui/default-qt-settings.in run-octave.in |
diffstat | 6 files changed, 99 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/build-aux/common.mk Tue Apr 16 01:49:20 2013 -0400 +++ b/build-aux/common.mk Tue Apr 16 13:10:29 2013 -0400 @@ -67,6 +67,9 @@ DEFAULT_PAGER = @DEFAULT_PAGER@ +DEFAULT_TERMINAL_FONT = @DEFAULT_TERMINAL_FONT@ +DEFAULT_TERMINAL_FONT_SIZE = @DEFAULT_TERMINAL_FONT_SIZE@ + ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@ SHLEXT = @SHLEXT@ @@ -702,6 +705,14 @@ $(simple_move_if_change_rule) endef +define do_subst_qt_settings +echo "making $@ from $<" +$(SED) < $< \ + -e "s|%DEFAULT_TERMINAL_FONT%|${DEFAULT_TERMINAL_FONT}|" \ + -e "s|%DEFAULT_TERMINAL_FONT_SIZE%|${DEFAULT_TERMINAL_FONT_SIZE}|" > $@-t +$(simple_move_if_change_rule) +endef + define test-file-commands ( echo "## DO NOT EDIT! Generated automatically from $(<F) by Make."; $(GREP) '^%!' $< ) > $@-t mv $@-t $@
--- a/configure.ac Tue Apr 16 01:49:20 2013 -0400 +++ b/configure.ac Tue Apr 16 13:10:29 2013 -0400 @@ -130,6 +130,19 @@ OCTAVE_PROG_PAGER OCTAVE_PROG_PYTHON +### Default terminal font for the GUI +case $host_os in + mingw* | msdosmsvc) + DEFAULT_TERMINAL_FONT="Lucida Console" + ;; + *) + DEFAULT_TERMINAL_FONT="Courier" + ;; +esac +DEFAULT_TERMINAL_FONT_SIZE=10 +AC_SUBST(DEFAULT_TERMINAL_FONT) +AC_SUBST(DEFAULT_TERMINAL_FONT_SIZE) + ### Path separator. sepchar=':'
--- a/libgui/Makefile.am Tue Apr 16 01:49:20 2013 -0400 +++ b/libgui/Makefile.am Tue Apr 16 13:10:29 2013 -0400 @@ -38,7 +38,7 @@ LOCALES = $(patsubst languages/%.ts, languages/%.qm, $(TRANSLATIONS)) -EXTRA_DIST = default-qt-settings $(TRANSLATIONS) +EXTRA_DIST = default-qt-settings.in $(TRANSLATIONS) CLEANFILES = BUILT_SOURCES = @@ -83,6 +83,9 @@ octlocale_DATA = $(LOCALES) +default-qt-settings: default-qt-settings.in + $(do_subst_qt_settings) + moc-%.cc: %.h $(MOC) -o$@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $<
--- a/libgui/default-qt-settings Tue Apr 16 01:49:20 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -[General] -connectOnStartup=true -showMessageOfTheDay=true -showTopic=true -autoIdentification=false -useCustomFileEditor=false -customFileEditor=emacs -useProxyServer=false -proxyType= -proxyHostName=none -proxyPort=8080 -proxyUserName= -proxyPassword= - -[editor] -showLineNumbers=true -highlightCurrentLine=true -codeCompletion=true -longWindowTitle=false -restoreSession=false -savedSessionTabs=@Invalid() - -[terminal] -fontSize=10 -fontName=Courier -cursorBlinking=true -cursorType=ibeam - -[MainWindow] -geometry=@ByteArray(\x1\xd9\xd0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xff\0\0\0\xac\0\xff\xff\xff\0\0\0\0\0\0\x2x\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\xff\xff\xff\xff\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) -current_directory_list=@Invalid() - -[DockWidgets] -TerminalDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\xee\0\0\0(\0\0\x3\x45\0\0\x2\x83\0\0\0\xee\0\0\0(\0\0\x3\x45\0\0\x2\x83\0\0\0\0\0\0) -TerminalDockWidgetFloating=false -TerminalDockWidgetVisible=true -WorkspaceView=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\xf7\0\0\0\xe7\0\0\x1\xcd\0\0\0\0\0\0\0\xf7\0\0\0\xe7\0\0\x1\xcd\0\0\0\0\0\0) -WorkspaceViewFloating=false -WorkspaceViewVisible=true -HistoryDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\x1\xd4\0\0\0\xe7\0\0\x2\x9f\0\0\0\0\0\0\x1\xd4\0\0\0\xe7\0\0\x2\x9f\0\0\0\0\0\0) -HistoryDockWidgetFloating=false -HistoryDockWidgetVisible=true -FilesDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0(\0\0\0\xe7\0\0\0\xf0\0\0\0\0\0\0\0(\0\0\0\xe7\0\0\0\xf0\0\0\0\0\0\0) -FilesDockWidgetFloating=false -FilesDockWidgetVisible=true -DocumentationDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0) -DocumentationDockWidgetFloating=false -DocumentationDockWidgetVisible=true -FileEditor=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0) -FileEditorFloating=false -FileEditorVisible=true - -[workspaceview] -local_collapsed=false -global_collapsed=false -persistent_collapsed=false -column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\x90\0\0\0\x4\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x1\0\0\x1\x90\0\0\0\x4\0\0\0\0) - -[filesdockwidget] -sort_files_by_column=0 -sort_files_by_order=0 -column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x4\xe\0\0\0\x3\0\0\0\x3\0\0\0\x64\0\0\0\x2\0\0\0\x64\0\0\0\x1\0\0\0\x64\0\0\0\xd4\0\0\0\x4\x1\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x2\0\0\0\xd4\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\0) -showFilenames=true -showFileSize=false -showFileType=false -showLastModified=false -showHiddenFiles=false -sync_octave_directory=true -useAlternatingRowColors=true
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libgui/default-qt-settings.in Tue Apr 16 13:10:29 2013 -0400 @@ -0,0 +1,70 @@ +[General] +connectOnStartup=true +showMessageOfTheDay=true +showTopic=true +autoIdentification=false +useCustomFileEditor=false +customFileEditor=emacs +useProxyServer=false +proxyType= +proxyHostName=none +proxyPort=8080 +proxyUserName= +proxyPassword= + +[editor] +showLineNumbers=true +highlightCurrentLine=true +codeCompletion=true +longWindowTitle=false +restoreSession=false +savedSessionTabs=@Invalid() + +[terminal] +fontSize=%DEFAULT_TERMINAL_FONT_SIZE% +fontName=%DEFAULT_TERMINAL_FONT% +cursorBlinking=true +cursorType=ibeam + +[MainWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\x18\0\0\x3G\0\0\x2\xe9\0\0\0\x1\0\0\0\x33\0\0\x3\x46\0\0\x2\xe8\0\0\0\0\0\0) +windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x1\0\0\x3\x46\0\0\x2x\xfc\x2\0\0\0\x1\xfc\0\0\0(\0\0\x2x\0\0\x1\xc5\0\xff\xff\xff\xfc\x1\0\0\0\x2\xfc\0\0\0\0\0\0\0\xe8\0\0\0R\0\xff\xff\xff\xfc\x2\0\0\0\x3\xfb\0\0\0\x1e\0\x46\0i\0l\0\x65\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0(\0\0\0\xc9\0\0\0\x8d\0\xff\xff\xff\xfb\0\0\0\x1a\0W\0o\0r\0k\0s\0p\0\x61\0\x63\0\x65\0V\0i\0\x65\0w\x1\0\0\0\xf7\0\0\0\xd7\0\0\0k\0\xff\xff\xff\xfb\0\0\0\"\0H\0i\0s\0t\0o\0r\0y\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\x1\xd4\0\0\0\xcc\0\0\0\x8a\0\xff\xff\xff\xfc\0\0\0\xee\0\0\x2X\0\0\x2X\0\xff\xff\xff\xfa\0\0\0\0\x2\0\0\0\x3\xfb\0\0\0$\0T\0\x65\0r\0m\0i\0n\0\x61\0l\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\x1\xa9\0\xff\xff\xff\xfb\0\0\0\x14\0\x46\0i\0l\0\x65\0\x45\0\x64\0i\0t\0o\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0h\0\xff\xff\xff\xfb\0\0\0.\0\x44\0o\0\x63\0u\0m\0\x65\0n\0t\0\x61\0t\0i\0o\0n\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\xac\0\xff\xff\xff\0\0\0\0\0\0\x2x\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\xff\xff\xff\xff\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) +current_directory_list=@Invalid() + +[DockWidgets] +TerminalDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\xee\0\0\0(\0\0\x3\x45\0\0\x2\x83\0\0\0\xee\0\0\0(\0\0\x3\x45\0\0\x2\x83\0\0\0\0\0\0) +TerminalDockWidgetFloating=false +TerminalDockWidgetVisible=true +WorkspaceView=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\xf7\0\0\0\xe7\0\0\x1\xcd\0\0\0\0\0\0\0\xf7\0\0\0\xe7\0\0\x1\xcd\0\0\0\0\0\0) +WorkspaceViewFloating=false +WorkspaceViewVisible=true +HistoryDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\x1\xd4\0\0\0\xe7\0\0\x2\x9f\0\0\0\0\0\0\x1\xd4\0\0\0\xe7\0\0\x2\x9f\0\0\0\0\0\0) +HistoryDockWidgetFloating=false +HistoryDockWidgetVisible=true +FilesDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0(\0\0\0\xe7\0\0\0\xf0\0\0\0\0\0\0\0(\0\0\0\xe7\0\0\0\xf0\0\0\0\0\0\0) +FilesDockWidgetFloating=false +FilesDockWidgetVisible=true +DocumentationDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0) +DocumentationDockWidgetFloating=false +DocumentationDockWidgetVisible=true +FileEditor=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb3\xff\xff\xfb\xb1\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0) +FileEditorFloating=false +FileEditorVisible=true + +[workspaceview] +local_collapsed=false +global_collapsed=false +persistent_collapsed=false +column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\x90\0\0\0\x4\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x1\0\0\x1\x90\0\0\0\x4\0\0\0\0) + +[filesdockwidget] +sort_files_by_column=0 +sort_files_by_order=0 +column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x4\xe\0\0\0\x3\0\0\0\x3\0\0\0\x64\0\0\0\x2\0\0\0\x64\0\0\0\x1\0\0\0\x64\0\0\0\xd4\0\0\0\x4\x1\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x2\0\0\0\xd4\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\0) +showFilenames=true +showFileSize=false +showFileType=false +showLastModified=false +showHiddenFiles=false +sync_octave_directory=true +useAlternatingRowColors=true
--- a/run-octave.in Tue Apr 16 01:49:20 2013 -0400 +++ b/run-octave.in Tue Apr 16 13:10:29 2013 -0400 @@ -79,7 +79,7 @@ fi OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \ -OCTAVE_DEFAULT_QT_SETTINGS="$top_srcdir/libgui/default-qt-settings" \ +OCTAVE_DEFAULT_QT_SETTINGS="$builddir/libgui/default-qt-settings" \ OCTAVE_LOCALE_DIR="$top_srcdir/libgui/languages" \ OCTAVE_JAVA_DIR="$builddir/scripts/java" \ exec $builddir/libtool --mode=execute $driver \