[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/kviewshell
From:       Wilfried Huss <Wilfried.Huss () gmx ! at>
Date:       2006-08-27 15:39:01
Message-ID: 1156693141.796684.15136.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 577808 by whuss:

port of commit 577806:

Move "tips of the day" into the main program.

 M  +0 -1      plugins/dvi/CMakeLists.txt  
 M  +0 -18     plugins/dvi/kdvi_multipage.cpp  
 M  +0 -3      plugins/dvi/kdvi_multipage.h  
 M  +0 -3      plugins/dvi/kdvi_part.rc  
 D             plugins/dvi/tips  
 M  +1 -1      plugins/pdf/pdfRenderer.cpp  
 M  +1 -1      shell/CMakeLists.txt  
 M  +14 -0     shell/kviewshell.cpp  
 M  +2 -0      shell/kviewshell.h  
 M  +1 -0      shell/kviewshell.rc  


--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/CMakeLists.txt #577807:577808
@@ -69,7 +69,6 @@
 
 install( FILES kdvi_part.rc  DESTINATION  ${DATA_INSTALL_DIR} )
 install( FILES kdvi.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
-install( FILES tips  DESTINATION  ${DATA_INSTALL_DIR}/kdvi )
 install( FILES kdvimultipage.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
 
 
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/kdvi_multipage.cpp #577807:577808
@@ -23,7 +23,6 @@
 #include <kmessagebox.h>
 #include <kparts/genericfactory.h>
 #include <kstdaction.h>
-#include <ktip.h>
 
 #include <QLabel>
 #include <QTemporaryFile>
@@ -67,13 +66,9 @@
   exportPDFAction = new KAction(i18n("PDF..."), actionCollection(), "export_pdf");
   connect(exportPDFAction, SIGNAL(triggered(bool) ), &DVIRenderer, SLOT(exportPDF()));
 
-  KStdAction::tipOfDay(this, SLOT(showTip()), actionCollection(), "help_tipofday");
-
   setXMLFile("kdvi_part.rc");
 
   enableActions(false);
-  // Show tip of the day, when the first main window is shown.
-  QTimer::singleShot(0,this,SLOT(showTipOnStart()));
 }
 
 
@@ -383,22 +378,9 @@
 {
   KMessageBox::information (parentWdg, i18n("All messages and warnings will now be shown."));
   KMessageBox::enableAllMessages();
-  KTipDialog::setShowOnStart(true);
 }
 
 
-void KDVIMultiPage::showTip()
-{
-  KTipDialog::showTip(parentWdg, "kdvi/tips", true);
-}
-
-
-void KDVIMultiPage::showTipOnStart()
-{
-  KTipDialog::showTip(parentWdg, "kdvi/tips");
-}
-
-
 DocumentWidget* KDVIMultiPage::createDocumentWidget(PageView *parent, DocumentPageCache *cache)
 {
   DVIWidget* documentWidget = new DVIWidget(parent, cache);
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/kdvi_multipage.h #577807:577808
@@ -66,9 +66,6 @@
   void doExportText();
   void doEnableWarnings();
 
-  void showTip();
-  void showTipOnStart();
-
 private:
   // Points to the same object as renderer to avoid downcasting.
   // FIXME: Remove when the API of the Renderer-class is finished.
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/kdvi_part.rc #577807:577808
@@ -18,9 +18,6 @@
   <Action name="enable_msgs" group="additional_settings_merge"/>
  </Menu>
 
- <Menu name="help"><text>&amp;Help</text>
-  <Action name="help_tipofday" group="help_top"/>
- </Menu>
 </MenuBar>
 
 </kpartgui>
--- trunk/KDE/kdegraphics/kviewshell/plugins/pdf/pdfRenderer.cpp #577807:577808
@@ -629,7 +629,7 @@
 #warning TODO: This method appears to have changed in the qt4 poppler bindings
   // was: return document->print(filename, pageList, 600, 600, 0, paperWidth, paperHeight);
   // might now be:
-  return document->print(filename, pageList, 600, 600, 0);
+  return document->print(filename, pageList, 600, 600, 0, paperWidth, paperHeight);
 }
 
 
--- trunk/KDE/kdegraphics/kviewshell/shell/CMakeLists.txt #577807:577808
@@ -118,5 +118,5 @@
 install( FILES kviewshell.rc  DESTINATION  ${DATA_INSTALL_DIR}/kviewshell )
 install( FILES kmultipage.desktop  DESTINATION  ${SERVICETYPES_INSTALL_DIR} )
 install( FILES kmultipageInterface.h DESTINATION ${INCLUDE_INSTALL_DIR})
+install( FILES tips  DESTINATION  ${DATA_INSTALL_DIR}/kviewshell )
 
-
--- trunk/KDE/kdegraphics/kviewshell/shell/kviewshell.cpp #577807:577808
@@ -33,6 +33,7 @@
 #include <ktoggleaction.h>
 #include <ktogglefullscreenaction.h>
 #include <ktoolbar.h>
+#include <ktip.h>
 
 #include <QApplication>
 #include <QDragEnterEvent>
@@ -136,6 +137,7 @@
 
   KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
   KStdAction::configureToolbars(this, SLOT(slotEditToolbar()), actionCollection());
+  KStdAction::tipOfDay(this, SLOT(showTip()), actionCollection(), "help_tipofday");
 
   if (view != 0) {
     // statusbar connects
@@ -261,6 +263,11 @@
       }
     }
   }
+  config->setGroup("TipOfDay");
+  if (config->readBoolEntry("RunOnStart"))
+  {
+    QTimer::singleShot(0, this, SLOT(showTip()));
+  }
 }
 
 
@@ -433,6 +440,13 @@
   applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
 }
 
+
+void KViewShell::showTip()
+{
+  KTipDialog::showTip(this, "kviewshell/tips", true);
+}
+
+
 void KViewShell::dragEnterEvent(QDragEnterEvent *event)
 {
   if (view == 0)
--- trunk/KDE/kdegraphics/kviewshell/shell/kviewshell.h #577807:577808
@@ -40,6 +40,8 @@
   void slotChangePageText(const QString &);
   void slotChangeSizeText(const QString &);
 
+  void showTip();
+
 signals:
   void restoreDocument(const KUrl &url, int page);
   void saveDocumentRestoreInfo(KConfig* config);
--- trunk/KDE/kdegraphics/kviewshell/shell/kviewshell.rc #577807:577808
@@ -29,6 +29,7 @@
  </Menu>
   <Menu name="help"><text>&amp;Help</text>
     <DefineGroup name="help_top"/>
+    <Action name="help_tipofday" group="help_top"/>
     <DefineGroup name="help_about"/>
   </Menu>
 </MenuBar>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic