summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-03-02 17:42:31 +0100
committerSebastian Schmelzer2011-03-02 17:42:31 +0100
commitcc0da60907ac49d4fce89ebcf799ef3bd07f1a5c (patch)
tree11c344bc3d51514a5e937197f4e92ab804d012ca /src
parentgui stuff .. (diff)
parentwindow manager intergration removed (diff)
downloadvmchooser-cc0da60907ac49d4fce89ebcf799ef3bd07f1a5c.tar.gz
vmchooser-cc0da60907ac49d4fce89ebcf799ef3bd07f1a5c.tar.xz
vmchooser-cc0da60907ac49d4fce89ebcf799ef3bd07f1a5c.zip
Merge branch 'master' of openslx.org:openslx/tools/vmchooser
Conflicts: src/main.cpp
Diffstat (limited to 'src')
-rw-r--r--src/command_line_options.cpp4
-rw-r--r--src/dialog.cpp22
-rw-r--r--src/dialog.h3
-rw-r--r--src/main.cpp10
-rw-r--r--src/ui/dialog.ui6
5 files changed, 7 insertions, 38 deletions
diff --git a/src/command_line_options.cpp b/src/command_line_options.cpp
index 532612d..2127c4f 100644
--- a/src/command_line_options.cpp
+++ b/src/command_line_options.cpp
@@ -12,7 +12,6 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) {
{"xpath", required_argument, NULL, 'x'},
{"size", required_argument, NULL, 's'},
{"version", no_argument, NULL, 'v'},
- {"windowmgr", required_argument, NULL, 'w' },
{"help", no_argument, NULL, 'h'},
{0, 0, 0, 0}
};
@@ -42,9 +41,6 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) {
case 'v':
options.insert("version", "version");
break;
- case 'w':
- options.insert("windowmgr", optarg);
- break;
case 'h':
options.insert("usage", "usage");
break;
diff --git a/src/dialog.cpp b/src/dialog.cpp
index f2765ac..6100d8c 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -6,21 +6,11 @@
#include "save_restore_session.h"
#include "sessiontreeitem.h"
-Dialog::Dialog(QString windowmgr, QWidget *parent)
+Dialog::Dialog(QWidget *parent)
: QDialog(parent), ui(new Ui::Dialog) {
model_ = new SessionTreeModel(parent);
ui->setupUi(this);
- windowmgr_ = new QProcess(this);
- // start window manager
- if (windowmgr != "") {
- windowmgr_->start(windowmgr);
- windowmgr_->waitForStarted(3000);
- if (windowmgr_->error() == QProcess::FailedToStart)
- QMessageBox::warning(this, tr("Warning"),
- tr("Window manager '") + windowmgr + tr("' couldn't be started!"));
- }
-
QDBusConnection dbus = QDBusConnection::sessionBus();
ifaceDBus_ = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this);
@@ -43,8 +33,6 @@ Dialog::~Dialog() {
delete ui;
delete model_;
delete ifaceDBus_;
- windowmgr_->terminate();
- windowmgr_->waitForFinished(3000);
}
void Dialog::changeEvent(QEvent *e) {
@@ -70,18 +58,12 @@ void Dialog::on_treeView_activated(QModelIndex index) {
return;
}
- setVisible(false);
- if (s->type() == Session::XSESSION) {
- windowmgr_->terminate();
- windowmgr_->waitForFinished(3000);
- windowmgr_->kill();
- }
-
if (s->run()) {
if (ifaceDBus_->isValid()) {
writePVSSettings();
}
writeSessionName(s->shortDescription());
+ setVisible(false);
} else {
QMessageBox::warning(
diff --git a/src/dialog.h b/src/dialog.h
index ed1b49c..1b2e7c9 100644
--- a/src/dialog.h
+++ b/src/dialog.h
@@ -15,7 +15,7 @@ namespace Ui {
class Dialog : public QDialog {
Q_OBJECT
public:
- explicit Dialog(QString windowmgr = "", QWidget *parent = 0);
+ explicit Dialog(QWidget *parent = 0);
~Dialog();
void addItems(const QList<Session*>&, const QString& section);
void selectSession(const QString& name);
@@ -28,7 +28,6 @@ class Dialog : public QDialog {
Ui::Dialog *ui;
SessionTreeModel *model_;
OrgOpenslxPvsInterface *ifaceDBus_;
- QProcess *windowmgr_;
void readPVSSettings();
void writePVSSettings();
diff --git a/src/main.cpp b/src/main.cpp
index 61aa8f7..cb76d61 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,7 +38,6 @@ int main(int argc, char *argv[]) {
" -p, --path path to vmware .xml files\n"
" -x, --xpath path of X Session .desktop files\n"
" -s, --size window size <width>x<height>\n"
- " -w, --windowmgr use <command> window manager\n"
" -v, --version print version and exit\n"
" -h, --help print usage information and exit\n"
"\nFILE can be a vmware .xml or an X .desktop file\n")
@@ -92,13 +91,6 @@ int main(int argc, char *argv[]) {
}
}
- // TODO: parse args => command_line_options.cpp
- QString windowmgr;
- if (cmdOptions.contains("windowmgr")) {
- windowmgr = cmdOptions.value("windowmgr");
- }
-
-
// read configuration file:
// file supplied as command line option or
// user vmchooser.conf or
@@ -171,7 +163,7 @@ int main(int argc, char *argv[]) {
QList<Session*> xsessions(XSession::readSessions(xSessionPath));
QList<Session*> vsessions(VSession::readXmlDir(vSessionPath));
- Dialog w(windowmgr);
+ Dialog w;
w.setWindowFlags(Qt::FramelessWindowHint);
w.resize(width, height);
if (xsessions.empty() && vsessions.empty()) {
diff --git a/src/ui/dialog.ui b/src/ui/dialog.ui
index b1b37c5..b787ca6 100644
--- a/src/ui/dialog.ui
+++ b/src/ui/dialog.ui
@@ -15,7 +15,7 @@
</property>
<property name="styleSheet">
<string notr="true">#Dialog {
- border:1px solid #666;
+ border:1px solid #999;
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -109,8 +109,8 @@ margin-bottom:0px;</string>
</size>
</property>
<property name="styleSheet">
- <string notr="true">border-top:1px solid #666;
-border-bottom:1px solid #666;
+ <string notr="true">border-top:1px solid #999;
+border-bottom:1px solid #999;
</string>
</property>
<property name="frameShape">