Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
5b50d8c4
Commit
5b50d8c4
authored
Sep 13, 2007
by
Constantin Berzan
Browse files
Add 'Open Browser Here' menu item.
BUG: 61136
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=712078
parent
a88b0297
Changes
3
Hide whitespace changes
Inline
Side-by-side
desktop/sessionui.rc
View file @
5b50d8c4
...
...
@@ -3,6 +3,7 @@
<kpartgui
name=
"session"
>
<MenuBar>
<Menu
name=
"file"
>
<Action
name=
"open-browser"
group=
"session-operations"
/>
<Action
name=
"close-session"
group=
"session-operations"
/>
</Menu>
<Menu
name=
"edit"
>
...
...
@@ -46,6 +47,7 @@
<Action
name=
"copy"
/>
<Action
name=
"paste"
/>
<Action
name=
"clear-history-and-reset"
/>
<Action
name=
"open-browser"
/>
<Separator/>
<Action
name=
"show-menubar"
/>
<Action
name=
"change-profile"
/>
...
...
src/SessionController.cpp
View file @
5b50d8c4
...
...
@@ -21,6 +21,7 @@
#include
"SessionController.h"
// Qt
#include
<QtGui/QApplication>
#include
<QMenu>
// KDE
...
...
@@ -29,6 +30,7 @@
#include
<KInputDialog>
#include
<KLocale>
#include
<KMenu>
#include
<KRun>
#include
<kshell.h>
#include
<KToggleAction>
#include
<KUrl>
...
...
@@ -400,6 +402,12 @@ void SessionController::setupActions()
action
->
setText
(
i18n
(
"&Close Tab"
)
);
action
->
setShortcut
(
QKeySequence
(
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_W
)
);
connect
(
action
,
SIGNAL
(
triggered
())
,
this
,
SLOT
(
closeSession
())
);
// Open Browser
action
=
collection
->
addAction
(
"open-browser"
);
action
->
setText
(
i18n
(
"Open Browser Here"
)
);
action
->
setIcon
(
KIcon
(
"folder-open"
)
);
connect
(
action
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
openBrowser
())
);
// Copy and Paste
action
=
collection
->
addAction
(
"copy"
);
...
...
@@ -623,6 +631,12 @@ void SessionController::closeSession()
_session
->
close
();
}
void
SessionController
::
openBrowser
()
{
kDebug
()
<<
"url is"
<<
url
();
new
KRun
(
url
(),
QApplication
::
activeWindow
());
}
void
SessionController
::
copy
()
{
_view
->
copyClipboard
();
...
...
src/SessionController.h
View file @
5b50d8c4
...
...
@@ -150,6 +150,7 @@ public slots:
private
slots
:
// menu item handlers
void
openBrowser
();
void
copy
();
void
paste
();
void
clear
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment