X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FXPDFApp.cc;h=d93f2a0490c2898731f80bd174be099d368518ec;hb=884f739665dc56e66f51e104350f2affd33f2dd8;hp=e456310b6ad30c20b844ea4730419d4e83947286;hpb=6112dfe4b45b0305c7a6f61bd8a847f69f892cbb;p=evince.git diff --git a/pdf/xpdf/XPDFApp.cc b/pdf/xpdf/XPDFApp.cc index e456310b..d93f2a04 100644 --- a/pdf/xpdf/XPDFApp.cc +++ b/pdf/xpdf/XPDFApp.cc @@ -2,7 +2,7 @@ // // XPDFApp.cc // -// Copyright 2002 Glyph & Cog, LLC +// Copyright 2002-2003 Glyph & Cog, LLC // //======================================================================== @@ -270,7 +270,11 @@ void XPDFApp::quit() { while (viewers->getLength() > 0) { delete (XPDFViewer *)viewers->del(0); } +#if HAVE_XTAPPSETEXITFLAG + exit(0); +#else XtAppSetExitFlag(appContext); +#endif } void XPDFApp::run() { @@ -306,6 +310,12 @@ void XPDFApp::remoteOpenAtDest(GString *fileName, GString *dest, GBool raise) { XFlush(display); } +void XPDFApp::remoteReload(GBool raise) { + XChangeProperty(display, remoteXWin, remoteAtom, remoteAtom, 8, + PropModeReplace, raise ? (Guchar *)"L" : (Guchar *)"l", 2); + XFlush(display); +} + void XPDFApp::remoteRaise() { XChangeProperty(display, remoteXWin, remoteAtom, remoteAtom, 8, PropModeReplace, (Guchar *)"r", 2); @@ -348,12 +358,6 @@ void XPDFApp::remoteMsgCbk(Widget widget, XtPointer ptr, return; } - // raise window - if (cmd[0] == 'D' || cmd[0] == 'r'){ - XMapRaised(app->display, XtWindow(app->remoteWin)); - XFlush(app->display); - } - // display file / page if (cmd[0] == 'd' || cmd[0] == 'D') { p = cmd + 2; @@ -379,8 +383,18 @@ void XPDFApp::remoteMsgCbk(Widget widget, XtPointer ptr, delete destName; } + // reload + } else if (cmd[0] == 'l' || cmd[0] == 'L') { + app->remoteViewer->reloadFile(); + // quit } else if (cmd[0] == 'q') { app->quit(); } + + // raise window + if (cmd[0] == 'D' || cmd[0] == 'L' || cmd[0] == 'r'){ + XMapRaised(app->display, XtWindow(app->remoteWin)); + XFlush(app->display); + } }