The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 610145bb5a83991486ec26af73e436b8829eb566
Author: Tommaso Cucinotta <[email protected]>
Date:   Wed Dec 12 19:21:36 2012 +0000

    Fixed wmctrl invocation copying keytest.pl behavior.

diff --git a/development/autotests/single-test.sh 
b/development/autotests/single-test.sh
index d5bdd87..72b8eeb 100755
--- a/development/autotests/single-test.sh
+++ b/development/autotests/single-test.sh
@@ -18,7 +18,7 @@ fi
 export MAX_DROP=0
 if [ "$(pidof lyx)" != "" ]; then
     export LYX_PID=$(pidof lyx)
-    export LYX_WINDOW_NAME=$(wmctrl -l | grep " $LYX_PID " | cut -d ' ' -f 1);
+    export LYX_WINDOW_NAME=$(wmctrl -l -p | grep " $LYX_PID " | cut -d ' ' -f 
1);
 fi
 export MAX_LOOPS=1
 export LYX_EXE=${LYX_EXE:-../../src/lyx}

commit 4285b0b31698cb83c3a525d1cf6b54c5d4654142
Author: Tommaso Cucinotta <[email protected]>
Date:   Mon Dec 10 23:22:10 2012 +0000

    While exporting from the command-line, theApp() doesn't exist.
    It was only needed for getting hex names of colors. So, get them
    directly from a ColorCache object with default mapping.

diff --git a/src/Makefile.am b/src/Makefile.am
index d3c52f5..e2298f9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@ include $(top_srcdir)/config/common.am
 DISTCLEANFILES += libintl.h
 
 AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) 
$(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS)
-AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
+AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_INCLUDES)
 
 if BUILD_CLIENT_SUBDIR
 CLIENT = client
diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index 6185681..ce273aa 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -27,6 +27,7 @@
 #include "TexRow.h"
 
 #include "frontends/Application.h" // hexName
+#include "frontends/qt4/ColorCache.h"
 
 #include "insets/Inset.h"
 
@@ -36,6 +37,7 @@
 #include "support/filetools.h"
 #include "support/ForkedCalls.h"
 #include "support/lstrings.h"
+#include "support/qstring_helpers.h"
 
 #include "support/bind.h"
 
@@ -587,16 +589,26 @@ void PreviewLoader::Impl::startLoading(bool wait)
        // FIXME XHTML 
        // The colors should be customizable.
        ColorCode const bg = buffer_.isExporting() 
-                      ? Color_white : PreviewLoader::backgroundColor();
+               ? Color_white : PreviewLoader::backgroundColor();
        ColorCode const fg = buffer_.isExporting() 
-                      ? Color_black : PreviewLoader::foregroundColor();
+               ? Color_black : PreviewLoader::foregroundColor();
+       std::string bg_name, fg_name;
+       if (theApp()) {
+               fg_name = theApp()->hexName(fg);
+               bg_name = theApp()->hexName(bg);
+       } else {
+               ColorCache cc;
+               fg_name = ltrim(fromqstr(cc.get(fg).name()), "#");
+               bg_name = ltrim(fromqstr(cc.get(bg).name()), "#");
+       }
+
        // The conversion command.
        ostringstream cs;
        cs << pconverter_->command
           << " " << quoteName(latexfile.toFilesystemEncoding())
           << " --dpi " << int(font_scaling_factor)
-          << " --fg " << theApp()->hexName(fg)
-          << " --bg " << theApp()->hexName(bg);
+          << " --fg " << fg_name
+          << " --bg " << bg_name;
        // FIXME what about LuaTeX?
        if (buffer_.params().useNonTeXFonts)
                cs << " --latex=xelatex";

-----------------------------------------------------------------------

Summary of changes:
 development/autotests/single-test.sh |    2 +-
 src/Makefile.am                      |    2 +-
 src/graphics/PreviewLoader.cpp       |   20 ++++++++++++++++----
 3 files changed, 18 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to