|
|
|
@ -62,16 +62,16 @@ Katapult::Katapult()
|
|
|
|
|
|
|
|
|
|
settings = new KatapultSettings();
|
|
|
|
|
helpmenu = new KHelpMenu(this,TQString(),false);
|
|
|
|
|
connect(helpmenu, TQT_SIGNAL(showAboutApplication()),this, TQT_SLOT(showAboutDialog()));
|
|
|
|
|
connect(helpmenu, TQ_SIGNAL(showAboutApplication()),this, TQ_SLOT(showAboutDialog()));
|
|
|
|
|
|
|
|
|
|
hideTimer = new TQTimer(this);
|
|
|
|
|
connect(hideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hideLauncher()));
|
|
|
|
|
connect(hideTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(hideLauncher()));
|
|
|
|
|
clearTimer = new TQTimer(this);
|
|
|
|
|
connect(clearTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearQuery()));
|
|
|
|
|
connect(clearTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(clearQuery()));
|
|
|
|
|
|
|
|
|
|
connect(settings, TQT_SIGNAL(catalogsChanged()), this, TQT_SLOT(loadCatalogPlugins()));
|
|
|
|
|
connect(settings, TQT_SIGNAL(displayChanged()), this, TQT_SLOT(initDisplay()));
|
|
|
|
|
connect(settings, TQT_SIGNAL(systrayChanged()), this, TQT_SLOT(updateSystray()));
|
|
|
|
|
connect(settings, TQ_SIGNAL(catalogsChanged()), this, TQ_SLOT(loadCatalogPlugins()));
|
|
|
|
|
connect(settings, TQ_SIGNAL(displayChanged()), this, TQ_SLOT(initDisplay()));
|
|
|
|
|
connect(settings, TQ_SIGNAL(systrayChanged()), this, TQ_SLOT(updateSystray()));
|
|
|
|
|
|
|
|
|
|
loadCatalogPlugins();
|
|
|
|
|
initDisplay();
|
|
|
|
@ -111,8 +111,8 @@ void Katapult::initDisplay()
|
|
|
|
|
} else {
|
|
|
|
|
initAccel(display);
|
|
|
|
|
setQuery("");
|
|
|
|
|
connect(display, TQT_SIGNAL(keyReleased(TQKeyEvent *)), this, TQT_SLOT(keyReleased(TQKeyEvent *)));
|
|
|
|
|
connect(display, TQT_SIGNAL(focusOut()), this, TQT_SLOT(hideLauncher()));
|
|
|
|
|
connect(display, TQ_SIGNAL(keyReleased(TQKeyEvent *)), this, TQ_SLOT(keyReleased(TQKeyEvent *)));
|
|
|
|
|
connect(display, TQ_SIGNAL(focusOut()), this, TQ_SLOT(hideLauncher()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -120,7 +120,7 @@ void Katapult::initAccel(TQWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
globalAccel = new TDEGlobalAccel(parent);
|
|
|
|
|
globalAccel->insert("show_katapult", i18n("Show Launcher"), i18n("Shows the Katapult launcher"), ALT+Key_Space, ALT+Key_Space,
|
|
|
|
|
this, TQT_SLOT(showLauncher()));
|
|
|
|
|
this, TQ_SLOT(showLauncher()));
|
|
|
|
|
globalAccel->readSettings();
|
|
|
|
|
globalAccel->updateConnections();
|
|
|
|
|
|
|
|
|
@ -129,23 +129,23 @@ void Katapult::initAccel(TQWidget *parent)
|
|
|
|
|
|
|
|
|
|
contextMenu()->clear();
|
|
|
|
|
|
|
|
|
|
new TDEAction(i18n("Execute"), "application-x-executable", Key_Return, this, TQT_SLOT(execute()), actions, "execute");
|
|
|
|
|
new TDEAction(i18n("Clear"), "edit-clear", Key_Left, this, TQT_SLOT(clearQuery()), actions, "clear");
|
|
|
|
|
new TDEAction(i18n("Close"), "window-close", Key_Escape, this, TQT_SLOT(hideLauncher()), actions, "close");
|
|
|
|
|
new TDEAction(i18n("Complete Query"), "next", Key_Right, this, TQT_SLOT(completeQuery()), actions, "complete_query");
|
|
|
|
|
new TDEAction(i18n("Show Context Menu"), "menu", CTRL+Key_C, this, TQT_SLOT(showContextMenu()), actions, "show_menu");
|
|
|
|
|
new TDEAction(i18n("Execute"), "application-x-executable", Key_Return, this, TQ_SLOT(execute()), actions, "execute");
|
|
|
|
|
new TDEAction(i18n("Clear"), "edit-clear", Key_Left, this, TQ_SLOT(clearQuery()), actions, "clear");
|
|
|
|
|
new TDEAction(i18n("Close"), "window-close", Key_Escape, this, TQ_SLOT(hideLauncher()), actions, "close");
|
|
|
|
|
new TDEAction(i18n("Complete Query"), "next", Key_Right, this, TQ_SLOT(completeQuery()), actions, "complete_query");
|
|
|
|
|
new TDEAction(i18n("Show Context Menu"), "menu", CTRL+Key_C, this, TQ_SLOT(showContextMenu()), actions, "show_menu");
|
|
|
|
|
|
|
|
|
|
TDEAction *actGlobAccel = KStdAction::keyBindings(this, TQT_SLOT(showGlobalShortcutsDialog()), actions);
|
|
|
|
|
TDEAction *actGlobAccel = KStdAction::keyBindings(this, TQ_SLOT(showGlobalShortcutsDialog()), actions);
|
|
|
|
|
actGlobAccel->setText(i18n("Configure &Global Shortcuts..."));
|
|
|
|
|
actGlobAccel->plug((TQWidget *) contextMenu());
|
|
|
|
|
|
|
|
|
|
KStdAction::keyBindings(this, TQT_SLOT(showShortcutsDialog()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
KStdAction::preferences(settings, TQT_SLOT(configure()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
KStdAction::keyBindings(this, TQ_SLOT(showShortcutsDialog()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
KStdAction::preferences(settings, TQ_SLOT(configure()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
|
|
|
|
|
contextMenu()->insertItem(SmallIconSet("help"), KStdGuiItem::help().text(), helpmenu->menu());
|
|
|
|
|
contextMenu()->insertSeparator();
|
|
|
|
|
|
|
|
|
|
KStdAction::quit(this, TQT_SLOT(close()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
KStdAction::quit(this, TQ_SLOT(close()), actions)->plug((TQWidget *) contextMenu());
|
|
|
|
|
|
|
|
|
|
actions->readShortcutSettings();
|
|
|
|
|
}
|
|
|
|
@ -218,7 +218,7 @@ void Katapult::setQuery(TQString _query)
|
|
|
|
|
if(!bestMatch.isNull()) {
|
|
|
|
|
TQPtrList<KatapultAction> itemActions = ActionRegistry::self()->actionsForItem(bestMatch.item());
|
|
|
|
|
action = itemActions.at(0);
|
|
|
|
|
connect(bestMatch.item(), TQT_SIGNAL(itemChanged()), this, TQT_SLOT(updateDisplay()));
|
|
|
|
|
connect(bestMatch.item(), TQ_SIGNAL(itemChanged()), this, TQ_SLOT(updateDisplay()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!(allStatus & S_HasResults) && allStatus & S_Active) {
|
|
|
|
|