X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2Fxpdf.cc;h=73a0fe2a4660fda1da9f83c2221f4e9f95d6430a;hb=884f739665dc56e66f51e104350f2affd33f2dd8;hp=ef47fb6e5dd067c5140d089158801b7edd56be4b;hpb=64676031423465996e83c4a685290f0c3d97a249;p=evince.git diff --git a/pdf/xpdf/xpdf.cc b/pdf/xpdf/xpdf.cc index ef47fb6e..73a0fe2a 100644 --- a/pdf/xpdf/xpdf.cc +++ b/pdf/xpdf/xpdf.cc @@ -2,7 +2,7 @@ // // xpdf.cc // -// Copyright 1996-2002 Glyph & Cog, LLC +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== @@ -34,6 +34,7 @@ static char ownerPassword[33] = ""; static char userPassword[33] = ""; static GBool fullScreen = gFalse; static char remoteName[100] = "xpdf_"; +static GBool doRemoteReload = gFalse; static GBool doRemoteRaise = gFalse; static GBool doRemoteQuit = gFalse; static GBool printCommands = gFalse; @@ -70,7 +71,7 @@ static ArgDesc argDesc[] = { {"-ps", argString, psFileArg, sizeof(psFileArg), "default PostScript file name or command"}, {"-paper", argString, paperSize, sizeof(paperSize), - "paper size (letter, legal, A4, A3)"}, + "paper size (letter, legal, A4, A3, match)"}, {"-paperw", argInt, &paperWidth, 0, "paper width, in points"}, {"-paperh", argInt, &paperHeight, 0, @@ -89,6 +90,8 @@ static ArgDesc argDesc[] = { "run in full-screen (presentation) mode"}, {"-remote", argString, remoteName + 5, sizeof(remoteName) - 5, "start/contact xpdf remote server with specified name"}, + {"-reload", argFlag, &doRemoteReload, 0, + "reload xpdf remove server window (with -remote only)"}, {"-raise", argFlag, &doRemoteRaise, 0, "raise xpdf remote server window (with -remote only)"}, {"-quit", argFlag, &doRemoteQuit, 0, @@ -184,12 +187,15 @@ int main(int argc, char *argv[]) { } // check command line + ok = ok && argc >= 1 && argc <= 3; + if (doRemoteReload) { + ok = ok && remoteName[5] && !doRemoteQuit && argc == 1; + } if (doRemoteRaise) { - ok = ok && remoteName[5] && !doRemoteQuit && argc >= 1 && argc <= 3; - } else if (doRemoteQuit) { + ok = ok && remoteName[5] && !doRemoteQuit; + } + if (doRemoteQuit) { ok = ok && remoteName[5] && argc == 1; - } else { - ok = ok && argc >= 1 && argc <= 3; } if (!ok || printVersion || printHelp) { fprintf(stderr, "xpdf version %s\n", xpdfVersion); @@ -225,6 +231,8 @@ int main(int argc, char *argv[]) { } else { app->remoteOpen(fileName, pg, doRemoteRaise); } + } else if (doRemoteReload) { + app->remoteReload(doRemoteRaise); } else if (doRemoteRaise) { app->remoteRaise(); } else if (doRemoteQuit) {