[rkward-cvs] rkward/rkward/windows rkhelpwindow.rc,1.1,1.2 rkhtmlwindow.cpp,1.8,1.9 rkhtmlwindow.h,1.4,1.5 rkoutputwindow.rc,1.2,1.3
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Sun Apr 16 23:02:03 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26787
Modified Files:
rkhelpwindow.rc rkhtmlwindow.cpp rkhtmlwindow.h
rkoutputwindow.rc
Log Message:
Make Ctrl+C copy work in html windows
Index: rkhelpwindow.rc
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkhelpwindow.rc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** rkhelpwindow.rc 19 Oct 2005 22:38:06 -0000 1.1
--- rkhelpwindow.rc 16 Apr 2006 23:02:01 -0000 1.2
***************
*** 5,8 ****
--- 5,11 ----
<Action name="print_help"/>
</Menu>
+ <Menu name="edit">
+ <Action name="copy"/>
+ </Menu>
</MenuBar>
<ToolBar fullWidth="true" name="navigation_toolbar">
Index: rkhtmlwindow.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkhtmlwindow.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rkhtmlwindow.cpp 16 Apr 2006 13:45:15 -0000 1.8
--- rkhtmlwindow.cpp 16 Apr 2006 23:02:01 -0000 1.9
***************
*** 50,54 ****
// We have to connect this in order to allow browsing.
connect (khtmlpart->browserExtension (), SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, SLOT (slotOpenURLRequest (const KURL &, const KParts::URLArgs &)));
-
connect (khtmlpart, SIGNAL (completed ()), this, SLOT (loadDone ()));
--- 50,53 ----
***************
*** 61,64 ****
--- 60,70 ----
}
+ void RKHTMLWindow::addCommonActions (KActionCollection *action_collection) {
+ RK_TRACE (APP);
+
+ // enable copy
+ KStdAction::copy (khtmlpart->browserExtension (), SLOT (copy ()), action_collection, "copy");
+ }
+
void RKHTMLWindow::slotPrint () {
RK_TRACE (APP);
***************
*** 166,169 ****
--- 172,176 ----
print = KStdAction::print (this, SLOT (slotPrint ()), actionCollection (), "print_output");
print->setText (i18n ("Print Output"));
+ addCommonActions (actionCollection ());
RKGlobals::rkApp ()->m_manager->addPart (khtmlpart);
***************
*** 272,275 ****
--- 279,283 ----
print = KStdAction::print (this, SLOT (slotPrint ()), actionCollection (), "print_help");
print->setText (i18n ("Print Help"));
+ addCommonActions (actionCollection ());
KInstance* instance = new KInstance ("rkward");
Index: rkoutputwindow.rc
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkoutputwindow.rc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkoutputwindow.rc 19 Oct 2005 22:38:06 -0000 1.2
--- rkoutputwindow.rc 16 Apr 2006 23:02:01 -0000 1.3
***************
*** 5,8 ****
--- 5,11 ----
<Action name="print_output"/>
</Menu>
+ <Menu name="edit">
+ <Action name="copy"/>
+ </Menu>
<Menu name="output"><text>&Output</text>
<Separator/>
Index: rkhtmlwindow.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkhtmlwindow.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkhtmlwindow.h 16 Apr 2006 13:45:15 -0000 1.4
--- rkhtmlwindow.h 16 Apr 2006 23:02:01 -0000 1.5
***************
*** 27,30 ****
--- 27,31 ----
class KHTMLPart;
+ class KActionCollection;
/**
***************
*** 50,53 ****
--- 51,57 ----
/** Reload current page.*/
virtual void refresh ();
+ /** Add common actions to the given action collection (currently only "copy")
+ @param action_collection A KActionCollection to insert actions in. */
+ void addCommonActions (KActionCollection *action_collection);
public slots:
/** this is used for browsing only. Use openURL instead, when calling from outside. */
More information about the rkward-tracker
mailing list