[Kst] kdeextragear-2/kst/kst/extensions/elog

George Staikos staikos at kde.org
Fri Oct 1 13:25:52 CEST 2004


CVS commit by staikos: 

- rename Close to Cancel
- add a Launch Browser action


  M +11 -3     elog.cpp   1.15
  M +1 -0      elog.h   1.4
  M +1 -1      elogentry.ui   1.5
  M +1 -0      elogentry_i.cpp   1.6
  M +3 -1      kstextension_elog.rc   1.3


--- kdeextragear-2/kst/kst/extensions/elog/elog.cpp  #1.14:1.15
@@ -21,11 +21,11 @@
 #include "elogthreadattrs.h"
 
-#include <kmdimainfrm.h>
-#include <kst.h>
 #include <kaction.h>
+#include <kapplication.h>
 #include <kfiledialog.h>
 #include <kgenericfactory.h>
+#include <kmdimainfrm.h>
 #include <kmessagebox.h>
-
+#include <kst.h>
 #include <kstevents.h>
 
@@ -35,4 +35,5 @@ KstELOG::KstELOG(QObject *parent, const 
   new KAction(i18n("&ELOG..."), 0, 0, this, SLOT(doShow()), actionCollection(), "elog_settings_show");
   new KAction(i18n("Add ELOG Entry..."), "addelogentry", CTRL+ALT+Key_E, this, SLOT(doEntry()), actionCollection(), "elog_entry_add");
+  new KAction(i18n("Launch ELOG Browser..."), "launchelogbrowser", CTRL+ALT+Key_B, this, SLOT(launchBrowser()), actionCollection(), "elog_launch_browser");
   setInstance(app()->instance());
   setXMLFile("kstextension_elog.rc", true);
@@ -163,4 +164,11 @@ void KstELOG::doShow() {
 
 
+void KstELOG::launchBrowser() {
+  // FIXME: be able to raise() an existing browser window one day
+  QString url = "http://" + _elogConfiguration->ipAddress() + ":" + _elogConfiguration->portNumber();
+  kapp->invokeBrowser(url);
+}
+
+
 void KstELOG::load(QDomElement& e) {
   Q_UNUSED(e)

--- kdeextragear-2/kst/kst/extensions/elog/elog.h  #1.3:1.4
@@ -44,4 +44,5 @@ class KstELOG : public KstExtension, pub
     void doEntry();
     void doShow();
+    void launchBrowser();
 
   private:

--- kdeextragear-2/kst/kst/extensions/elog/elogentry.ui  #1.4:1.5
@@ -99,5 +99,5 @@
                     </property>
                     <property name="text">
-                        <string>&amp;Close</string>
+                        <string>&amp;Cancel</string>
                     </property>
                 </widget>

--- kdeextragear-2/kst/kst/extensions/elog/elogentry_i.cpp  #1.5:1.6
@@ -58,4 +58,5 @@ void ElogEntryI::initialize() {
   grid = new QGridLayout(frameAttrs, 1, 1);
   grid->addWidget(_frameWidget = new QWidget(frameAttrs, "Frame Widget"), 0, 0);
+  pushButtonSubmit->setDefault(true);
 }
 

--- kdeextragear-2/kst/kst/extensions/elog/kstextension_elog.rc  #1.2:1.3
@@ -1,7 +1,8 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="Kst ELOG Extension" version="5">
+<kpartgui name="Kst ELOG Extension" version="6">
 <MenuBar>
  <Menu name="file"><Text>&amp;File</Text>
   <Action name="elog_entry_add"/>
+  <Action name="elog_launch_browser"/>
  </Menu>
  <Menu name="settings"><Text>&amp;Settings</Text>
@@ -11,4 +12,5 @@
 <ToolBar name="mainToolBar">
  <Action name="elog_entry_add"/>
+ <Action name="elog_launch_browser"/>
 </ToolBar>
 </kpartgui>





More information about the Kst mailing list