1
/**************************************************************************
2
* Copyright (C) 2005-2015 by Oleksandr Shneyder *
3
* o.shneyder@phoca-gmbh.de *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
16
***************************************************************************/
18
#include "sessionbutton.h"
19
#include "x2goclientconfig.h"
20
#include "x2goutils.h"
25
#include "x2gosettings.h"
29
#include <QMouseEvent>
31
#include <QPushButton>
32
#include "onmainwindow.h"
33
#include "x2gologdebug.h"
34
#include <QApplication>
35
#include <QDesktopWidget>
36
#include "sessionexplorer.h"
39
SessionButton::SessionButton ( ONMainWindow* mw,QWidget *parent, QString id )
40
: SVGFrame ( ":/svg/sessionbut.svg",false,parent )
42
editable=mw->sessionEditEnabled();
45
QPalette pal=palette();
46
pal.setColor ( QPalette::Active, QPalette::WindowText, QPalette::Mid );
47
pal.setColor ( QPalette::Active, QPalette::ButtonText, QPalette::Mid );
48
pal.setColor ( QPalette::Active, QPalette::Text, QPalette::Mid );
49
pal.setColor ( QPalette::Inactive, QPalette::WindowText, QPalette::Mid );
50
pal.setColor ( QPalette::Inactive, QPalette::ButtonText, QPalette::Mid );
51
pal.setColor ( QPalette::Inactive, QPalette::Text, QPalette::Mid );
58
if ( mw->retMiniMode() )
60
fnt.setPointSize ( 10 );
62
fnt.setPointSize ( 9 );
65
setFocusPolicy ( Qt::NoFocus );
66
bool miniMode=mw->retMiniMode();
68
setFixedSize ( 340,190 );
70
setFixedSize ( 250,145 );
74
connect ( this,SIGNAL ( clicked() ),this,SLOT ( slotClicked() ) );
78
cmdBox=new QComboBox ( this );
79
cmdBox->setMouseTracking ( true );
80
cmdBox->setFrame ( false );
81
QPalette cpal=cmdBox->palette();
83
cpal.setColor ( QPalette::Button,QColor ( 255,255,255 ) );
84
cpal.setColor ( QPalette::Base,QColor ( 255,255,255 ) );
85
cpal.setColor ( QPalette::Window,QColor ( 255,255,255 ) );
86
cmdBox->setPalette ( cpal );
88
geomBox=new QComboBox ( this );
89
geomBox->setMouseTracking ( true );
90
geomBox->setFrame ( false );
91
geomBox->setEditable ( true );
92
geomBox->setEditable ( false );
94
geomBox->setPalette ( cpal );
96
sessName=new QLabel ( this );
97
sessStatus=new QLabel ( this );
100
sessName->setFont ( fnt );
101
icon=new QLabel ( this );
102
cmd=new QLabel ( this );
103
cmd->setMouseTracking ( true );
104
serverIcon=new QLabel ( this );
105
geomIcon=new QLabel ( this );
106
geomIcon->setMouseTracking ( true );
107
cmdIcon=new QLabel ( this );
108
cmdIcon->setMouseTracking ( true );
109
server=new QLabel ( this );
110
geom=new QLabel ( this );
111
geom->setMouseTracking ( true );
113
sound=new QPushButton ( this );
114
soundIcon=new QLabel ( this );
115
sound->setPalette ( cpal );
116
sound->setFlat ( true );
117
sound->setMouseTracking ( true );
118
connect ( sound,SIGNAL ( clicked() ),this,
119
SLOT ( slot_soundClicked() ) );
121
editBut=new QPushButton ( this );
122
editBut->setMouseTracking ( true );
123
connect ( editBut,SIGNAL ( pressed() ),this,SLOT ( slotShowMenu() ) );
124
editBut->setIcon ( QIcon ( par->iconsPath ( "/16x16/preferences.png" ) ) );
125
editBut->setIconSize ( QSize ( 16,16 ) );
126
editBut->setFixedSize ( 24,24 );
127
editBut->setFlat ( true );
128
editBut->setPalette ( cpal );
129
sessMenu=new QMenu ( this );
131
connect ( sessMenu,SIGNAL ( aboutToHide() ),this,
132
SLOT ( slotMenuHide() ) );
134
act_edit=sessMenu->addAction (
136
mw->iconsPath ( "/16x16/edit.png" ) ),
137
tr ( "Session preferences..." ) );
138
#if (!defined Q_WS_HILDON) && (!defined Q_OS_DARWIN)
139
act_createIcon=sessMenu->addAction (
140
QIcon ( mw->iconsPath ( "/16x16/create_file.png" ) ),
142
"Create session icon on desktop..." ) );
144
act_remove=sessMenu->addAction (
145
QIcon ( mw->iconsPath ( "/16x16/delete.png" ) ),
146
tr ( "Delete session" ) );
149
connect ( act_edit,SIGNAL ( triggered ( bool ) ),this,
150
SLOT ( slotEdit() ) );
152
connect ( act_remove,SIGNAL ( triggered ( bool ) ),this,
153
SLOT ( slotRemove() ) );
154
#if (!defined Q_WS_HILDON) && (!defined Q_OS_DARWIN)
155
connect ( act_createIcon,SIGNAL ( triggered ( bool ) ),this,
156
SLOT ( slotCreateSessionIcon() ) );
159
editBut->setToolTip ( tr ( "Session actions" ) );
160
cmdBox->setToolTip ( tr ( "Select type" ) );
162
geomBox->setToolTip ( tr ( "Select resolution" ) );
163
sound->setToolTip ( tr ( "Toggle sound support" ) );
164
icon->move ( 10,10 );
168
sessName->move ( 80,34 );
169
sessStatus->move(80,50);
170
editBut->move ( 307,156 );
171
serverIcon->move ( 58,84 );
172
server->move ( 80,84 );
173
cmdIcon->move ( 58,108 );
174
cmd->move ( 80,108 );
175
cmdBox->move ( 80,108 );
176
geomIcon->move ( 58,132 );
177
geom->move ( 80,132 );
178
geomBox->move ( 80,132 );
179
soundIcon->move ( 58,156 );
180
sound->move ( 76,156 );
184
editBut->move ( 218,113 );
185
sessName->move ( 64,11 );
187
serverIcon->move ( 66,44 );
188
server->move ( 88,44 );
189
cmdIcon->move ( 66,68 );
191
cmdBox->move ( 88,68 );
192
geomIcon->move ( 66,92 );
193
geom->move ( 88,92 );
194
geomBox->move ( 88,92 );
195
soundIcon->move ( 66,116 );
196
sound->move ( 86,116 );
202
sessName->move(90,50);
203
sessStatus->move(90,70);
211
spix.load ( par->iconsPath ( "/16x16/session.png" ) );
212
serverIcon->setPixmap ( spix );
213
serverIcon->setFixedSize ( 16,16 );
216
rpix.load ( par->iconsPath ( "/16x16/resolution.png" ) );
217
geomIcon->setPixmap ( rpix );
218
geomIcon->setFixedSize ( 16,16 );
221
apix.load ( par->iconsPath ( "/16x16/audio.png" ) );
222
soundIcon->setPixmap ( apix );
223
soundIcon->setFixedSize ( 16,16 );
226
connect ( cmdBox,SIGNAL ( activated ( const QString& ) ),this,
227
SLOT ( slot_cmd_change ( const QString& ) ) );
228
connect ( geomBox,SIGNAL ( activated ( const QString& ) ),this,
229
SLOT ( slot_geom_change ( const QString& ) ) );
231
editBut->setFocusPolicy ( Qt::NoFocus );
232
sound->setFocusPolicy ( Qt::NoFocus );
233
cmdBox->setFocusPolicy ( Qt::NoFocus );
234
geomBox->setFocusPolicy ( Qt::NoFocus );
235
setMouseTracking(true);
243
sound->setEnabled(false);
258
SessionButton::~SessionButton()
261
void SessionButton::slotClicked()
263
emit sessionSelected ( this );
266
void SessionButton::slotEdit()
268
// editBut->setFlat ( true );
269
emit signal_edit ( this );
272
void SessionButton::slotRemove()
274
emit ( signal_remove ( this ) );
277
void SessionButton::redraw()
285
st=new X2goSettings(par->config.iniFile,QSettings::IniFormat);
287
st= new X2goSettings( "sessions" );
289
QString name=st->setting()->value ( sid+"/name",
290
( QVariant ) tr ( "New Session" ) ).toString();
292
QStringList tails=name.split("/",QString::SkipEmptyParts);
297
path=tails.join("/");
300
sessName->setText (name);
302
QString status=st->setting()->value ( sid+"/status",
303
( QVariant ) QString::null ).toString();
306
sessStatus->setText("("+tr("running")+")");
310
sessStatus->setText("("+tr("suspended")+")");
313
QString sessIcon=st->setting()->value (
316
":icons/128x128/x2gosession.png"
318
sessIcon = expandHome(sessIcon);
321
if (!par->brokerMode || sessIcon == ":icons/128x128/x2gosession.png")
322
pix=new QPixmap( sessIcon );
326
pix->loadFromData(QByteArray::fromBase64(sessIcon.toAscii()));
328
if ( !par->retMiniMode() )
329
icon->setPixmap ( pix->scaled ( 64,64,Qt::IgnoreAspectRatio,
330
Qt::SmoothTransformation ) );
332
icon->setPixmap ( pix->scaled ( 48,48,Qt::IgnoreAspectRatio,
333
Qt::SmoothTransformation ) );
336
QString sv=st->setting()->value ( sid+"/host", ( QVariant )
337
QString::null ).toString();
338
QString uname=st->setting()->value ( sid+"/user", ( QVariant )
339
QString::null ).toString();
340
server->setText ( uname+"@"+sv );
342
QString command=st->setting()->value ( sid+"/command",
347
rootless=st->setting()->value ( sid+"/rootless",
349
published=st->setting()->value ( sid+"/published",
354
cmdBox->addItem ( "KDE" );
355
cmdBox->addItem ( "GNOME" );
356
cmdBox->addItem ( "LXDE" );
357
cmdBox->addItem ( "XFCE" );
358
cmdBox->addItem ( "MATE" );
359
cmdBox->addItem ( "UNITY" );
360
cmdBox->addItem ( "CINNAMON" );
361
cmdBox->addItem ( "TRINITY" );
362
cmdBox->addItem ( "OPENBOX" );
363
cmdBox->addItem ( "ICEWM" );
364
cmdBox->addItem ( tr ( "RDP connection" ) );
365
cmdBox->addItem ( tr ( "XDMCP" ) );
366
cmdBox->addItem ( tr ( "Connection to local desktop" ) );
367
cmdBox->addItem ( tr ( "Published applications" ) );
369
cmdBox->addItems ( par->transApplicationsNames() );
371
bool directRDP=false;
373
if ( command=="KDE" )
375
cmdpix.load ( par->iconsPath ( "/16x16/kde.png" ) );
376
cmdBox->setCurrentIndex ( KDE );
378
else if ( command =="GNOME" )
380
cmdpix.load ( par->iconsPath ( "/16x16/gnome.png" ) );
381
cmdBox->setCurrentIndex ( GNOME );
383
else if ( command =="UNITY" )
385
cmdpix.load ( par->iconsPath ( "/16x16/unity.png" ) );
386
cmdBox->setCurrentIndex ( UNITY );
388
else if ( command == "XFCE" )
390
cmdpix.load ( par->iconsPath ( "/16x16/xfce.png" ) );
391
cmdBox->setCurrentIndex ( XFCE );
393
else if ( command == "MATE" )
395
cmdpix.load ( par->iconsPath ( "/16x16/mate.png" ) );
396
cmdBox->setCurrentIndex ( MATE );
398
else if ( command =="LXDE" )
400
cmdpix.load ( par->iconsPath ( "/16x16/lxde.png" ) );
401
cmdBox->setCurrentIndex ( LXDE );
403
else if ( command == "CINNAMON" )
405
cmdpix.load ( par->iconsPath ( "/16x16/cinnamon.png" ) );
406
cmdBox->setCurrentIndex ( CINNAMON );
408
else if ( command == "TRINITY" )
410
cmdpix.load ( par->iconsPath ( "/16x16/trinity.png" ) );
411
cmdBox->setCurrentIndex ( TRINITY );
413
else if ( command == "OPENBOX" )
415
cmdpix.load ( par->iconsPath ( "/16x16/openbox.png" ) );
416
cmdBox->setCurrentIndex ( OPENBOX );
418
else if ( command == "ICEWM" )
420
cmdpix.load ( par->iconsPath ( "/16x16/icewm.png" ) );
421
cmdBox->setCurrentIndex ( ICEWM );
423
else if ( command =="SHADOW" )
425
cmdpix.load ( par->iconsPath ( "/16x16/X.png" ) );
426
cmdBox->setCurrentIndex ( SHADOW );
427
command=tr ( "Connection to local desktop" );
429
else if ( command =="RDP" )
431
if (st->setting()->value ( sid+"/directrdp",
432
( QVariant ) false ).toBool())
434
cmdpix.load ( par->iconsPath ( "/16x16/rdp.png" ) );
435
cmdBox->setCurrentIndex ( RDP );
436
command=tr ( "RDP connection" );
438
else if ( command =="XDMCP" )
440
cmdpix.load ( par->iconsPath ( "/16x16/X.png" ) );
441
cmdBox->setCurrentIndex ( XDMCP );
442
command=tr ( "XDMCP" );
446
cmdpix.load ( par->iconsPath ( "/16x16/X.png" ) );
447
command=tr ("Published applications");
448
cmdBox->setCurrentIndex (PUBLISHED);
452
cmdpix.load ( par->iconsPath ( "/16x16/X.png" ) );
453
command=par->transAppName ( command );
454
int id= cmdBox->findText ( command );
457
cmdBox->addItem ( command );
458
cmdBox->setCurrentIndex ( cmdBox->count()-1 );
461
cmdBox->setCurrentIndex ( id );
466
cmdIcon->setPixmap ( cmdpix );
467
cmd->setText ( command );
471
geomBox->addItem ( tr ( "fullscreen" ) );
472
uint displays=QApplication::desktop()->numScreens();
474
for (uint i=0; i<displays; ++i)
476
geomBox->addItem ( tr( "Display " )+QString::number(i+1));
478
//add maximun available area
479
geomBox->addItem( QString::number(QApplication::desktop()->availableGeometry(i).width()) + "x" + QString::number(QApplication::desktop()->availableGeometry(i).height()));
486
geomBox->addItem ( "1440x900" );
487
geomBox->addItem ( "1280x1024" );
488
geomBox->addItem ( "1024x768" );
489
geomBox->addItem ( "800x600" );
491
geomBox->addItem ( tr ( "window" ) );
493
if ( st->setting()->value ( sid+"/fullscreen",
494
( QVariant ) false ).toBool() )
496
geom->setText ( tr ( "fullscreen" ) );
498
else if (st->setting()->value ( sid+"/multidisp",
499
( QVariant ) false ).toBool() && !directRDP)
501
uint disp=st->setting()->value ( sid+"/display",
502
( QVariant ) 1 ).toUInt();
505
geom->setText( tr( "Display " )+QString::number(disp));
509
geom->setText( tr( "Display " )+QString::number(1));
511
for (int i=0; i<geomBox->count(); ++i)
512
if (geomBox->itemText(i)==geom->text())
514
geomBox->setCurrentIndex(i);
521
QString g=QString::number ( st->setting()->value (
522
sid+"/width" ).toInt() );
523
g+="x"+QString::number ( st->setting()->value (
524
sid+"/height" ).toInt() );
526
if ( geomBox->findText ( g ) ==-1 )
527
geomBox->addItem ( g );
528
geomBox->setCurrentIndex ( geomBox->findText ( g ) );
530
geom->setText ( tr ( "window" ) );
531
geomBox->setCurrentIndex ( 1 );
537
geomBox->addItem ( tr("Maximum") );
538
if (st->setting()->value ( sid+"/maxdim",
539
( QVariant ) false ).toBool())
541
geom->setText ( tr("Maximum") );
542
geomBox->setCurrentIndex ( geomBox->findText ( tr("Maximum") ));
547
snd=st->setting()->value ( sid+"/sound", ( QVariant ) true ).toBool();
549
sound->setText ( tr ( "Enabled" ) );
551
sound->setText ( tr ( "Disabled" ) );
552
soundIcon->setEnabled ( snd );
553
QFontMetrics fm ( sound->font() );
554
sound->setFixedSize ( fm.size ( Qt::TextSingleLine,sound->text() ) +
557
sessName->setMinimumSize ( sessName->sizeHint() );
558
geom->setMinimumSize ( geom->sizeHint() );
559
cmd->setMinimumSize ( cmd->sizeHint() );
560
server->setMinimumSize ( server->sizeHint() );
564
void SessionButton::mousePressEvent ( QMouseEvent * event )
566
SVGFrame::mousePressEvent ( event );
567
loadBg ( ":/svg/sessionbut_grey.svg" );
570
void SessionButton::mouseReleaseEvent ( QMouseEvent * event )
572
SVGFrame::mouseReleaseEvent ( event );
575
loadBg ( ":/svg/sessionbut.svg" );
576
if ( x>=0 && x< width() && y>=0 && y<height() )
580
void SessionButton::mouseMoveEvent ( QMouseEvent * event )
583
SVGFrame::mouseMoveEvent ( event );
586
if ( cmd->isVisible() )
587
if ( event->x() > cmd->x() && event->x() < cmd->x() +
589
event->y() >cmd->y() && event->y() <cmd->y() +
592
if ( cmdBox->width() <cmd->width() )
593
cmdBox->setFixedWidth ( cmd->width() +20 );
594
if ( cmdBox->height() !=cmd->height() )
595
cmdBox->setFixedHeight ( cmd->height() );
599
if ( cmdBox->isVisible() )
600
if ( event->x() < cmdBox->x() || event->x() > cmdBox->x() +
602
event->y() <cmdBox->y() || event->y() >cmdBox->y() +
610
if ( sound->isFlat() )
612
if ( event->x() > sound->x() && event->x() < sound->x() +
614
event->y() >sound->y() && event->y() <sound->y() +
617
sound->setFlat ( false );
622
if ( event->x() < sound->x() || event->x() > sound->x() +
624
event->y() <sound->y() || event->y() >sound->y() +
627
sound->setFlat ( true );
632
if ( editBut->isFlat() )
634
if ( event->x() > editBut->x() && event->x() < editBut->x() +
636
event->y() >editBut->y() && event->y() <editBut->y() +
638
editBut->setFlat ( false );
642
if ( event->x() < editBut->x() || event->x() > editBut->x() +
644
event->y() <editBut->y() || event->y() >editBut->y() +
646
editBut->setFlat ( true );
649
if ( geom->isVisible() )
650
if ( event->x() > geom->x() && event->x() < geom->x() +
652
event->y() >geom->y() && event->y() <geom->y() +
655
if ( geomBox->width() <geom->width() )
656
geomBox->setFixedWidth ( geom->width() +20 );
657
if ( geomBox->height() !=geom->height() )
658
geomBox->setFixedHeight ( geom->height() );
662
if ( geomBox->isVisible() )
663
if ( event->x() < geomBox->x() || event->x() > geomBox->x() +
665
event->y() <geomBox->y() || event->y() >geomBox->y() +
674
void SessionButton::slot_soundClicked()
676
bool snd=!soundIcon->isEnabled();
677
soundIcon->setEnabled ( snd );
679
sound->setText ( tr ( "Enabled" ) );
681
sound->setText ( tr ( "Disabled" ) );
682
QFontMetrics fm ( sound->font() );
683
sound->setFixedSize ( fm.size ( Qt::TextSingleLine,sound->text() ) +
686
X2goSettings st ( "sessions" );
687
st.setting()->setValue ( sid+"/sound", ( QVariant ) snd );
688
st.setting()->sync();
693
void SessionButton::slot_cmd_change ( const QString& command )
695
cmd->setText ( command );
697
bool newRootless=rootless;
700
if ( command=="KDE" )
703
pix.load ( par->iconsPath ( "/16x16/kde.png" ) );
705
else if ( command =="GNOME" )
708
pix.load ( par->iconsPath ( "/16x16/gnome.png" ) );
710
else if ( command =="LXDE" )
713
pix.load ( par->iconsPath ( "/16x16/lxde.png" ) );
715
else if ( command =="UNITY" )
718
pix.load ( par->iconsPath ( "/16x16/unity.png" ) );
720
else if ( command == "XFCE" )
723
pix.load ( par->iconsPath ( "/16x16/xfce.png" ) );
725
else if ( command == "MATE" )
728
pix.load ( par->iconsPath ( "/16x16/mate.png" ) );
730
else if ( command == "CINNAMON" )
733
// As of 2014-10-01, Cinnamon does not have a logo. This icon is the
734
// gear, which is the default start menu icon as of 2.2.
735
pix.load ( par->iconsPath ( "/16x16/cinnamon.png" ) );
737
else if ( command == "TRINITY" )
740
pix.load ( par->iconsPath ( "/16x16/trinity.png" ) );
742
else if ( command == "OPENBOX" )
745
pix.load ( par->iconsPath ( "/16x16/openbox.png" ) );
747
else if ( command == "ICEWM" )
750
pix.load ( par->iconsPath ( "/16x16/icewm.png" ) );
752
else if ( command ==tr ( "Connection to local desktop" ) )
755
pix.load ( par->iconsPath ( "/16x16/X.png" ) );
758
else if ( command == tr ( "RDP connection" ) )
761
pix.load ( par->iconsPath ( "/16x16/rdp.png" ) );
764
else if ( command == tr ( "XDMCP" ) )
767
pix.load ( par->iconsPath ( "/16x16/X.png" ) );
771
pix.load ( par->iconsPath ( "/16x16/X.png" ) );
772
cmdIcon->setPixmap ( pix );
774
X2goSettings st ( "sessions" );
775
if ( command=="startkde" )
780
if ( command=="gnome-session" )
785
if ( command=="LXDE" )
790
if ( command=="unity" )
795
if ( command=="xfce4-session" )
800
if ( command=="mate-session" )
805
if ( command=="cinnamon-session" )
810
if (command== tr("Published applications"))
816
cmd=par->internAppName ( cmd,&found );
819
st.setting()->setValue ( sid+"/command", ( QVariant ) cmd );
820
st.setting()->setValue ( sid+"/rootless", ( QVariant ) newRootless );
821
st.setting()->setValue ( sid+"/published", ( QVariant ) published );
822
st.setting()->sync();
827
void SessionButton::slot_geom_change ( const QString& new_g )
829
geom->setText ( new_g );
830
X2goSettings st ( "sessions" );
831
if ( new_g==tr ( "fullscreen" ) )
833
st.setting()->setValue ( sid+"/fullscreen", ( QVariant ) true );
834
st.setting()->setValue ( sid+"/multidisp", ( QVariant ) false );
835
st.setting()->setValue ( sid+"/maxdim", ( QVariant ) false );
837
else if ( new_g==tr ( "Maximum" ))
839
st.setting()->setValue ( sid+"/fullscreen", ( QVariant ) false );
840
st.setting()->setValue ( sid+"/multidisp", ( QVariant ) false );
841
st.setting()->setValue ( sid+"/maxdim", ( QVariant ) true );
843
else if (new_g.indexOf(tr("Display "))==0)
846
g.replace(tr("Display "),"");
847
st.setting()->setValue ( sid+"/multidisp", ( QVariant ) true );
848
st.setting()->setValue ( sid+"/display", ( QVariant ) g.toUInt());
849
st.setting()->setValue ( sid+"/fullscreen", ( QVariant ) false );
850
st.setting()->setValue ( sid+"/maxdim", ( QVariant ) false );
854
QString new_geom=new_g;
858
st.setting()->setValue ( sid+"/fullscreen", ( QVariant ) false );
859
st.setting()->setValue ( sid+"/multidisp", ( QVariant ) false );
860
st.setting()->setValue ( sid+"/maxdim", ( QVariant ) false );
861
QStringList lst=new_geom.split ( 'x' );
862
st.setting()->setValue ( sid+"/width", ( QVariant ) lst[0] );
863
st.setting()->setValue ( sid+"/height", ( QVariant ) lst[1] );
865
st.setting()->sync();
868
bool SessionButton::lessThen ( const SessionButton* b1,
869
const SessionButton* b2 )
871
return b1->sessName->text().toLower().localeAwareCompare (
872
b2->sessName->text().toLower() ) <0;
875
QString SessionButton::name()
877
return sessName->text();
880
void SessionButton::slotMenuHide()
882
editBut->setDown ( false );
883
editBut->setFlat ( true );
887
void SessionButton::slotShowMenu()
889
sessMenu->popup ( mapToGlobal ( QPoint ( editBut->x() +editBut->width(),
890
editBut->y() +editBut->height() ) ) );
894
void SessionButton::slotCreateSessionIcon()
896
par->getSessionExplorer()->slotCreateDesktopIcon ( this );