Lines 289-299
Link Here
|
289 |
qApp->syncX(); |
289 |
qApp->syncX(); |
290 |
alternatives->raise(); |
290 |
alternatives->raise(); |
291 |
} else { |
291 |
} else { |
292 |
alternatives->hide(); |
292 |
/* |
|
|
293 |
* This is an ugly q'n'd fix for http://sourceforge.net/tracker/index.php?func=detail&aid=2208093&group_id=132975&atid=725839 |
294 |
* Instead of hiding alternatives that just moves them to an area where it cannot be seen. May cause problems with secondary screen? |
295 |
* thilo@tschulzke.com on 27th January 2009 |
296 |
*/ |
297 |
QRect scr = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen()); |
298 |
n.moveTo(scr.width(),5*scr.height()); |
299 |
alternatives->setGeometry(n); |
293 |
} |
300 |
} |
294 |
} |
301 |
} |
295 |
|
302 |
|
296 |
|
|
|
297 |
void MyWidget::launchObject() { |
303 |
void MyWidget::launchObject() { |
298 |
CatItem res = inputData[0].getTopResult(); |
304 |
CatItem res = inputData[0].getTopResult(); |
299 |
if (res.id == HASH_LAUNCHY) { |
305 |
if (res.id == HASH_LAUNCHY) { |
Lines 338-344
Link Here
|
338 |
|
344 |
|
339 |
void MyWidget::altKeyPressEvent(QKeyEvent* key) { |
345 |
void MyWidget::altKeyPressEvent(QKeyEvent* key) { |
340 |
if (key->key() == Qt::Key_Escape) { |
346 |
if (key->key() == Qt::Key_Escape) { |
341 |
alternatives->hide(); |
347 |
showAlternatives(false); |
342 |
} |
348 |
} |
343 |
if (key->key() == Qt::Key_Up) {key->ignore();} |
349 |
if (key->key() == Qt::Key_Up) {key->ignore();} |
344 |
else if (key->key() == Qt::Key_Down) {key->ignore();} |
350 |
else if (key->key() == Qt::Key_Down) {key->ignore();} |
Lines 364-370
Link Here
|
364 |
input->setText(printInput() + searchResults[0].fullPath); |
370 |
input->setText(printInput() + searchResults[0].fullPath); |
365 |
} |
371 |
} |
366 |
*/ |
372 |
*/ |
367 |
alternatives->hide(); |
373 |
showAlternatives(false); |
368 |
|
374 |
|
369 |
|
375 |
|
370 |
if (key->key() == Qt::Key_Tab) { |
376 |
if (key->key() == Qt::Key_Tab) { |
Lines 381-387
Link Here
|
381 |
} |
387 |
} |
382 |
} |
388 |
} |
383 |
else { |
389 |
else { |
384 |
alternatives->hide(); |
390 |
showAlternatives(false); |
385 |
activateWindow(); |
391 |
activateWindow(); |
386 |
raise(); |
392 |
raise(); |
387 |
input->setFocus(); |
393 |
input->setFocus(); |
Lines 479-485
Link Here
|
479 |
void MyWidget::keyPressEvent(QKeyEvent* key) { |
485 |
void MyWidget::keyPressEvent(QKeyEvent* key) { |
480 |
if (key->key() == Qt::Key_Escape) { |
486 |
if (key->key() == Qt::Key_Escape) { |
481 |
if (alternatives->isVisible()) |
487 |
if (alternatives->isVisible()) |
482 |
alternatives->hide(); |
488 |
showAlternatives(false); |
483 |
else |
489 |
else |
484 |
hideLaunchy(); |
490 |
hideLaunchy(); |
485 |
} |
491 |
} |
Lines 527-533
Link Here
|
527 |
|
533 |
|
528 |
|
534 |
|
529 |
void MyWidget::processKey() { |
535 |
void MyWidget::processKey() { |
530 |
alternatives->hide(); |
536 |
showAlternatives(false); |
531 |
dropTimer->stop(); |
537 |
dropTimer->stop(); |
532 |
dropTimer->start(1000); |
538 |
dropTimer->start(1000); |
533 |
|
539 |
|
Lines 908-914
Link Here
|
908 |
void MyWidget::MoveFromAlpha(QPoint pos) { |
914 |
void MyWidget::MoveFromAlpha(QPoint pos) { |
909 |
move(pos); |
915 |
move(pos); |
910 |
if(alternatives) |
916 |
if(alternatives) |
911 |
alternatives->hide(); |
917 |
showAlternatives(false); |
912 |
} |
918 |
} |
913 |
|
919 |
|
914 |
void MyWidget::setAlwaysShow(bool alwaysShow) { |
920 |
void MyWidget::setAlwaysShow(bool alwaysShow) { |
Lines 1104-1110
Link Here
|
1104 |
|
1110 |
|
1105 |
void MyWidget::mousePressEvent(QMouseEvent *e) |
1111 |
void MyWidget::mousePressEvent(QMouseEvent *e) |
1106 |
{ |
1112 |
{ |
1107 |
//alternatives->hide(); |
1113 |
//showAlternatives(false); |
1108 |
activateWindow(); |
1114 |
activateWindow(); |
1109 |
raise(); |
1115 |
raise(); |
1110 |
showAlternatives(false); |
1116 |
showAlternatives(false); |
Lines 1148-1154
Link Here
|
1148 |
|
1154 |
|
1149 |
void MyWidget::menuOptions() { |
1155 |
void MyWidget::menuOptions() { |
1150 |
dropTimer->stop(); |
1156 |
dropTimer->stop(); |
1151 |
alternatives->hide(); |
1157 |
showAlternatives(false); |
1152 |
optionsOpen = true; |
1158 |
optionsOpen = true; |
1153 |
OptionsDlg ops(this); |
1159 |
OptionsDlg ops(this); |
1154 |
ops.setObjectName("options"); |
1160 |
ops.setObjectName("options"); |
Lines 1259-1265
Link Here
|
1259 |
|
1265 |
|
1260 |
void MyWidget::showLaunchy(bool now) { |
1266 |
void MyWidget::showLaunchy(bool now) { |
1261 |
shouldDonate(); |
1267 |
shouldDonate(); |
1262 |
alternatives->hide(); |
1268 |
showAlternatives(false); |
1263 |
|
1269 |
|
1264 |
|
1270 |
|
1265 |
|
1271 |
|