[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: [Kwin] Re: [PATCH] kwin ops menu addition - "add to panel"
From: Alexander Kellett <kelletta () eidetica ! com>
Date: 2002-06-20 15:55:13
[Download RAW message or body]
On Fri, May 31, 2002 at 03:19:06PM +0200, Alexander Kellett wrote:
> Here's a tiny patch to add a feature that seems
> pretty useful to me. It adds a "Add to Panel"
> to the window operations menu.
>
> Maybe it should be "Add Program to Panel".
> Any opinions?
No comment as of yet. The patched attached
does the above rename. If no objections over
the coming days i'll commit.
mvg,
Alex
["addtopanel.patch" (text/plain)]
Index: client.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/client.cpp,v
retrieving revision 1.295
diff -u -p -r1.295 client.cpp
--- client.cpp 2002/05/29 19:11:01 1.295
+++ client.cpp 2002/06/20 15:27:38
@@ -589,6 +589,24 @@ Client::~Client()
delete d;
}
+void Client::addToKicker()
+{
+ QString appPath = wmCommand();
+
+ QByteArray data;
+ QDataStream args(data, IO_WriteOnly);
+
+ // AK - could make the icon from the truncated appname?
+
+ args << appPath;
+ args << QString("");
+ args << QString("");
+ args << (bool)false;
+
+ kapp->dcopClient()->send(
+ "kicker", "", "addNonKDEAppButton(QString,QString,QString,bool)", data);
+}
+
void Client::startMoveResize()
{
moveResizeMode = true;
Index: client.h
===================================================================
RCS file: /home/kde/kdebase/kwin/client.h,v
retrieving revision 1.81
diff -u -p -r1.81 client.h
--- client.h 2002/03/04 02:20:26 1.81
+++ client.h 2002/06/20 15:27:38
@@ -77,6 +77,8 @@ public:
Client( Workspace *ws, WId w, QWidget *parent=0, const char *name=0, WFlags f = 0);
~Client();
+ void addToKicker();
+
WId window() const;
WindowWrapper* windowWrapper() const;
Workspace* workspace() const;
Index: workspace.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/workspace.cpp,v
retrieving revision 1.340
diff -u -p -r1.340 workspace.cpp
--- workspace.cpp 2002/06/11 19:49:37 1.340
+++ workspace.cpp 2002/06/20 15:27:40
@@ -1621,6 +1621,7 @@ QPopupMenu* Workspace::clientPopup( Clie
popup->insertItem( i18n("Sh&ade")+'\t'+keys->shortcut("Window Shade").toString(), Options::ShadeOp );
popup->insertItem( SmallIconSet( "attach" ), i18n("Always &on Top"), Options::StaysOnTopOp );
popup->insertItem( SmallIconSet( "filesave" ), i18n("Sto&re Settings"), Options::ToggleStoreSettingsOp );
+ popup->insertItem( i18n("Add Program to &Panel"), Options::AddToKicker );
popup->insertSeparator();
@@ -1695,6 +1696,9 @@ void Workspace::performWindowOperation(
case Options::StaysOnTopOp:
c->setStaysOnTop( !c->staysOnTop() );
raiseClient( c );
+ break;
+ case Options::AddToKicker:
+ c->addToKicker( );
break;
case Options::ToggleStoreSettingsOp:
c->setStoreSettings( !c->storeSettings() );
Index: options.h
===================================================================
RCS file: /home/kde/kdebase/kwin/options.h,v
retrieving revision 1.48
diff -u -p -r1.48 options.h
--- options.h 2002/03/16 09:26:49 1.48
+++ options.h 2002/06/20 15:27:40
@@ -221,7 +221,8 @@ public:
HMaximizeOp,
VMaximizeOp,
LowerOp,
- NoOp
+ NoOp,
+ AddToKicker
};
WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
_______________________________________________
Kwin mailing list
Kwin@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic