From de7e5867a65e0a46f1388e3e50bc7eeddd1aecbf Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:02:02 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kicker/applets/clock/Makefile.am | 2 +- kicker/applets/clock/clock.cpp | 8 +- kicker/applets/clock/clock.h | 2 +- kicker/applets/clock/init.cpp | 4 +- kicker/applets/clock/prefs.kcfgc | 2 +- kicker/applets/clock/zone.cpp | 2 +- kicker/applets/launcher/CMakeLists.txt | 4 +- kicker/applets/launcher/ChangeLog | 8 +- kicker/applets/launcher/Makefile.am | 10 +- kicker/applets/launcher/ToDo | 2 +- kicker/applets/launcher/configdlg.h | 2 +- kicker/applets/launcher/popularity.cpp | 2 +- kicker/applets/launcher/prefs.kcfgc | 2 +- kicker/applets/launcher/quicklauncher.cpp | 1130 --------------------- kicker/applets/launcher/quicklauncher.desktop | 140 --- kicker/applets/launcher/quicklauncher.h | 138 --- kicker/applets/launcher/quictdelauncher.cpp | 1130 +++++++++++++++++++++ kicker/applets/launcher/quictdelauncher.desktop | 140 +++ kicker/applets/launcher/quictdelauncher.h | 138 +++ kicker/applets/lockout/lockout.cpp | 4 +- kicker/applets/media/mediaapplet.cpp | 2 +- kicker/applets/media/mediaapplet.h | 4 +- kicker/applets/media/mediumbutton.h | 2 +- kicker/applets/media/preferencesdialog.cpp | 2 +- kicker/applets/media/preferencesdialog.h | 2 +- kicker/applets/menu/menuapplet.cpp | 2 +- kicker/applets/minipager/Makefile.am | 2 +- kicker/applets/naughty/NaughtyApplet.cpp | 2 +- kicker/applets/run/CMakeLists.txt | 2 +- kicker/applets/run/runapplet.cpp | 2 +- kicker/applets/swallow/swallow.cpp | 2 +- kicker/applets/systemtray/Makefile.am | 2 +- kicker/applets/systemtray/systemtrayapplet.cpp | 2 +- kicker/applets/taskbar/Makefile.am | 2 +- kicker/applets/trash/trashapplet.cpp | 2 +- kicker/applets/trash/trashbutton.cpp | 2 +- kicker/applets/trash/trashbutton.h | 2 +- kicker/extensions/dockbar/dockbarextension.cpp | 2 +- kicker/extensions/kasbar/kasbarapp.cpp | 2 +- kicker/extensions/kasbar/kasbarextension.cpp | 2 +- kicker/extensions/kasbar/kasprefsdlg.cpp | 2 +- kicker/extensions/kasbar/kastasker.cpp | 4 +- kicker/kicker/CMakeLists.txt | 8 +- kicker/kicker/Makefile.am | 8 +- kicker/kicker/buttons/browserbutton.cpp | 4 +- kicker/kicker/buttons/desktopbutton.cpp | 2 +- kicker/kicker/buttons/extensionbutton.cpp | 2 +- kicker/kicker/buttons/nonkdeappbutton.cpp | 2 +- kicker/kicker/buttons/servicemenubutton.cpp | 2 +- kicker/kicker/buttons/urlbutton.cpp | 2 +- kicker/kicker/core/container_applet.cpp | 2 +- kicker/kicker/core/container_base.cpp | 2 +- kicker/kicker/core/container_button.cpp | 2 +- kicker/kicker/core/container_extension.cpp | 2 +- kicker/kicker/core/containerarea.cpp | 2 +- kicker/kicker/core/extensionmanager.cpp | 6 +- kicker/kicker/core/kicker.cpp | 2 +- kicker/kicker/core/main.cpp | 2 +- kicker/kicker/core/panelextension.cpp | 2 +- kicker/kicker/kcmkicker.desktop | 2 +- kicker/kicker/kicker-3.4-reverseLayout.cpp | 10 +- kicker/kicker/kicker-3.5-kconfigXTize.pl | 37 - kicker/kicker/kicker-3.5-tdeconfigXTize.pl | 37 + kicker/kicker/kickerrc.upd | 4 +- kicker/kicker/ui/browser_dlg.cpp | 2 +- kicker/kicker/ui/browser_mnu.cpp | 6 +- kicker/kicker/ui/itemview.cpp | 2 +- kicker/kicker/ui/k_mnu.cpp | 2 +- kicker/kicker/ui/k_new_mnu.cpp | 12 +- kicker/kicker/ui/service_mnu.cpp | 2 +- kicker/libkicker/CMakeLists.txt | 2 +- kicker/libkicker/global.cpp | 2 +- kicker/libkicker/panelbutton.cpp | 2 +- kicker/menuext/kate/katesessionmenu.cpp | 2 +- kicker/menuext/konq-profiles/CMakeLists.txt | 2 +- kicker/menuext/konq-profiles/konqy_menu.cpp | 2 +- kicker/menuext/konsole/CMakeLists.txt | 2 +- kicker/menuext/konsole/konsole_mnu.cpp | 2 +- kicker/menuext/konsole/konsolebookmarkhandler.cpp | 4 +- kicker/menuext/konsole/konsolebookmarkhandler.h | 2 +- kicker/menuext/recentdocs/CMakeLists.txt | 2 +- kicker/menuext/system/systemmenu.h | 2 +- kicker/menuext/tdeprint/print_mnu.cpp | 2 +- kicker/taskmanager/taskmanager.cpp | 2 +- 84 files changed, 1558 insertions(+), 1558 deletions(-) delete mode 100644 kicker/applets/launcher/quicklauncher.cpp delete mode 100644 kicker/applets/launcher/quicklauncher.desktop delete mode 100644 kicker/applets/launcher/quicklauncher.h create mode 100644 kicker/applets/launcher/quictdelauncher.cpp create mode 100644 kicker/applets/launcher/quictdelauncher.desktop create mode 100644 kicker/applets/launcher/quictdelauncher.h delete mode 100755 kicker/kicker/kicker-3.5-kconfigXTize.pl create mode 100755 kicker/kicker/kicker-3.5-tdeconfigXTize.pl (limited to 'kicker') diff --git a/kicker/applets/clock/Makefile.am b/kicker/applets/clock/Makefile.am index 15bde61cf..fbb8ec319 100644 --- a/kicker/applets/clock/Makefile.am +++ b/kicker/applets/clock/Makefile.am @@ -19,7 +19,7 @@ clock_panelapplet_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) clock_panelapplet_la_LIBADD = ../../libkicker/libkickermain.la $(LIB_TDEUI) srcdoc: - kdoc -a -p -H -d $$HOME/web/src/clockapplet clockapplet *.h -lqt -ltdecore -ltdeui -lkfile + kdoc -a -p -H -d $$HOME/web/src/clockapplet clockapplet *.h -lqt -ltdecore -ltdeui -ltdefile messages: rc.cpp $(XGETTEXT) *.cpp *.h -o $(podir)/clockapplet.pot diff --git a/kicker/applets/clock/clock.cpp b/kicker/applets/clock/clock.cpp index 35dccf148..f9dd63e9e 100644 --- a/kicker/applets/clock/clock.cpp +++ b/kicker/applets/clock/clock.cpp @@ -47,10 +47,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -1518,12 +1518,12 @@ void ClockApplet::contextMenuActivated(int result) proc << locate("exe", "tdesu"); proc << "--nonewdcop"; proc << TQString("%1 tde-clock.desktop --lang %2") - .arg(locate("exe", "kcmshell")) + .arg(locate("exe", "tdecmshell")) .arg(TDEGlobal::locale()->language()); proc.start(TDEProcess::DontCare); break; case 104: - proc << locate("exe", "kcmshell"); + proc << locate("exe", "tdecmshell"); proc << "tde-language.desktop"; proc.start(TDEProcess::DontCare); break; diff --git a/kicker/applets/clock/clock.h b/kicker/applets/clock/clock.h index 9a80c24b6..34d73cf83 100644 --- a/kicker/applets/clock/clock.h +++ b/kicker/applets/clock/clock.h @@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include "settings.h" diff --git a/kicker/applets/clock/init.cpp b/kicker/applets/clock/init.cpp index 9b89da87d..8cf336866 100644 --- a/kicker/applets/clock/init.cpp +++ b/kicker/applets/clock/init.cpp @@ -47,10 +47,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/kicker/applets/clock/prefs.kcfgc b/kicker/applets/clock/prefs.kcfgc index 890209526..fff5e1cad 100644 --- a/kicker/applets/clock/prefs.kcfgc +++ b/kicker/applets/clock/prefs.kcfgc @@ -1,4 +1,4 @@ -# Code generation options for kconfig_compiler +# Code generation options for tdeconfig_compiler File=clockapplet.kcfg ClassName=Prefs Singleton=false diff --git a/kicker/applets/clock/zone.cpp b/kicker/applets/clock/zone.cpp index bf007c933..c43b76db1 100644 --- a/kicker/applets/clock/zone.cpp +++ b/kicker/applets/clock/zone.cpp @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "zone.h" #include -#include +#include #include #include #include diff --git a/kicker/applets/launcher/CMakeLists.txt b/kicker/applets/launcher/CMakeLists.txt index bf5111658..c022762c0 100644 --- a/kicker/applets/launcher/CMakeLists.txt +++ b/kicker/applets/launcher/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES quicklauncher.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/applets ) +install( FILES quictdelauncher.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/applets ) install( FILES launcherapplet.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) @@ -37,7 +37,7 @@ install( FILES launcherapplet.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) tde_add_kpart( launcher_panelapplet AUTOMOC SOURCES - quicklauncher.skel quicklauncher.cpp quickbutton.cpp + quictdelauncher.skel quictdelauncher.cpp quickbutton.cpp quickaddappsmenu.cpp flowgridmanager.cpp popularity.cpp configdlgbase.ui prefs.kcfgc configdlg.cpp LINK diff --git a/kicker/applets/launcher/ChangeLog b/kicker/applets/launcher/ChangeLog index b86dbd7aa..1144a8c35 100644 --- a/kicker/applets/launcher/ChangeLog +++ b/kicker/applets/launcher/ChangeLog @@ -4,9 +4,9 @@ * Empty panel now has size>0, so user can still drop icons on it. * Fixed gcc 3.4 incompatibilities in EasyVector * Fixed Drag and Drop Bugs : - * Crash when non-url dropped on quicklauncher - * Crash panel button dropped on quicklauncher - * Able to drop objects when quicklauncher is locked + * Crash when non-url dropped on quictdelauncher + * Crash panel button dropped on quictdelauncher + * Able to drop objects when quictdelauncher is locked * Add application context menu now inserts new app at current location 2004-06-14 Dan Bullok @@ -28,7 +28,7 @@ * Spouts tons of debugging info to kdDebug (for now). 2004-06-12 Dan Bullok - * Fixed bug #75351: Tooltips change to filenames after rearranging applications in quicklauncher. + * Fixed bug #75351: Tooltips change to filenames after rearranging applications in quictdelauncher. * Moved the URL->(menuID,service,kurl) functionality from the QuickButton constructor to its own class: QuickURL. Very similar code is used elsewhere in kicker, and should eventually be merged. * Renamed some methods in QuickButton (getId -> menuId, getURL -> url) This matches the predominant KDE naming style. * Groundwork laid for variable-sized buttons. diff --git a/kicker/applets/launcher/Makefile.am b/kicker/applets/launcher/Makefile.am index a0384df4f..1e586e0dd 100644 --- a/kicker/applets/launcher/Makefile.am +++ b/kicker/applets/launcher/Makefile.am @@ -3,13 +3,13 @@ INCLUDES = -I$(top_srcdir)/kicker/libkicker -I$(top_srcdir)/kicker/kicker/ui $(a kde_module_LTLIBRARIES = launcher_panelapplet.la -launcher_panelapplet_la_SOURCES = quicklauncher.skel quicklauncher.cpp quickbutton.cpp quickaddappsmenu.cpp flowgridmanager.cpp popularity.cpp configdlgbase.ui prefs.kcfgc configdlg.cpp +launcher_panelapplet_la_SOURCES = quictdelauncher.skel quictdelauncher.cpp quickbutton.cpp quickaddappsmenu.cpp flowgridmanager.cpp popularity.cpp configdlgbase.ui prefs.kcfgc configdlg.cpp METASOURCES = AUTO -noinst_HEADERS = quicklauncher.h quickbutton.h quickaddappsmenu.h easyvector.h quickbuttongroup.h flowgridmanager.h popularity.h configdlg.h +noinst_HEADERS = quictdelauncher.h quickbutton.h quickaddappsmenu.h easyvector.h quickbuttongroup.h flowgridmanager.h popularity.h configdlg.h lnkdir = $(kde_datadir)/kicker/applets -lnk_DATA = quicklauncher.desktop +lnk_DATA = quictdelauncher.desktop EXTRA_DIST = $(lnk_DATA) @@ -21,7 +21,7 @@ launcher_panelapplet_la_LIBADD = ../../kicker/core/libkicker_core.la ../../kick kde_kcfg_DATA = launcherapplet.kcfg messages: rc.cpp - $(XGETTEXT) *.cpp *.h -o $(podir)/quicklauncher.pot + $(XGETTEXT) *.cpp *.h -o $(podir)/quictdelauncher.pot srcdoc: - kdoc -a -p -H -d $$HOME/web/src/quicklauncher quicklauncher *.h -lqt -ltdecore -ltdeui + kdoc -a -p -H -d $$HOME/web/src/quictdelauncher quictdelauncher *.h -lqt -ltdecore -ltdeui diff --git a/kicker/applets/launcher/ToDo b/kicker/applets/launcher/ToDo index c7c852a36..1f3932b08 100644 --- a/kicker/applets/launcher/ToDo +++ b/kicker/applets/launcher/ToDo @@ -3,6 +3,6 @@ TODO: x * Remove debugging code (makes everything slow). * Tooltip or other popup to alert user that buttons are locked (with a "don't show this again" checkbox). * Docs. - * Use old quicklauncher config file if found. #77959 + * Use old quictdelauncher config file if found. #77959 X * "Add application" context menu should add the new application at the index of the button that summoned the context menu. X * Make sure to always have a little space to drop things on, even when there are no buttons. diff --git a/kicker/applets/launcher/configdlg.h b/kicker/applets/launcher/configdlg.h index e5fdbe34b..b96caf459 100644 --- a/kicker/applets/launcher/configdlg.h +++ b/kicker/applets/launcher/configdlg.h @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef CONFIG_DLG_H #define CONFIG_DLG_H -#include +#include class ConfigDlgBase; class Prefs; diff --git a/kicker/applets/launcher/popularity.cpp b/kicker/applets/launcher/popularity.cpp index a22a98c99..f38062e5b 100644 --- a/kicker/applets/launcher/popularity.cpp +++ b/kicker/applets/launcher/popularity.cpp @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/applets/launcher/prefs.kcfgc b/kicker/applets/launcher/prefs.kcfgc index 243e97868..8a605b327 100644 --- a/kicker/applets/launcher/prefs.kcfgc +++ b/kicker/applets/launcher/prefs.kcfgc @@ -1,4 +1,4 @@ -# Code generation options for kconfig_compiler +# Code generation options for tdeconfig_compiler File=launcherapplet.kcfg ClassName=Prefs Singleton=false diff --git a/kicker/applets/launcher/quicklauncher.cpp b/kicker/applets/launcher/quicklauncher.cpp deleted file mode 100644 index e5658f1cb..000000000 --- a/kicker/applets/launcher/quicklauncher.cpp +++ /dev/null @@ -1,1130 +0,0 @@ -/***************************************************************** - -Copyright (c) 2000 Bill Nagel -Copyright (c) 2004 Dan Bullok - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include - -#include "configdlg.h" -#include "popularity.h" -#include "quicklauncher.h" -#include "quickbutton.h" -#include "quickaddappsmenu.h" -#include "quickbuttongroup.h" - -typedef ButtonGroup::iterator ButtonIter; -const ButtonGroup::Index NotFound=ButtonGroup::NotFound; -const ButtonGroup::Index Append=ButtonGroup::Append; - -#ifdef DEBUG - #define DEBUGSTR kdDebug() -#else - #define DEBUGSTR kndDebug() -#endif - -extern "C" -{ - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) - { - TDEGlobal::locale()->insertCatalogue("quicklauncher"); - return new QuickLauncher(configFile, KPanelApplet::Normal, - KPanelApplet::Preferences, - parent, "quicklauncher"); - } -} - -QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions, - TQWidget *parent, const char *name) : - KPanelApplet(configFile, type, actions, parent, name) -{ - DCOPObject::setObjId("QuickLauncherApplet"); - DEBUGSTR << endl << endl << endl << "------------" << flush; - DEBUGSTR << "QuickLauncher::QuickLauncher(" << configFile << ",...)" << - endl << flush; - - m_settings = new Prefs(sharedConfig()); - m_settings->readConfig(); - - m_needsSave = false; - m_needsRefresh = false; - m_refreshEnabled = false; - - m_configDialog = 0; - m_popup = 0; - m_appletPopup = 0; - m_removeAppsMenu = 0; - - m_dragAccepted = false; - - m_buttons = new ButtonGroup; - m_manager = new FlowGridManager; - m_newButtons = 0; - m_oldButtons = 0; - m_dragButtons = 0; - - m_configAction = new KAction(i18n("Configure Quicklauncher..."), "configure", KShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), TQT_TQOBJECT(this)); - - m_saveTimer = new TQTimer(this, "m_saveTimer"); - connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig())); - - m_popularity = new PopularityStatistics(); - - setBackgroundOrigin(AncestorOrigin); - - loadConfig(); - - buildPopupMenu(); - m_minPanelDim = std::max(16, m_settings->iconDimChoices()[1]); - refreshContents(); - setRefreshEnabled(true); - - setAcceptDrops(true); - //TQToolTip::add(this, i18n("Drop applications here")); - DEBUGSTR << " QuickLauncher::QuickLauncher(" << configFile << - ",...) END" << endl << flush; - - DCOPClient *dcopClient = TDEApplication::dcopClient(); - dcopClient->connectDCOPSignal(0, "appLauncher", - "serviceStartedByStorageId(TQString,TQString)", - "QuickLauncherApplet", - "serviceStartedByStorageId(TQString,TQString)", - false); - kdDebug() << "Quicklauncher registered DCOP signal" << endl; -} - - -//TODO:? Drag/drop more than one item at a time - -QuickLauncher::~QuickLauncher() -{ - TDEGlobal::locale()->removeCatalogue("quicklauncher"); - setCustomMenu(0); - delete m_popup; - delete m_appletPopup; - delete m_removeAppsMenu; - delete m_popularity; - clearTempButtons(); - if (m_buttons) - { - m_buttons->deleteContents(); - delete m_buttons; - } -} - -// Builds, connects _popup menu -void QuickLauncher::buildPopupMenu() -{ - QuickAddAppsMenu *addAppsMenu = new QuickAddAppsMenu(this, this); - m_popup = new TQPopupMenu(this); - m_popup->insertItem(i18n("Add Application"), addAppsMenu); - m_configAction->plug(m_popup); - - m_appletPopup = new TQPopupMenu(this); - m_appletPopup->insertItem(i18n("Add Application"), addAppsMenu); - m_removeAppsMenu = new TQPopupMenu(this); - connect(m_removeAppsMenu, TQT_SIGNAL(aboutToShow()), - TQT_SLOT(fillRemoveAppsMenu())); - connect(m_removeAppsMenu, TQT_SIGNAL(activated(int)), - TQT_SLOT(removeAppManually(int))); - m_appletPopup->insertItem(i18n("Remove Application"), m_removeAppsMenu); - - m_appletPopup->insertSeparator(); - m_appletPopup->setCheckable( true ); - m_appletPopup->insertItem(i18n("About"), this, TQT_SLOT(about())); - setCustomMenu(m_appletPopup); -} - - -// Fill the remove apps menu -void QuickLauncher::fillRemoveAppsMenu() -{ - m_removeAppsMenu->clear(); - ButtonIter iter(m_buttons->begin()); - int i = 0; - while (iter != m_buttons->end()) - { - TQString text = TQToolTip::textFor(*iter); - if (text.isEmpty()) - { - text = (*iter)->url(); - if (text.isEmpty()) - { - text = i18n("Unknown"); - } - } - m_removeAppsMenu->insertItem((*iter)->icon(), text, i); - ++iter; - ++i; - } -} - -void QuickLauncher::slotSettingsDialogChanged() -{ - // Update conserve space setting - setConserveSpace(m_settings->conserveSpace()); - m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); - slotAdjustToCurrentPopularity(); - kdDebug() << "Icon size: " << m_settings->iconDim() << endl; - refreshContents(); - - saveConfig(); -} - -void QuickLauncher::action(Action a) -{ - if (a == KPanelApplet::Preferences) - { - slotConfigure(); - } - else - { - KPanelApplet::action(a); - } -} - -void QuickLauncher::slotConfigure() -{ - if (!m_configDialog) - { - m_configDialog = new ConfigDlg(this, "configdialog", - m_settings, SIZE_AUTO, KDialogBase::Plain, KDialogBase::Ok | - KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Default); - connect(m_configDialog, TQT_SIGNAL(settingsChanged()), - this, TQT_SLOT(slotSettingsDialogChanged())); - } - - m_configDialog->show(); -} - - -int QuickLauncher::findApp(QuickButton *button) -{ - if (m_buttons->empty()) - { - return NotFound; - } - int pos = m_buttons->findValue(button); - return pos; -} - - -int QuickLauncher::findApp(TQString url) -{ - if (m_buttons->empty()) - { - return NotFound; - } - int pos=m_buttons->findDescriptor(url); - return pos; -} - -void QuickLauncher::removeAppManually(int index) -{ - removeApp(index, true); -} - -void QuickLauncher::removeApp(int index, bool manuallyRemoved) -{ - if (m_buttons->empty()) - { - return; - } - if (!m_buttons->isValidIndex(index)) - { - kdWarning() << " removeApp (" << index << - ") *******WARNING****** index=" << index << "is out of bounds." << - endl << flush; - return; - } - DEBUGSTR << "Removing button. index=" << index << " url='" << - (*m_buttons)[index]->url() << "'" << endl << flush; - - TQString removeAppUrl = (*m_buttons)[index]->url(); - TQString removeAppMenuId = (*m_buttons)[index]->menuId(); - - if (removeAppUrl == "SPECIAL_BUTTON__SHOW_DESKTOP") { - m_settings->setShowDesktopEnabled(false); - } - - delete (*m_buttons)[index]; - m_buttons->eraseAt(index); - refreshContents(); - - if (int(m_buttons->size()) < m_settings->autoAdjustMinItems() && manuallyRemoved) - { - m_settings->setAutoAdjustMinItems(m_buttons->size()); - } - - if (manuallyRemoved) - { - m_popularity->moveToBottom(removeAppMenuId); - slotAdjustToCurrentPopularity(); - } - - saveConfig(); -} - - -void QuickLauncher::removeApp(TQString url, bool manuallyRemoved) -{ - int index = findApp(url); - if (index == NotFound) - { - kdDebug() << "removeApp: Not found: " << url << endl; - return; - } - removeApp(index, manuallyRemoved); -} - - -void QuickLauncher::removeAppManually(QuickButton *button) -{ - int index = findApp(button); - if (index == NotFound) - { - return; - } - removeApp(index, true); -} - - -int QuickLauncher::widthForHeight(int h) const -{ - FlowGridManager temp_manager = *m_manager; - temp_manager.setFrameSize(TQSize(h,h)); - temp_manager.setOrientation(Qt::Horizontal); // ??? probably not necessary - if (temp_manager.isValid()) - { - return temp_manager.frameSize().width(); - } - return m_minPanelDim; -} - - -int QuickLauncher::heightForWidth(int w) const -{ - FlowGridManager temp_manager=*m_manager; - temp_manager.setFrameSize(TQSize(w,w)); - temp_manager.setOrientation(Qt::Vertical); // ??? probably not necessary - if (temp_manager.isValid()) - { - return temp_manager.frameSize().height(); - } - return m_minPanelDim; -} - - -int QuickLauncher::dimension() const -{ - if (orientation()==Qt::Vertical) - { - return size().width(); - } - return size().height(); -} - -void QuickLauncher::addApp(TQString url, bool manuallyAdded) -{ - assert(m_buttons); - TQString newButtonId = QuickURL(url).menuId(); - if (m_appOrdering.find(newButtonId) == m_appOrdering.end()) - { - m_appOrdering[newButtonId] = m_appOrdering.size(); - } - uint appPos; - for (appPos = 0; appPos < m_buttons->size(); ++appPos) - { - TQString buttonId = (*m_buttons)[appPos]->menuId(); - if (m_appOrdering[buttonId] >= m_appOrdering[newButtonId]) - { - break; - } - } - addApp(url, appPos, manuallyAdded); -} - -QuickButton* QuickLauncher::createButton(TQString url) -{ - QuickButton* newButton=new QuickButton(url, m_configAction, this); - connect(newButton, TQT_SIGNAL(executed(TQString)), - this, TQT_SLOT(slotOwnServiceExecuted(TQString))); - connect(newButton, TQT_SIGNAL(stickyToggled(bool)), - this, TQT_SLOT(slotStickyToggled())); - newButton->setPopupDirection(popupDirection()); - return newButton; -} - -void QuickLauncher::addApp(TQString url, int index, bool manuallyAdded) -{ - DEBUGSTR << endl <<"About to add: url='" << url << - "' index=" << index << endl << flush; - QuickButton *newButton; - if (!m_buttons->isValidInsertIndex(index)) - { - kdWarning() << " *******WARNING****** index=" << index << - "is out of bounds." << endl << flush; - index = m_buttons->lastIndex(); - } - int old = findApp(QuickURL(url).url()); - if (old != NotFound) - { - if (index == old) - { - return; - } - if (index > old) - { - index--; - } - newButton = (*m_buttons)[old]; - m_buttons->eraseAt(old); - } - else - { - newButton = createButton(url); - } - m_buttons->insertAt(index, newButton); - DEBUGSTR << "Added: url='"<size(); ++n) - { - TQString buttonId = (*m_buttons)[n]->menuId(); - appList.push_back(buttonId); - if (m_appOrdering.find(buttonId) == m_appOrdering.end()) - { - m_appOrdering[buttonId] = m_appOrdering.size(); - } - posList.insert(m_appOrdering[buttonId]); - //kdDebug() << m_appOrdering[buttonId] << " = " << buttonId << endl; - } - //kdDebug() << "After:" << endl; - while (posList.size() > 0) - { - assert(appList.size() > 0); - m_appOrdering[*appList.begin()] = *posList.begin(); - kdDebug() << *posList.begin() << " = " << *appList.begin() << endl; - posList.erase(posList.begin()); - appList.pop_front(); - } - //kdDebug() << "Done." << endl; -} - -void QuickLauncher::addAppBeforeManually(TQString url, TQString sender) -{ - if (sender.isNull()) - { - addApp(url, Append, true); - } - int pos = findApp(sender); - if (pos < 0) - { - pos = Append; - } - DEBUGSTR << "QuickLauncher::addAppBefore(" << url << - "," << sender << "): pos=" << pos << endl << flush; - addApp(url, pos, true); -} - - -void QuickLauncher::about() -{ - TDEAboutData about("quicklauncher", I18N_NOOP("Quick Launcher"), "2.0", - I18N_NOOP("A simple application launcher"), - TDEAboutData::License_GPL_V2, - "(C) 2000 Bill Nagel\n(C) 2004 Dan Bullok\n(C) 2005 Fred Schaettgen"); - KAboutApplication a(&about, this); - a.exec(); -} - - -void QuickLauncher::mousePressEvent(TQMouseEvent *e) -{ - if (e->button() == Qt::RightButton) - { - m_popup->popup(e->globalPos()); - } -} - -void QuickLauncher::resizeEvent(TQResizeEvent*) -{ - refreshContents(); -} - -void QuickLauncher::dragEnterEvent(TQDragEnterEvent *e) -{ - DEBUGSTR << "QuickLauncher::dragEnterEvent(pos=" << e->pos() << - " type=" << e->type() << ")" << endl << flush; - m_dragAccepted=false; - KURL::List kurlList; - if (!isDragEnabled() || !KURLDrag::decode(e, kurlList)) - { - e->accept(false); - return; - } - - if (kurlList.size()<=0) - { - e->accept(false); - return; - } - m_dragButtons=new ButtonGroup; - m_oldButtons=new ButtonGroup(*m_buttons); - - TQString url; - KURL::List::ConstIterator it = kurlList.begin(); - for ( ; it != kurlList.end(); ++it ) - { - url = QuickURL((*it).url()).url(); - kdDebug() << " Drag Object='"<findDescriptor(url); - if (pos != NotFound) - { - // if it's already in m_buttons, take it out - m_dragButtons->push_back(m_buttons->takeFrom(pos)); - } - else - { - // otherwise, create a new one - QuickButton* button = createButton(url); - button->setSticky(true); - m_dragButtons->push_back(button); - } - } - if (m_dragButtons->size() > 0) - { - //make sure we can drag at least one button. - m_dragAccepted=true; - m_newButtons=new ButtonGroup(*m_buttons); - m_dropPos=NotFound; - e->accept(true); - return; - } - e->accept(false); - clearTempButtons(); -} - - -void QuickLauncher::dragMoveEvent(TQDragMoveEvent *e) -{ - if (!m_dragAccepted) - { - kdWarning() << "QuickLauncher::dragMoveEvent: Drag is not accepted." << - m_dragAccepted << endl << flush; - e->accept(false); - return; - } - - e->accept(true); - int pos=m_manager->indexNearest(e->pos()); - if (pos == m_dropPos) - { - return;// Already been inserted here, no need to update - } - - if (m_newButtons->isValidInsertIndex(pos)) - { - mergeButtons(pos); - m_dropPos=pos; - } - refreshContents(); -} - - -void QuickLauncher::dragLeaveEvent(TQDragLeaveEvent *e) -{ - DEBUGSTR << "QuickLauncher::dragLeaveEvent(type=" << - e->type() << ")" << endl << flush; - if (!m_dragAccepted) - { - return; - } - - // No drop. Return to starting state. - std::swap(m_buttons,m_oldButtons); - clearTempButtons(); - - refreshContents(); - saveConfig(); -} - - -void QuickLauncher::dropEvent(TQDropEvent *e) -{ - DEBUGSTR << "QuickLauncher::dropEvent(pos=" << e->pos() << - " type=" << e->type() << ")" << endl << flush; - if (!m_dragAccepted) - { - e->accept(false); - return; - } - - if (e->source() == 0) - { - for (uint n=0; nsize(); ++n) - { - (*m_dragButtons)[n]->setSticky(true); - } - } - - clearTempButtons(); - refreshContents(); - saveConfig(); - updateInsertionPosToStatusQuo(); -} - -// insert dragbuttons at index in m_newButtons. Put result in m_buttons -void QuickLauncher::mergeButtons(int index) -{ - if (!m_newButtons->isValidInsertIndex(index)) - { - index=m_newButtons->size(); - } - - m_buttons->clear(); - (*m_buttons) = (*m_newButtons); - m_buttons->insertAt(index, *m_dragButtons); - refreshContents(); -} - -void QuickLauncher::clearTempButtons() -{ - std::set allButtons; - //put all the m_buttons in a set (removes duplicates automatically - if (m_newButtons) - { - allButtons.insert(m_newButtons->begin(),m_newButtons->end()); - } - if (m_oldButtons) - { - allButtons.insert(m_oldButtons->begin(),m_oldButtons->end()); - } - if (m_dragButtons) - { - allButtons.insert(m_dragButtons->begin(),m_dragButtons->end()); - } - - //delete temp ButtonGroups - delete m_newButtons; m_newButtons=0; - delete m_oldButtons; m_oldButtons=0; - delete m_dragButtons; m_dragButtons=0; - - //if an element allButtons is NOT in m_buttons (the ones we keep), delete it - std::set::iterator iter = allButtons.begin(); - while (iter != allButtons.end()) - { - if (findApp(*iter) == NotFound) - { - delete *iter; - } - ++iter; - } - m_dragAccepted = false; - m_dropPos = NotFound; -} - -void QuickLauncher::refreshContents() -{ - int idim, d(dimension()); - - // make sure show desktop setting is honored - TQStringList urls, volatileUrls; - ButtonIter iter = m_buttons->begin(); - while (iter != m_buttons->end()) { - if ((*iter)->sticky() == false) - { - volatileUrls.append((*iter)->menuId()); - } - urls.append((*iter)->menuId()); - ++iter; - } - if (m_settings->showDesktopEnabled()) { - if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) { - urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP"); - addApp("SPECIAL_BUTTON__SHOW_DESKTOP", 0, true); - } - } - else { - if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) { - urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP"); - removeApp("SPECIAL_BUTTON__SHOW_DESKTOP", true); - } - } - - // determine button size - if (m_settings->iconDim() == SIZE_AUTO) - { - if (d < 18) - { - idim = std::min(16,d); - } - else if (d < 64) - { - idim = 16; - } - else if (d < 80) - { - idim = 20; - } - else if (d < 122) - { - idim = 24; - } - else - { - idim = 28; - } - } - else - { - idim = std::min(m_settings->iconDim(), d - std::max((d/8)-1, 0) * 2); - } - m_space = std::max((idim/8)-1, 0); - m_border = m_space; - m_buttonSize = TQSize(idim, idim); - m_manager->setOrientation(orientation()); - m_manager->setNumItems(m_buttons->size()); - m_manager->setFrameSize(size()); - m_manager->setItemSize(m_buttonSize); - m_manager->setSpaceSize(TQSize(m_space, m_space)); - m_manager->setBorderSize(TQSize(m_border, m_border)); - if (!m_refreshEnabled) - { - m_needsRefresh=true; - return; - } - if (!m_manager->isValid()) - { - kdDebug()<dump(); - return; - } - - unsigned index; - TQPoint pos; - setUpdatesEnabled(false); - m_buttons->setUpdatesEnabled(false); - for (index = 0; index < m_buttons->size(); index++) - { - pos = m_manager->pos(index); - QuickButton *button = (*m_buttons)[index]; - button->resize(m_manager->itemSize()); - button->move(pos.x(), pos.y()); - button->setDragging(false); - button->setEnableDrag(isDragEnabled()); - button->setDynamicModeEnabled(m_settings->autoAdjustEnabled()); - } - if (m_newButtons) - { - m_newButtons->setDragging(false); - } - if (m_dragButtons) - { - m_dragButtons->setDragging(true); - } - m_buttons->show(); - setUpdatesEnabled(true); - update(); - m_buttons->setUpdatesEnabled(true); - updateGeometry(); - emit updateLayout(); - updateStickyHighlightLayer(); -} - - -void QuickLauncher::setDragEnabled(bool enable) -{ - m_settings->setDragEnabled(enable); -} - -void QuickLauncher::setConserveSpace(bool conserve_space) -{ - m_manager->setConserveSpace(conserve_space); - if (conserve_space) - { - m_manager->setSlack(FlowGridManager::SpaceSlack, - FlowGridManager::SpaceSlack); - } - else - { - m_manager->setSlack(FlowGridManager::ItemSlack, - FlowGridManager::ItemSlack); - } - refreshContents(); -} - -class SortByPopularity { -public: - bool operator()(const QuickLauncher::PopularityInfo& a, - const QuickLauncher::PopularityInfo& b) - { - return a.popularity < b.popularity; - } -}; - -void QuickLauncher::loadConfig() -{ - DEBUGSTR << "QuickLauncher::loadConfig()" << endl << flush; - //TDEConfig *c = config(); - //c->setGroup("General"); - setConserveSpace(m_settings->conserveSpace()); - setDragEnabled(m_settings->dragEnabled()); - /*DEBUGSTR << " IconDim="<size()); ++n) - { - QuickButton* button = (*m_buttons)[n]; - if (volatileButtons.contains(button->menuId()) == false) - { - button->setSticky(true); - } - button->setDynamicModeEnabled(m_settings->autoAdjustEnabled()); - } - - m_popularity->readConfig(m_settings); - m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); - - TQStringList serviceNames = m_settings->serviceNames(); - TQValueList insPos = m_settings->serviceInspos(); - for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n) - { - m_appOrdering[serviceNames[n]] = insPos[n]; - } -} - -void QuickLauncher::saveConfig() -{ - if (!m_refreshEnabled) - { - m_needsSave=true; - return; - } - TQStringList urls, volatileUrls; - ButtonIter iter = m_buttons->begin(); - while (iter != m_buttons->end()) { - if ((*iter)->sticky() == false) - { - volatileUrls.append((*iter)->menuId()); - } - urls.append((*iter)->menuId()); - ++iter; - } - m_settings->setButtons(urls); - kdDebug() << "SetButtons " << urls.join("/") << endl; - m_settings->setVolatileButtons(volatileUrls); - m_settings->setConserveSpace(m_manager->conserveSpace()); - m_settings->setDragEnabled(isDragEnabled()); - - m_popularity->writeConfig(m_settings); - - // m_popularity must have written the current service list by now - TQStringList serviceNames = m_settings->serviceNames(); - TQValueList insertionPositions; - for (int n=0; nsetServiceInspos(insertionPositions); - - m_settings->writeConfig(); -} - - -void QuickLauncher::setRefreshEnabled(bool enable) -{ - m_refreshEnabled=enable; - if (m_refreshEnabled) - { - if (m_needsSave) { - saveConfig(); - } - if (m_needsRefresh) { - refreshContents(); - } - } -} - -void QuickLauncher::serviceStartedByStorageId(TQString /*starter*/, TQString storageId) -{ - KService::Ptr service = KService::serviceByStorageId(storageId); - if (service->icon() == TQString::null) - { - kdDebug() << storageId << " has no icon. Makes no sense to add it."; - return; - } - QuickURL url = QuickURL(locate("apps", service->desktopEntryPath())); - TQString desktopMenuId(url.menuId()); - kdDebug() << "storageId=" << storageId << " desktopURL=" << desktopMenuId << endl; - // A service was started somwhere else. If the quicklauncher contains - // this service too, we flash the icon - QuickButton *startedButton = 0; - std::set buttonIdSet; - for (uint n = 0; n < m_buttons->size(); ++n) - { - QuickButton *button = (*m_buttons)[n]; - TQString buttonMenuId = button->menuId(); - buttonIdSet.insert(buttonMenuId); - if (desktopMenuId == buttonMenuId) - { - kdDebug() << "QuickLauncher: I know that one: " << storageId << endl; - button->flash(); - startedButton = button; - } - } - - // Update popularity info. - // We do this even if autoadjust is disabled - // so there are sane values to start with if it's turned on. - m_popularity->useService(desktopMenuId); - - if (m_settings->autoAdjustEnabled()) - { - TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); - } -} - -void QuickLauncher::slotAdjustToCurrentPopularity() -{ - // TODO: Shrink immediately if buttons->size() > maxItems - kdDebug() << "Starting popularity update" << endl; - PopularityStatistics* stats = m_popularity; - int minItems = m_settings->autoAdjustMinItems(); - int maxItems = m_settings->autoAdjustMaxItems(); - - static const double hysteresisFactor = 0.90; - double minAddPopularity = 0; - for (int n = 0; n < maxItems; ++n) - { - // All items with a popularity not less than 0.75 of the average - // of the first maxItems apps are included in the list - double belowAvgAllowed = 0.75; - minAddPopularity += (belowAvgAllowed * stats->popularityByRank(n)) / maxItems; - } - double minDelPopularity = minAddPopularity * hysteresisFactor; - std::map removeableApps; - std::set existingApps; - int numApps = m_buttons->size(); - for (int n = 0; n < int(m_buttons->size()); ++n) - { - QuickButton *button = (*m_buttons)[n]; - if (((stats->popularityByRank(stats->rankByService(button->menuId())) < - minDelPopularity) || m_settings->autoAdjustEnabled()==false) && - (button->sticky() == false)) - { - removeableApps[button->menuId()] = button; - --numApps; - } - existingApps.insert(button->menuId()); - } - for (int n = 0; - (numApps < minItems && stats->popularityByRank(n) > 0) || - (numApps < maxItems && stats->popularityByRank(n) > minAddPopularity); - ++n) - { - TQString app = m_popularity->serviceByRank(n); - if (existingApps.find(app) == existingApps.end()) - { - addApp(QuickURL(m_popularity->serviceByRank(n)).url(), false); - kdDebug() << "Adding app " << app << endl; - ++numApps; - } - else if (removeableApps.find(app) != removeableApps.end()) - { - removeableApps.erase(app); - ++numApps; - } - } - while (removeableApps.size() > 0) - { - removeApp(findApp(removeableApps.begin()->second), false); - kdDebug() << "Removing app " << removeableApps.begin()->first << endl; - removeableApps.erase(removeableApps.begin()->first); - } - kdDebug() << "done popularity update" << endl; - m_settings->setAutoAdjustMinItems(minItems); - m_settings->setAutoAdjustMaxItems(maxItems); - - // TODO: Think of something better than that: - m_saveTimer->start(10000,true); -} - -void QuickLauncher::slotOwnServiceExecuted(TQString serviceMenuId) -{ - m_popularity->useService(serviceMenuId); - if (m_settings->autoAdjustEnabled()) - { - TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); - } -} - -void QuickLauncher::updateStickyHighlightLayer() -{ - // Creates a transparent image which is used - // to highlight those buttons which will never - // be removed automatically from the launcher - TQPixmap areaPix(width(), height()); - TQPainter areaPixPainter(&areaPix); - areaPixPainter.fillRect(0, 0, width(), height(), TQColor(255, 255, 255)); - TQSize itemSize = m_manager->itemSize(); - TQSize spaceSize = m_manager->spaceSize(); - for (uint n=0; nsize(); ++n) - { - TQPoint pos = m_manager->pos(n); - if ((*m_buttons)[n]->sticky() == false) - { - areaPixPainter.fillRect(pos.x()-(spaceSize.width()+1)/2, - pos.y()-(spaceSize.height()+1)/2, - itemSize.width()+spaceSize.width()+1, - itemSize.height()+spaceSize.height()+1, - TQColor(0, 0, 0)); - } - } - TQImage areaLayer = areaPix.convertToImage(); - m_stickyHighlightLayer = TQImage(width(), height(), 32); - m_stickyHighlightLayer.setAlphaBuffer(true); - int pix, tlPix, brPix, w(width()), h(height()); - QRgb transparent(tqRgba(0, 0, 0, 0)); - for (int y = h-1; y >= 0; --y) - { - for (int x = w-1; x >= 0; --x) - { - pix = tqRed(areaLayer.pixel(x, y)); - if (pix == 0) - { - tlPix = (y>0 && x>0) ? tqRed(areaLayer.pixel(x-1,y-1)) : 255; - brPix = (yautoAdjustEnabled() && - m_settings->showVolatileButtonIndicator()) - { - TQPainter p(this); - p.drawImage(0, 0, m_stickyHighlightLayer); - } -} - -void QuickLauncher::slotStickyToggled() -{ - updateStickyHighlightLayer(); - saveConfig(); -} - -void QuickLauncher::positionChange(Position) -{ - for (int n=0; nsize()); ++n) - { - (*m_buttons)[n]->setPopupDirection(popupDirection()); - } -} - - -#include "quicklauncher.moc" diff --git a/kicker/applets/launcher/quicklauncher.desktop b/kicker/applets/launcher/quicklauncher.desktop deleted file mode 100644 index 771dc687e..000000000 --- a/kicker/applets/launcher/quicklauncher.desktop +++ /dev/null @@ -1,140 +0,0 @@ -[Desktop Entry] -Type=Plugin -Name=Quick Launcher -Name[af]=Vinnige Lanseerder -Name[ar]=الإنطلاق السريع -Name[az]=Sür'ətli Başladıcı -Name[be]=Хуткі запускальнік -Name[bg]=Бързо стартиране -Name[bn]=কুইক লঞ্চার -Name[br]=Loc'her prim -Name[bs]=Brzo pokretanje -Name[ca]=Engegador ràpid -Name[cs]=Rychlé spouštění aplikací -Name[csb]=Chùtczé zrëszenié -Name[cy]=Cychwynydd Cyflym -Name[da]=Hurtigstarter -Name[de]=Schnellstarter -Name[el]=Γρήγορη φόρτωση -Name[eo]=Rapidlanĉilo -Name[es]=Lanzador rápido -Name[et]=Kiirkäivitaja -Name[eu]=Abiarazle bizkorra -Name[fa]=راه‌انداز سریع -Name[fi]=Sovellusten pikakäynnistin -Name[fr]=Lanceur d'applications -Name[fy]=Snel útfierder -Name[ga]=Tosaitheoir Tapa -Name[gl]=Lanzador Rápido -Name[he]=הפעלה מהירה -Name[hi]=द्रुत लांचर -Name[hr]=Brzo pokretanje -Name[hu]=Gyorsindító -Name[id]=Launcher Cepat -Name[is]=Flýtiræsir -Name[it]=Esecuzione rapida -Name[ja]=クイックランチャー -Name[ka]=სწრაფი დაწყება -Name[kk]=Жедел жегуші -Name[km]=អ្នក​ចាប់ផ្ដើម​រហ័ស -Name[lo]=ຮງກທຳງານດ່ວນ -Name[lt]=Greitasis paleidimas -Name[lv]=Ātrais Palaidējs -Name[mk]=Брз стартувач -Name[mn]=Түргэн ажилуулагч -Name[ms]=Pelancar Pantas -Name[mt]=Ħaddem Malajr -Name[nb]=Hurtigstarter -Name[nds]=Fixstarter -Name[ne]=द्रुत सुरुआत -Name[nl]=Snelstarter -Name[nn]=Snøggstartar -Name[nso]=Ngwadisoleswa ya Kapela -Name[oc]=Engegador rapid -Name[pa]=ਚੁਸਤ ਸ਼ੁਰੂਆਤੀ -Name[pl]=Szybkie uruchamianie -Name[pt]=Execução de Aplicações -Name[pt_BR]=Lançador rápido -Name[ro]=Executor rapid -Name[ru]=Быстрый запуск -Name[rw]=Mutangiza Yihuta -Name[se]=Jođánisálggaheaddji -Name[sk]=Rýchly spúšťač -Name[sl]=Hitri zaganjalnik -Name[sr]=Брзи покретач -Name[sr@Latn]=Brzi pokretač -Name[sv]=Snabbstartare -Name[ta]=உடனடியாக திரையில் தெரிதல் -Name[te]=త్వరగా మొదలుపెట్టెది -Name[tg]=Сар додани тез -Name[th]=เรียกทำงานด่วน -Name[tr]=Hızlı Başlatıcı -Name[tt]=Tiz Cibärgeç -Name[uk]=Швидкий запуск -Name[uz]=Tez ishga tushirgich -Name[uz@cyrillic]=Тез ишга туширгич -Name[ven]=Tavhanya -Name[vi]=Khởi động nhanh -Name[wa]=Enondeu al vole di programes -Name[zh_CN]=快速启动 -Name[zh_TW]=快速起動 -Name[zu]=Umqalisi osheshayo -Comment=Directly access your frequently used applications -Comment[af]=Kry direkte toegang tot die programme wat jy gereeld gebruik -Comment[ar]=للوصول المباشر إلى تطبيقاتك الأكثر إستعمالاً -Comment[be]=Наўпрост запускае праграму -Comment[bg]=Бърз достъп до често използваните програми -Comment[bn]=আপনার সবচেয়ে ঘনঘন ব্যবহৃত অ্যাপলিকেশনগুলি সরাসরি চালু করুন -Comment[bs]=Direktno pristupite vašim često korištenim programima -Comment[ca]=Accedeix directament a les aplicacions més usades -Comment[cs]=Přímý přístup k nejčastěji používaným aplikacím -Comment[csb]=Prosti przistãp do nôczãstczi brëkòwónëch programów -Comment[da]=Direkte adgang til programmer du ofte bruger -Comment[de]=Schneller Zugriff auf häufig verwendete Programme -Comment[el]=Απευθείας πρόσβαση στις συχνά χρησιμοποιούμενες εφαρμογές σας -Comment[eo]=Rekte atingi viajn preferatajn aplikaĵojn -Comment[es]=Acceso directo a las aplicaciones usadas más frecuentemente -Comment[et]=Ligipääs sagedamini kasutatud rakendustele -Comment[eu]=Sarbide zuzena zure ohiko aplikazioei -Comment[fa]=دستیابی مستقیم به کاربردهای مکرر استفاده‌شدۀ شما -Comment[fi]=Siirry suoraan useimmin käyttämiisi sovelluksiin -Comment[fr]=Accès direct aux applications les plus utilisées -Comment[fy]=Direkte tagong ta jo faak brûkte programma's -Comment[gl]=Aceda directamenta ás aplicacións que use mais amiudo -Comment[he]=גישה מהירה ליישומים שאתה משתמש בהם הכי הרבה -Comment[hr]=Izravni pristup najčešće upotrebljavanim aplikacijama -Comment[hu]=A gyakran használt alkalmazások közvetlen elérése -Comment[is]=Beinn aðgangur að mest notuðu forritunum þínum -Comment[it]=Accesso diretto alle applicazioni usate più frequentemente -Comment[ja]=よく用いるアプリケーションに直接アクセス -Comment[kk]=Жиі пайдаланатын қолданбаларды тез жегу -Comment[km]=ដំណើរការ​កម្មវិធី​ដែល​បាន​ប្រើ​ជា​រឿយៗ​របស់អ្នក​ដោយ​ផ្ទាល់ -Comment[lt]=Tiesiogiai pasiekite dažniausiai naudojamas programas -Comment[mk]=Пристапете директно на вашите често користени апликации -Comment[nb]=Få direkte tilgang til ofte brukte programmer -Comment[nds]=Direktemang Dien meist bruukte Programmen opropen -Comment[ne]=बारम्बार प्रयोग भएका अनुप्रयोगमा तपाईँको प्रत्यक्ष पहुँच -Comment[nl]=Directe toegang tot uw veelgebruikte programma's -Comment[nn]=Direkte tilgang til program du brukar ofte -Comment[pa]=ਅਕਸਰ ਵਰਤੇ ਜਾਂਦੇ ਕਾਰਜਾਂ ਲਈ ਸਿੱਧੀ ਪਹੁੰਚ -Comment[pl]=Bezpośredni dostęp do najczęściej używanych programów -Comment[pt]=Aceder directamente às aplicações usadas com mais frequência por si -Comment[pt_BR]=Acesso direito à seus aplicativos mais freqüentemente usados -Comment[ro]=Accesează direct aplicațiile folosite frecvent -Comment[ru]=Быстрый вызов часто используемых приложений -Comment[sk]=Priamo zprístupní najčastejšie používané programy. -Comment[sl]=Neposreden dostop do vaših najbolj uporabljanih programov -Comment[sr]=Директно приступите својим често коришћеним програмима -Comment[sr@Latn]=Direktno pristupite svojim često korišćenim programima -Comment[sv]=Direkt åtkomst av program du ofta använder -Comment[th]=เรียกใช้งานแอพพลิเคชั่นที่คุณใช้บ่อยๆ ได้โดยตรง -Comment[tr]=Sıkça kullanılan programlara erişim sağlar -Comment[uk]=Безпосередній доступ до програм, які часто вживаються -Comment[uz]=Eng koʻp ishlatilgan dasturlarga qisqa yoʻl -Comment[uz@cyrillic]=Энг кўп ишлатилган дастурларга қисқа йўл -Comment[vi]=Chạy ngay các trình bạn thường xuyên dùng -Comment[wa]=Accès direk ås programes sovint eployîs -Comment[zh_CN]=直接访问您最经常使用的应用程序 -Comment[zh_TW]=直接存取您最常使用的應用程式 -Icon=launch -X-TDE-Library=launcher_panelapplet diff --git a/kicker/applets/launcher/quicklauncher.h b/kicker/applets/launcher/quicklauncher.h deleted file mode 100644 index 2dadf6344..000000000 --- a/kicker/applets/launcher/quicklauncher.h +++ /dev/null @@ -1,138 +0,0 @@ -/***************************************************************** - -Copyright (c) 2000 Bill Nagel - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************/ - -#ifndef __quicklauncher_h__ -#define __quicklauncher_h__ - -#include -#include -#include -#include -#include -#include - -#include "flowgridmanager.h" -#include "prefs.h" -#include "quickbutton.h" - -class ConfigDlg; -class TQPopupMenu; -class QuickButtonGroup; -class PopularityStatistics; -class KAction; - -typedef QuickButtonGroup ButtonGroup; - -class QuickLauncher: public KPanelApplet, public DCOPObject -{ - Q_OBJECT - K_DCOP - -k_dcop: - void serviceStartedByStorageId(TQString starter, TQString storageId); - -public: - enum {DEFAULT_ICON_DIM=QuickButton::DEFAULT_ICON_DIM}; - enum {SIZE_AUTO=0}; - - struct PopularityInfo { - float popularity; - }; - - QuickLauncher(const TQString& configFile, Type t = Normal, int actions = 0, - TQWidget *parent = 0, const char *name = 0); - ~QuickLauncher(); - int widthForHeight(int height) const; - int heightForWidth(int width) const; - void addApp(TQString url, int index, bool manuallyAdded); - virtual void action(Action a); - -public slots: - void addApp(TQString url, bool manuallyAdded); - void addAppBeforeManually(TQString url, TQString sender); - void removeAppManually(QuickButton *button); - void removeApp(TQString url, bool manuallyRemoved); - void removeApp(int index, bool manuallyRemoved); - void removeAppManually(int index); - void saveConfig(); - void about(); - -protected: - int findApp(TQString url); - int findApp(QuickButton *button); - - void mousePressEvent(TQMouseEvent *e); - void resizeEvent(TQResizeEvent*); - void dragEnterEvent(TQDragEnterEvent *e); - void dragLeaveEvent(TQDragLeaveEvent *e); - void dragMoveEvent(TQDragMoveEvent *e); - void dropEvent(TQDropEvent *e); - void refreshContents(); - void setRefreshEnabled(bool enable); - void setConserveSpace(bool conserve_space); - void setDragEnabled(bool conserve_space); - - bool conserveSpace() const { return m_manager->conserveSpace(); } - bool isDragEnabled() const { return m_settings->dragEnabled(); } - - void buildPopupMenu(); - void loadConfig(); - - void mergeButtons(int index); - void clearTempButtons(); - int dimension() const; - -protected slots: - void slotConfigure(); - void slotSettingsDialogChanged(); - void fillRemoveAppsMenu(); - void slotOwnServiceExecuted(TQString serviceMenuId); - void slotAdjustToCurrentPopularity(); - void slotStickyToggled(); - -protected: - void updateInsertionPosToStatusQuo(); - void updateStickyHighlightLayer(); - QuickButton* createButton(TQString url); - virtual void paintEvent(TQPaintEvent* e); - virtual void positionChange(Position); - - TQPopupMenu *m_popup; - TQPopupMenu *m_appletPopup; - TQPopupMenu *m_removeAppsMenu; - QuickButtonGroup *m_buttons, *m_newButtons, *m_oldButtons, *m_dragButtons; - int m_space, m_border; - TQSize m_buttonSize; - FlowGridManager *m_manager; - int m_dropLen, m_dropPos, m_minPanelDim; - bool m_dragAccepted, m_refreshEnabled, m_needsSave, m_needsRefresh; - std::map m_appOrdering; - Prefs* m_settings; - KAction *m_configAction; - ConfigDlg *m_configDialog; - PopularityStatistics* m_popularity; - TQImage m_stickyHighlightLayer; - TQTimer *m_saveTimer; -}; - -#endif diff --git a/kicker/applets/launcher/quictdelauncher.cpp b/kicker/applets/launcher/quictdelauncher.cpp new file mode 100644 index 000000000..87ac35387 --- /dev/null +++ b/kicker/applets/launcher/quictdelauncher.cpp @@ -0,0 +1,1130 @@ +/***************************************************************** + +Copyright (c) 2000 Bill Nagel +Copyright (c) 2004 Dan Bullok + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +******************************************************************/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include +#include + +#include "configdlg.h" +#include "popularity.h" +#include "quictdelauncher.h" +#include "quickbutton.h" +#include "quickaddappsmenu.h" +#include "quickbuttongroup.h" + +typedef ButtonGroup::iterator ButtonIter; +const ButtonGroup::Index NotFound=ButtonGroup::NotFound; +const ButtonGroup::Index Append=ButtonGroup::Append; + +#ifdef DEBUG + #define DEBUGSTR kdDebug() +#else + #define DEBUGSTR kndDebug() +#endif + +extern "C" +{ + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + { + TDEGlobal::locale()->insertCatalogue("quictdelauncher"); + return new QuickLauncher(configFile, KPanelApplet::Normal, + KPanelApplet::Preferences, + parent, "quictdelauncher"); + } +} + +QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions, + TQWidget *parent, const char *name) : + KPanelApplet(configFile, type, actions, parent, name) +{ + DCOPObject::setObjId("QuickLauncherApplet"); + DEBUGSTR << endl << endl << endl << "------------" << flush; + DEBUGSTR << "QuickLauncher::QuickLauncher(" << configFile << ",...)" << + endl << flush; + + m_settings = new Prefs(sharedConfig()); + m_settings->readConfig(); + + m_needsSave = false; + m_needsRefresh = false; + m_refreshEnabled = false; + + m_configDialog = 0; + m_popup = 0; + m_appletPopup = 0; + m_removeAppsMenu = 0; + + m_dragAccepted = false; + + m_buttons = new ButtonGroup; + m_manager = new FlowGridManager; + m_newButtons = 0; + m_oldButtons = 0; + m_dragButtons = 0; + + m_configAction = new KAction(i18n("Configure Quictdelauncher..."), "configure", KShortcut(), + TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), TQT_TQOBJECT(this)); + + m_saveTimer = new TQTimer(this, "m_saveTimer"); + connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig())); + + m_popularity = new PopularityStatistics(); + + setBackgroundOrigin(AncestorOrigin); + + loadConfig(); + + buildPopupMenu(); + m_minPanelDim = std::max(16, m_settings->iconDimChoices()[1]); + refreshContents(); + setRefreshEnabled(true); + + setAcceptDrops(true); + //TQToolTip::add(this, i18n("Drop applications here")); + DEBUGSTR << " QuickLauncher::QuickLauncher(" << configFile << + ",...) END" << endl << flush; + + DCOPClient *dcopClient = TDEApplication::dcopClient(); + dcopClient->connectDCOPSignal(0, "appLauncher", + "serviceStartedByStorageId(TQString,TQString)", + "QuickLauncherApplet", + "serviceStartedByStorageId(TQString,TQString)", + false); + kdDebug() << "Quictdelauncher registered DCOP signal" << endl; +} + + +//TODO:? Drag/drop more than one item at a time + +QuickLauncher::~QuickLauncher() +{ + TDEGlobal::locale()->removeCatalogue("quictdelauncher"); + setCustomMenu(0); + delete m_popup; + delete m_appletPopup; + delete m_removeAppsMenu; + delete m_popularity; + clearTempButtons(); + if (m_buttons) + { + m_buttons->deleteContents(); + delete m_buttons; + } +} + +// Builds, connects _popup menu +void QuickLauncher::buildPopupMenu() +{ + QuickAddAppsMenu *addAppsMenu = new QuickAddAppsMenu(this, this); + m_popup = new TQPopupMenu(this); + m_popup->insertItem(i18n("Add Application"), addAppsMenu); + m_configAction->plug(m_popup); + + m_appletPopup = new TQPopupMenu(this); + m_appletPopup->insertItem(i18n("Add Application"), addAppsMenu); + m_removeAppsMenu = new TQPopupMenu(this); + connect(m_removeAppsMenu, TQT_SIGNAL(aboutToShow()), + TQT_SLOT(fillRemoveAppsMenu())); + connect(m_removeAppsMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(removeAppManually(int))); + m_appletPopup->insertItem(i18n("Remove Application"), m_removeAppsMenu); + + m_appletPopup->insertSeparator(); + m_appletPopup->setCheckable( true ); + m_appletPopup->insertItem(i18n("About"), this, TQT_SLOT(about())); + setCustomMenu(m_appletPopup); +} + + +// Fill the remove apps menu +void QuickLauncher::fillRemoveAppsMenu() +{ + m_removeAppsMenu->clear(); + ButtonIter iter(m_buttons->begin()); + int i = 0; + while (iter != m_buttons->end()) + { + TQString text = TQToolTip::textFor(*iter); + if (text.isEmpty()) + { + text = (*iter)->url(); + if (text.isEmpty()) + { + text = i18n("Unknown"); + } + } + m_removeAppsMenu->insertItem((*iter)->icon(), text, i); + ++iter; + ++i; + } +} + +void QuickLauncher::slotSettingsDialogChanged() +{ + // Update conserve space setting + setConserveSpace(m_settings->conserveSpace()); + m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); + slotAdjustToCurrentPopularity(); + kdDebug() << "Icon size: " << m_settings->iconDim() << endl; + refreshContents(); + + saveConfig(); +} + +void QuickLauncher::action(Action a) +{ + if (a == KPanelApplet::Preferences) + { + slotConfigure(); + } + else + { + KPanelApplet::action(a); + } +} + +void QuickLauncher::slotConfigure() +{ + if (!m_configDialog) + { + m_configDialog = new ConfigDlg(this, "configdialog", + m_settings, SIZE_AUTO, KDialogBase::Plain, KDialogBase::Ok | + KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Default); + connect(m_configDialog, TQT_SIGNAL(settingsChanged()), + this, TQT_SLOT(slotSettingsDialogChanged())); + } + + m_configDialog->show(); +} + + +int QuickLauncher::findApp(QuickButton *button) +{ + if (m_buttons->empty()) + { + return NotFound; + } + int pos = m_buttons->findValue(button); + return pos; +} + + +int QuickLauncher::findApp(TQString url) +{ + if (m_buttons->empty()) + { + return NotFound; + } + int pos=m_buttons->findDescriptor(url); + return pos; +} + +void QuickLauncher::removeAppManually(int index) +{ + removeApp(index, true); +} + +void QuickLauncher::removeApp(int index, bool manuallyRemoved) +{ + if (m_buttons->empty()) + { + return; + } + if (!m_buttons->isValidIndex(index)) + { + kdWarning() << " removeApp (" << index << + ") *******WARNING****** index=" << index << "is out of bounds." << + endl << flush; + return; + } + DEBUGSTR << "Removing button. index=" << index << " url='" << + (*m_buttons)[index]->url() << "'" << endl << flush; + + TQString removeAppUrl = (*m_buttons)[index]->url(); + TQString removeAppMenuId = (*m_buttons)[index]->menuId(); + + if (removeAppUrl == "SPECIAL_BUTTON__SHOW_DESKTOP") { + m_settings->setShowDesktopEnabled(false); + } + + delete (*m_buttons)[index]; + m_buttons->eraseAt(index); + refreshContents(); + + if (int(m_buttons->size()) < m_settings->autoAdjustMinItems() && manuallyRemoved) + { + m_settings->setAutoAdjustMinItems(m_buttons->size()); + } + + if (manuallyRemoved) + { + m_popularity->moveToBottom(removeAppMenuId); + slotAdjustToCurrentPopularity(); + } + + saveConfig(); +} + + +void QuickLauncher::removeApp(TQString url, bool manuallyRemoved) +{ + int index = findApp(url); + if (index == NotFound) + { + kdDebug() << "removeApp: Not found: " << url << endl; + return; + } + removeApp(index, manuallyRemoved); +} + + +void QuickLauncher::removeAppManually(QuickButton *button) +{ + int index = findApp(button); + if (index == NotFound) + { + return; + } + removeApp(index, true); +} + + +int QuickLauncher::widthForHeight(int h) const +{ + FlowGridManager temp_manager = *m_manager; + temp_manager.setFrameSize(TQSize(h,h)); + temp_manager.setOrientation(Qt::Horizontal); // ??? probably not necessary + if (temp_manager.isValid()) + { + return temp_manager.frameSize().width(); + } + return m_minPanelDim; +} + + +int QuickLauncher::heightForWidth(int w) const +{ + FlowGridManager temp_manager=*m_manager; + temp_manager.setFrameSize(TQSize(w,w)); + temp_manager.setOrientation(Qt::Vertical); // ??? probably not necessary + if (temp_manager.isValid()) + { + return temp_manager.frameSize().height(); + } + return m_minPanelDim; +} + + +int QuickLauncher::dimension() const +{ + if (orientation()==Qt::Vertical) + { + return size().width(); + } + return size().height(); +} + +void QuickLauncher::addApp(TQString url, bool manuallyAdded) +{ + assert(m_buttons); + TQString newButtonId = QuickURL(url).menuId(); + if (m_appOrdering.find(newButtonId) == m_appOrdering.end()) + { + m_appOrdering[newButtonId] = m_appOrdering.size(); + } + uint appPos; + for (appPos = 0; appPos < m_buttons->size(); ++appPos) + { + TQString buttonId = (*m_buttons)[appPos]->menuId(); + if (m_appOrdering[buttonId] >= m_appOrdering[newButtonId]) + { + break; + } + } + addApp(url, appPos, manuallyAdded); +} + +QuickButton* QuickLauncher::createButton(TQString url) +{ + QuickButton* newButton=new QuickButton(url, m_configAction, this); + connect(newButton, TQT_SIGNAL(executed(TQString)), + this, TQT_SLOT(slotOwnServiceExecuted(TQString))); + connect(newButton, TQT_SIGNAL(stickyToggled(bool)), + this, TQT_SLOT(slotStickyToggled())); + newButton->setPopupDirection(popupDirection()); + return newButton; +} + +void QuickLauncher::addApp(TQString url, int index, bool manuallyAdded) +{ + DEBUGSTR << endl <<"About to add: url='" << url << + "' index=" << index << endl << flush; + QuickButton *newButton; + if (!m_buttons->isValidInsertIndex(index)) + { + kdWarning() << " *******WARNING****** index=" << index << + "is out of bounds." << endl << flush; + index = m_buttons->lastIndex(); + } + int old = findApp(QuickURL(url).url()); + if (old != NotFound) + { + if (index == old) + { + return; + } + if (index > old) + { + index--; + } + newButton = (*m_buttons)[old]; + m_buttons->eraseAt(old); + } + else + { + newButton = createButton(url); + } + m_buttons->insertAt(index, newButton); + DEBUGSTR << "Added: url='"<size(); ++n) + { + TQString buttonId = (*m_buttons)[n]->menuId(); + appList.push_back(buttonId); + if (m_appOrdering.find(buttonId) == m_appOrdering.end()) + { + m_appOrdering[buttonId] = m_appOrdering.size(); + } + posList.insert(m_appOrdering[buttonId]); + //kdDebug() << m_appOrdering[buttonId] << " = " << buttonId << endl; + } + //kdDebug() << "After:" << endl; + while (posList.size() > 0) + { + assert(appList.size() > 0); + m_appOrdering[*appList.begin()] = *posList.begin(); + kdDebug() << *posList.begin() << " = " << *appList.begin() << endl; + posList.erase(posList.begin()); + appList.pop_front(); + } + //kdDebug() << "Done." << endl; +} + +void QuickLauncher::addAppBeforeManually(TQString url, TQString sender) +{ + if (sender.isNull()) + { + addApp(url, Append, true); + } + int pos = findApp(sender); + if (pos < 0) + { + pos = Append; + } + DEBUGSTR << "QuickLauncher::addAppBefore(" << url << + "," << sender << "): pos=" << pos << endl << flush; + addApp(url, pos, true); +} + + +void QuickLauncher::about() +{ + TDEAboutData about("quictdelauncher", I18N_NOOP("Quick Launcher"), "2.0", + I18N_NOOP("A simple application launcher"), + TDEAboutData::License_GPL_V2, + "(C) 2000 Bill Nagel\n(C) 2004 Dan Bullok\n(C) 2005 Fred Schaettgen"); + KAboutApplication a(&about, this); + a.exec(); +} + + +void QuickLauncher::mousePressEvent(TQMouseEvent *e) +{ + if (e->button() == Qt::RightButton) + { + m_popup->popup(e->globalPos()); + } +} + +void QuickLauncher::resizeEvent(TQResizeEvent*) +{ + refreshContents(); +} + +void QuickLauncher::dragEnterEvent(TQDragEnterEvent *e) +{ + DEBUGSTR << "QuickLauncher::dragEnterEvent(pos=" << e->pos() << + " type=" << e->type() << ")" << endl << flush; + m_dragAccepted=false; + KURL::List kurlList; + if (!isDragEnabled() || !KURLDrag::decode(e, kurlList)) + { + e->accept(false); + return; + } + + if (kurlList.size()<=0) + { + e->accept(false); + return; + } + m_dragButtons=new ButtonGroup; + m_oldButtons=new ButtonGroup(*m_buttons); + + TQString url; + KURL::List::ConstIterator it = kurlList.begin(); + for ( ; it != kurlList.end(); ++it ) + { + url = QuickURL((*it).url()).url(); + kdDebug() << " Drag Object='"<findDescriptor(url); + if (pos != NotFound) + { + // if it's already in m_buttons, take it out + m_dragButtons->push_back(m_buttons->takeFrom(pos)); + } + else + { + // otherwise, create a new one + QuickButton* button = createButton(url); + button->setSticky(true); + m_dragButtons->push_back(button); + } + } + if (m_dragButtons->size() > 0) + { + //make sure we can drag at least one button. + m_dragAccepted=true; + m_newButtons=new ButtonGroup(*m_buttons); + m_dropPos=NotFound; + e->accept(true); + return; + } + e->accept(false); + clearTempButtons(); +} + + +void QuickLauncher::dragMoveEvent(TQDragMoveEvent *e) +{ + if (!m_dragAccepted) + { + kdWarning() << "QuickLauncher::dragMoveEvent: Drag is not accepted." << + m_dragAccepted << endl << flush; + e->accept(false); + return; + } + + e->accept(true); + int pos=m_manager->indexNearest(e->pos()); + if (pos == m_dropPos) + { + return;// Already been inserted here, no need to update + } + + if (m_newButtons->isValidInsertIndex(pos)) + { + mergeButtons(pos); + m_dropPos=pos; + } + refreshContents(); +} + + +void QuickLauncher::dragLeaveEvent(TQDragLeaveEvent *e) +{ + DEBUGSTR << "QuickLauncher::dragLeaveEvent(type=" << + e->type() << ")" << endl << flush; + if (!m_dragAccepted) + { + return; + } + + // No drop. Return to starting state. + std::swap(m_buttons,m_oldButtons); + clearTempButtons(); + + refreshContents(); + saveConfig(); +} + + +void QuickLauncher::dropEvent(TQDropEvent *e) +{ + DEBUGSTR << "QuickLauncher::dropEvent(pos=" << e->pos() << + " type=" << e->type() << ")" << endl << flush; + if (!m_dragAccepted) + { + e->accept(false); + return; + } + + if (e->source() == 0) + { + for (uint n=0; nsize(); ++n) + { + (*m_dragButtons)[n]->setSticky(true); + } + } + + clearTempButtons(); + refreshContents(); + saveConfig(); + updateInsertionPosToStatusQuo(); +} + +// insert dragbuttons at index in m_newButtons. Put result in m_buttons +void QuickLauncher::mergeButtons(int index) +{ + if (!m_newButtons->isValidInsertIndex(index)) + { + index=m_newButtons->size(); + } + + m_buttons->clear(); + (*m_buttons) = (*m_newButtons); + m_buttons->insertAt(index, *m_dragButtons); + refreshContents(); +} + +void QuickLauncher::clearTempButtons() +{ + std::set allButtons; + //put all the m_buttons in a set (removes duplicates automatically + if (m_newButtons) + { + allButtons.insert(m_newButtons->begin(),m_newButtons->end()); + } + if (m_oldButtons) + { + allButtons.insert(m_oldButtons->begin(),m_oldButtons->end()); + } + if (m_dragButtons) + { + allButtons.insert(m_dragButtons->begin(),m_dragButtons->end()); + } + + //delete temp ButtonGroups + delete m_newButtons; m_newButtons=0; + delete m_oldButtons; m_oldButtons=0; + delete m_dragButtons; m_dragButtons=0; + + //if an element allButtons is NOT in m_buttons (the ones we keep), delete it + std::set::iterator iter = allButtons.begin(); + while (iter != allButtons.end()) + { + if (findApp(*iter) == NotFound) + { + delete *iter; + } + ++iter; + } + m_dragAccepted = false; + m_dropPos = NotFound; +} + +void QuickLauncher::refreshContents() +{ + int idim, d(dimension()); + + // make sure show desktop setting is honored + TQStringList urls, volatileUrls; + ButtonIter iter = m_buttons->begin(); + while (iter != m_buttons->end()) { + if ((*iter)->sticky() == false) + { + volatileUrls.append((*iter)->menuId()); + } + urls.append((*iter)->menuId()); + ++iter; + } + if (m_settings->showDesktopEnabled()) { + if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) { + urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP"); + addApp("SPECIAL_BUTTON__SHOW_DESKTOP", 0, true); + } + } + else { + if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) { + urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP"); + removeApp("SPECIAL_BUTTON__SHOW_DESKTOP", true); + } + } + + // determine button size + if (m_settings->iconDim() == SIZE_AUTO) + { + if (d < 18) + { + idim = std::min(16,d); + } + else if (d < 64) + { + idim = 16; + } + else if (d < 80) + { + idim = 20; + } + else if (d < 122) + { + idim = 24; + } + else + { + idim = 28; + } + } + else + { + idim = std::min(m_settings->iconDim(), d - std::max((d/8)-1, 0) * 2); + } + m_space = std::max((idim/8)-1, 0); + m_border = m_space; + m_buttonSize = TQSize(idim, idim); + m_manager->setOrientation(orientation()); + m_manager->setNumItems(m_buttons->size()); + m_manager->setFrameSize(size()); + m_manager->setItemSize(m_buttonSize); + m_manager->setSpaceSize(TQSize(m_space, m_space)); + m_manager->setBorderSize(TQSize(m_border, m_border)); + if (!m_refreshEnabled) + { + m_needsRefresh=true; + return; + } + if (!m_manager->isValid()) + { + kdDebug()<dump(); + return; + } + + unsigned index; + TQPoint pos; + setUpdatesEnabled(false); + m_buttons->setUpdatesEnabled(false); + for (index = 0; index < m_buttons->size(); index++) + { + pos = m_manager->pos(index); + QuickButton *button = (*m_buttons)[index]; + button->resize(m_manager->itemSize()); + button->move(pos.x(), pos.y()); + button->setDragging(false); + button->setEnableDrag(isDragEnabled()); + button->setDynamicModeEnabled(m_settings->autoAdjustEnabled()); + } + if (m_newButtons) + { + m_newButtons->setDragging(false); + } + if (m_dragButtons) + { + m_dragButtons->setDragging(true); + } + m_buttons->show(); + setUpdatesEnabled(true); + update(); + m_buttons->setUpdatesEnabled(true); + updateGeometry(); + emit updateLayout(); + updateStickyHighlightLayer(); +} + + +void QuickLauncher::setDragEnabled(bool enable) +{ + m_settings->setDragEnabled(enable); +} + +void QuickLauncher::setConserveSpace(bool conserve_space) +{ + m_manager->setConserveSpace(conserve_space); + if (conserve_space) + { + m_manager->setSlack(FlowGridManager::SpaceSlack, + FlowGridManager::SpaceSlack); + } + else + { + m_manager->setSlack(FlowGridManager::ItemSlack, + FlowGridManager::ItemSlack); + } + refreshContents(); +} + +class SortByPopularity { +public: + bool operator()(const QuickLauncher::PopularityInfo& a, + const QuickLauncher::PopularityInfo& b) + { + return a.popularity < b.popularity; + } +}; + +void QuickLauncher::loadConfig() +{ + DEBUGSTR << "QuickLauncher::loadConfig()" << endl << flush; + //TDEConfig *c = config(); + //c->setGroup("General"); + setConserveSpace(m_settings->conserveSpace()); + setDragEnabled(m_settings->dragEnabled()); + /*DEBUGSTR << " IconDim="<size()); ++n) + { + QuickButton* button = (*m_buttons)[n]; + if (volatileButtons.contains(button->menuId()) == false) + { + button->setSticky(true); + } + button->setDynamicModeEnabled(m_settings->autoAdjustEnabled()); + } + + m_popularity->readConfig(m_settings); + m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); + + TQStringList serviceNames = m_settings->serviceNames(); + TQValueList insPos = m_settings->serviceInspos(); + for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n) + { + m_appOrdering[serviceNames[n]] = insPos[n]; + } +} + +void QuickLauncher::saveConfig() +{ + if (!m_refreshEnabled) + { + m_needsSave=true; + return; + } + TQStringList urls, volatileUrls; + ButtonIter iter = m_buttons->begin(); + while (iter != m_buttons->end()) { + if ((*iter)->sticky() == false) + { + volatileUrls.append((*iter)->menuId()); + } + urls.append((*iter)->menuId()); + ++iter; + } + m_settings->setButtons(urls); + kdDebug() << "SetButtons " << urls.join("/") << endl; + m_settings->setVolatileButtons(volatileUrls); + m_settings->setConserveSpace(m_manager->conserveSpace()); + m_settings->setDragEnabled(isDragEnabled()); + + m_popularity->writeConfig(m_settings); + + // m_popularity must have written the current service list by now + TQStringList serviceNames = m_settings->serviceNames(); + TQValueList insertionPositions; + for (int n=0; nsetServiceInspos(insertionPositions); + + m_settings->writeConfig(); +} + + +void QuickLauncher::setRefreshEnabled(bool enable) +{ + m_refreshEnabled=enable; + if (m_refreshEnabled) + { + if (m_needsSave) { + saveConfig(); + } + if (m_needsRefresh) { + refreshContents(); + } + } +} + +void QuickLauncher::serviceStartedByStorageId(TQString /*starter*/, TQString storageId) +{ + KService::Ptr service = KService::serviceByStorageId(storageId); + if (service->icon() == TQString::null) + { + kdDebug() << storageId << " has no icon. Makes no sense to add it."; + return; + } + QuickURL url = QuickURL(locate("apps", service->desktopEntryPath())); + TQString desktopMenuId(url.menuId()); + kdDebug() << "storageId=" << storageId << " desktopURL=" << desktopMenuId << endl; + // A service was started somwhere else. If the quictdelauncher contains + // this service too, we flash the icon + QuickButton *startedButton = 0; + std::set buttonIdSet; + for (uint n = 0; n < m_buttons->size(); ++n) + { + QuickButton *button = (*m_buttons)[n]; + TQString buttonMenuId = button->menuId(); + buttonIdSet.insert(buttonMenuId); + if (desktopMenuId == buttonMenuId) + { + kdDebug() << "QuickLauncher: I know that one: " << storageId << endl; + button->flash(); + startedButton = button; + } + } + + // Update popularity info. + // We do this even if autoadjust is disabled + // so there are sane values to start with if it's turned on. + m_popularity->useService(desktopMenuId); + + if (m_settings->autoAdjustEnabled()) + { + TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); + } +} + +void QuickLauncher::slotAdjustToCurrentPopularity() +{ + // TODO: Shrink immediately if buttons->size() > maxItems + kdDebug() << "Starting popularity update" << endl; + PopularityStatistics* stats = m_popularity; + int minItems = m_settings->autoAdjustMinItems(); + int maxItems = m_settings->autoAdjustMaxItems(); + + static const double hysteresisFactor = 0.90; + double minAddPopularity = 0; + for (int n = 0; n < maxItems; ++n) + { + // All items with a popularity not less than 0.75 of the average + // of the first maxItems apps are included in the list + double belowAvgAllowed = 0.75; + minAddPopularity += (belowAvgAllowed * stats->popularityByRank(n)) / maxItems; + } + double minDelPopularity = minAddPopularity * hysteresisFactor; + std::map removeableApps; + std::set existingApps; + int numApps = m_buttons->size(); + for (int n = 0; n < int(m_buttons->size()); ++n) + { + QuickButton *button = (*m_buttons)[n]; + if (((stats->popularityByRank(stats->rankByService(button->menuId())) < + minDelPopularity) || m_settings->autoAdjustEnabled()==false) && + (button->sticky() == false)) + { + removeableApps[button->menuId()] = button; + --numApps; + } + existingApps.insert(button->menuId()); + } + for (int n = 0; + (numApps < minItems && stats->popularityByRank(n) > 0) || + (numApps < maxItems && stats->popularityByRank(n) > minAddPopularity); + ++n) + { + TQString app = m_popularity->serviceByRank(n); + if (existingApps.find(app) == existingApps.end()) + { + addApp(QuickURL(m_popularity->serviceByRank(n)).url(), false); + kdDebug() << "Adding app " << app << endl; + ++numApps; + } + else if (removeableApps.find(app) != removeableApps.end()) + { + removeableApps.erase(app); + ++numApps; + } + } + while (removeableApps.size() > 0) + { + removeApp(findApp(removeableApps.begin()->second), false); + kdDebug() << "Removing app " << removeableApps.begin()->first << endl; + removeableApps.erase(removeableApps.begin()->first); + } + kdDebug() << "done popularity update" << endl; + m_settings->setAutoAdjustMinItems(minItems); + m_settings->setAutoAdjustMaxItems(maxItems); + + // TODO: Think of something better than that: + m_saveTimer->start(10000,true); +} + +void QuickLauncher::slotOwnServiceExecuted(TQString serviceMenuId) +{ + m_popularity->useService(serviceMenuId); + if (m_settings->autoAdjustEnabled()) + { + TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); + } +} + +void QuickLauncher::updateStickyHighlightLayer() +{ + // Creates a transparent image which is used + // to highlight those buttons which will never + // be removed automatically from the launcher + TQPixmap areaPix(width(), height()); + TQPainter areaPixPainter(&areaPix); + areaPixPainter.fillRect(0, 0, width(), height(), TQColor(255, 255, 255)); + TQSize itemSize = m_manager->itemSize(); + TQSize spaceSize = m_manager->spaceSize(); + for (uint n=0; nsize(); ++n) + { + TQPoint pos = m_manager->pos(n); + if ((*m_buttons)[n]->sticky() == false) + { + areaPixPainter.fillRect(pos.x()-(spaceSize.width()+1)/2, + pos.y()-(spaceSize.height()+1)/2, + itemSize.width()+spaceSize.width()+1, + itemSize.height()+spaceSize.height()+1, + TQColor(0, 0, 0)); + } + } + TQImage areaLayer = areaPix.convertToImage(); + m_stickyHighlightLayer = TQImage(width(), height(), 32); + m_stickyHighlightLayer.setAlphaBuffer(true); + int pix, tlPix, brPix, w(width()), h(height()); + QRgb transparent(tqRgba(0, 0, 0, 0)); + for (int y = h-1; y >= 0; --y) + { + for (int x = w-1; x >= 0; --x) + { + pix = tqRed(areaLayer.pixel(x, y)); + if (pix == 0) + { + tlPix = (y>0 && x>0) ? tqRed(areaLayer.pixel(x-1,y-1)) : 255; + brPix = (yautoAdjustEnabled() && + m_settings->showVolatileButtonIndicator()) + { + TQPainter p(this); + p.drawImage(0, 0, m_stickyHighlightLayer); + } +} + +void QuickLauncher::slotStickyToggled() +{ + updateStickyHighlightLayer(); + saveConfig(); +} + +void QuickLauncher::positionChange(Position) +{ + for (int n=0; nsize()); ++n) + { + (*m_buttons)[n]->setPopupDirection(popupDirection()); + } +} + + +#include "quictdelauncher.moc" diff --git a/kicker/applets/launcher/quictdelauncher.desktop b/kicker/applets/launcher/quictdelauncher.desktop new file mode 100644 index 000000000..771dc687e --- /dev/null +++ b/kicker/applets/launcher/quictdelauncher.desktop @@ -0,0 +1,140 @@ +[Desktop Entry] +Type=Plugin +Name=Quick Launcher +Name[af]=Vinnige Lanseerder +Name[ar]=الإنطلاق السريع +Name[az]=Sür'ətli Başladıcı +Name[be]=Хуткі запускальнік +Name[bg]=Бързо стартиране +Name[bn]=কুইক লঞ্চার +Name[br]=Loc'her prim +Name[bs]=Brzo pokretanje +Name[ca]=Engegador ràpid +Name[cs]=Rychlé spouštění aplikací +Name[csb]=Chùtczé zrëszenié +Name[cy]=Cychwynydd Cyflym +Name[da]=Hurtigstarter +Name[de]=Schnellstarter +Name[el]=Γρήγορη φόρτωση +Name[eo]=Rapidlanĉilo +Name[es]=Lanzador rápido +Name[et]=Kiirkäivitaja +Name[eu]=Abiarazle bizkorra +Name[fa]=راه‌انداز سریع +Name[fi]=Sovellusten pikakäynnistin +Name[fr]=Lanceur d'applications +Name[fy]=Snel útfierder +Name[ga]=Tosaitheoir Tapa +Name[gl]=Lanzador Rápido +Name[he]=הפעלה מהירה +Name[hi]=द्रुत लांचर +Name[hr]=Brzo pokretanje +Name[hu]=Gyorsindító +Name[id]=Launcher Cepat +Name[is]=Flýtiræsir +Name[it]=Esecuzione rapida +Name[ja]=クイックランチャー +Name[ka]=სწრაფი დაწყება +Name[kk]=Жедел жегуші +Name[km]=អ្នក​ចាប់ផ្ដើម​រហ័ស +Name[lo]=ຮງກທຳງານດ່ວນ +Name[lt]=Greitasis paleidimas +Name[lv]=Ātrais Palaidējs +Name[mk]=Брз стартувач +Name[mn]=Түргэн ажилуулагч +Name[ms]=Pelancar Pantas +Name[mt]=Ħaddem Malajr +Name[nb]=Hurtigstarter +Name[nds]=Fixstarter +Name[ne]=द्रुत सुरुआत +Name[nl]=Snelstarter +Name[nn]=Snøggstartar +Name[nso]=Ngwadisoleswa ya Kapela +Name[oc]=Engegador rapid +Name[pa]=ਚੁਸਤ ਸ਼ੁਰੂਆਤੀ +Name[pl]=Szybkie uruchamianie +Name[pt]=Execução de Aplicações +Name[pt_BR]=Lançador rápido +Name[ro]=Executor rapid +Name[ru]=Быстрый запуск +Name[rw]=Mutangiza Yihuta +Name[se]=Jođánisálggaheaddji +Name[sk]=Rýchly spúšťač +Name[sl]=Hitri zaganjalnik +Name[sr]=Брзи покретач +Name[sr@Latn]=Brzi pokretač +Name[sv]=Snabbstartare +Name[ta]=உடனடியாக திரையில் தெரிதல் +Name[te]=త్వరగా మొదలుపెట్టెది +Name[tg]=Сар додани тез +Name[th]=เรียกทำงานด่วน +Name[tr]=Hızlı Başlatıcı +Name[tt]=Tiz Cibärgeç +Name[uk]=Швидкий запуск +Name[uz]=Tez ishga tushirgich +Name[uz@cyrillic]=Тез ишга туширгич +Name[ven]=Tavhanya +Name[vi]=Khởi động nhanh +Name[wa]=Enondeu al vole di programes +Name[zh_CN]=快速启动 +Name[zh_TW]=快速起動 +Name[zu]=Umqalisi osheshayo +Comment=Directly access your frequently used applications +Comment[af]=Kry direkte toegang tot die programme wat jy gereeld gebruik +Comment[ar]=للوصول المباشر إلى تطبيقاتك الأكثر إستعمالاً +Comment[be]=Наўпрост запускае праграму +Comment[bg]=Бърз достъп до често използваните програми +Comment[bn]=আপনার সবচেয়ে ঘনঘন ব্যবহৃত অ্যাপলিকেশনগুলি সরাসরি চালু করুন +Comment[bs]=Direktno pristupite vašim često korištenim programima +Comment[ca]=Accedeix directament a les aplicacions més usades +Comment[cs]=Přímý přístup k nejčastěji používaným aplikacím +Comment[csb]=Prosti przistãp do nôczãstczi brëkòwónëch programów +Comment[da]=Direkte adgang til programmer du ofte bruger +Comment[de]=Schneller Zugriff auf häufig verwendete Programme +Comment[el]=Απευθείας πρόσβαση στις συχνά χρησιμοποιούμενες εφαρμογές σας +Comment[eo]=Rekte atingi viajn preferatajn aplikaĵojn +Comment[es]=Acceso directo a las aplicaciones usadas más frecuentemente +Comment[et]=Ligipääs sagedamini kasutatud rakendustele +Comment[eu]=Sarbide zuzena zure ohiko aplikazioei +Comment[fa]=دستیابی مستقیم به کاربردهای مکرر استفاده‌شدۀ شما +Comment[fi]=Siirry suoraan useimmin käyttämiisi sovelluksiin +Comment[fr]=Accès direct aux applications les plus utilisées +Comment[fy]=Direkte tagong ta jo faak brûkte programma's +Comment[gl]=Aceda directamenta ás aplicacións que use mais amiudo +Comment[he]=גישה מהירה ליישומים שאתה משתמש בהם הכי הרבה +Comment[hr]=Izravni pristup najčešće upotrebljavanim aplikacijama +Comment[hu]=A gyakran használt alkalmazások közvetlen elérése +Comment[is]=Beinn aðgangur að mest notuðu forritunum þínum +Comment[it]=Accesso diretto alle applicazioni usate più frequentemente +Comment[ja]=よく用いるアプリケーションに直接アクセス +Comment[kk]=Жиі пайдаланатын қолданбаларды тез жегу +Comment[km]=ដំណើរការ​កម្មវិធី​ដែល​បាន​ប្រើ​ជា​រឿយៗ​របស់អ្នក​ដោយ​ផ្ទាល់ +Comment[lt]=Tiesiogiai pasiekite dažniausiai naudojamas programas +Comment[mk]=Пристапете директно на вашите често користени апликации +Comment[nb]=Få direkte tilgang til ofte brukte programmer +Comment[nds]=Direktemang Dien meist bruukte Programmen opropen +Comment[ne]=बारम्बार प्रयोग भएका अनुप्रयोगमा तपाईँको प्रत्यक्ष पहुँच +Comment[nl]=Directe toegang tot uw veelgebruikte programma's +Comment[nn]=Direkte tilgang til program du brukar ofte +Comment[pa]=ਅਕਸਰ ਵਰਤੇ ਜਾਂਦੇ ਕਾਰਜਾਂ ਲਈ ਸਿੱਧੀ ਪਹੁੰਚ +Comment[pl]=Bezpośredni dostęp do najczęściej używanych programów +Comment[pt]=Aceder directamente às aplicações usadas com mais frequência por si +Comment[pt_BR]=Acesso direito à seus aplicativos mais freqüentemente usados +Comment[ro]=Accesează direct aplicațiile folosite frecvent +Comment[ru]=Быстрый вызов часто используемых приложений +Comment[sk]=Priamo zprístupní najčastejšie používané programy. +Comment[sl]=Neposreden dostop do vaših najbolj uporabljanih programov +Comment[sr]=Директно приступите својим често коришћеним програмима +Comment[sr@Latn]=Direktno pristupite svojim često korišćenim programima +Comment[sv]=Direkt åtkomst av program du ofta använder +Comment[th]=เรียกใช้งานแอพพลิเคชั่นที่คุณใช้บ่อยๆ ได้โดยตรง +Comment[tr]=Sıkça kullanılan programlara erişim sağlar +Comment[uk]=Безпосередній доступ до програм, які часто вживаються +Comment[uz]=Eng koʻp ishlatilgan dasturlarga qisqa yoʻl +Comment[uz@cyrillic]=Энг кўп ишлатилган дастурларга қисқа йўл +Comment[vi]=Chạy ngay các trình bạn thường xuyên dùng +Comment[wa]=Accès direk ås programes sovint eployîs +Comment[zh_CN]=直接访问您最经常使用的应用程序 +Comment[zh_TW]=直接存取您最常使用的應用程式 +Icon=launch +X-TDE-Library=launcher_panelapplet diff --git a/kicker/applets/launcher/quictdelauncher.h b/kicker/applets/launcher/quictdelauncher.h new file mode 100644 index 000000000..c6fe1d2bb --- /dev/null +++ b/kicker/applets/launcher/quictdelauncher.h @@ -0,0 +1,138 @@ +/***************************************************************** + +Copyright (c) 2000 Bill Nagel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +******************************************************************/ + +#ifndef __quictdelauncher_h__ +#define __quictdelauncher_h__ + +#include +#include +#include +#include +#include +#include + +#include "flowgridmanager.h" +#include "prefs.h" +#include "quickbutton.h" + +class ConfigDlg; +class TQPopupMenu; +class QuickButtonGroup; +class PopularityStatistics; +class KAction; + +typedef QuickButtonGroup ButtonGroup; + +class QuickLauncher: public KPanelApplet, public DCOPObject +{ + Q_OBJECT + K_DCOP + +k_dcop: + void serviceStartedByStorageId(TQString starter, TQString storageId); + +public: + enum {DEFAULT_ICON_DIM=QuickButton::DEFAULT_ICON_DIM}; + enum {SIZE_AUTO=0}; + + struct PopularityInfo { + float popularity; + }; + + QuickLauncher(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); + ~QuickLauncher(); + int widthForHeight(int height) const; + int heightForWidth(int width) const; + void addApp(TQString url, int index, bool manuallyAdded); + virtual void action(Action a); + +public slots: + void addApp(TQString url, bool manuallyAdded); + void addAppBeforeManually(TQString url, TQString sender); + void removeAppManually(QuickButton *button); + void removeApp(TQString url, bool manuallyRemoved); + void removeApp(int index, bool manuallyRemoved); + void removeAppManually(int index); + void saveConfig(); + void about(); + +protected: + int findApp(TQString url); + int findApp(QuickButton *button); + + void mousePressEvent(TQMouseEvent *e); + void resizeEvent(TQResizeEvent*); + void dragEnterEvent(TQDragEnterEvent *e); + void dragLeaveEvent(TQDragLeaveEvent *e); + void dragMoveEvent(TQDragMoveEvent *e); + void dropEvent(TQDropEvent *e); + void refreshContents(); + void setRefreshEnabled(bool enable); + void setConserveSpace(bool conserve_space); + void setDragEnabled(bool conserve_space); + + bool conserveSpace() const { return m_manager->conserveSpace(); } + bool isDragEnabled() const { return m_settings->dragEnabled(); } + + void buildPopupMenu(); + void loadConfig(); + + void mergeButtons(int index); + void clearTempButtons(); + int dimension() const; + +protected slots: + void slotConfigure(); + void slotSettingsDialogChanged(); + void fillRemoveAppsMenu(); + void slotOwnServiceExecuted(TQString serviceMenuId); + void slotAdjustToCurrentPopularity(); + void slotStickyToggled(); + +protected: + void updateInsertionPosToStatusQuo(); + void updateStickyHighlightLayer(); + QuickButton* createButton(TQString url); + virtual void paintEvent(TQPaintEvent* e); + virtual void positionChange(Position); + + TQPopupMenu *m_popup; + TQPopupMenu *m_appletPopup; + TQPopupMenu *m_removeAppsMenu; + QuickButtonGroup *m_buttons, *m_newButtons, *m_oldButtons, *m_dragButtons; + int m_space, m_border; + TQSize m_buttonSize; + FlowGridManager *m_manager; + int m_dropLen, m_dropPos, m_minPanelDim; + bool m_dragAccepted, m_refreshEnabled, m_needsSave, m_needsRefresh; + std::map m_appOrdering; + Prefs* m_settings; + KAction *m_configAction; + ConfigDlg *m_configDialog; + PopularityStatistics* m_popularity; + TQImage m_stickyHighlightLayer; + TQTimer *m_saveTimer; +}; + +#endif diff --git a/kicker/applets/lockout/lockout.cpp b/kicker/applets/lockout/lockout.cpp index 72652d74b..b55aae92d 100644 --- a/kicker/applets/lockout/lockout.cpp +++ b/kicker/applets/lockout/lockout.cpp @@ -250,7 +250,7 @@ bool Lockout::eventFilter( TQObject *o, TQEvent *e ) void Lockout::slotLockPrefs() { // Run the screensaver settings - KRun::run( "kcmshell screensaver", KURL::List() ); + KRun::run( "tdecmshell screensaver", KURL::List() ); } void Lockout::slotTransparent() @@ -266,7 +266,7 @@ void Lockout::slotTransparent() void Lockout::slotLogoutPrefs() { // Run the logout settings. - KRun::run( "kcmshell kcmsmserver", KURL::List() ); + KRun::run( "tdecmshell kcmsmserver", KURL::List() ); } void Lockout::slotIconChanged() diff --git a/kicker/applets/media/mediaapplet.cpp b/kicker/applets/media/mediaapplet.cpp index 527c92b62..f8a1ac630 100644 --- a/kicker/applets/media/mediaapplet.cpp +++ b/kicker/applets/media/mediaapplet.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/applets/media/mediaapplet.h b/kicker/applets/media/mediaapplet.h index 68d0b5d99..4c57b508d 100644 --- a/kicker/applets/media/mediaapplet.h +++ b/kicker/applets/media/mediaapplet.h @@ -26,9 +26,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/kicker/applets/media/mediumbutton.h b/kicker/applets/media/mediumbutton.h index 3fa31756a..5f6a2b80b 100644 --- a/kicker/applets/media/mediumbutton.h +++ b/kicker/applets/media/mediumbutton.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/kicker/applets/media/preferencesdialog.cpp b/kicker/applets/media/preferencesdialog.cpp index bf8234fe5..f53381a10 100644 --- a/kicker/applets/media/preferencesdialog.cpp +++ b/kicker/applets/media/preferencesdialog.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include class MediumTypeItem : public TQCheckListItem { diff --git a/kicker/applets/media/preferencesdialog.h b/kicker/applets/media/preferencesdialog.h index e946f81de..f758d280b 100644 --- a/kicker/applets/media/preferencesdialog.h +++ b/kicker/applets/media/preferencesdialog.h @@ -22,7 +22,7 @@ #include #include -#include +#include /** *@author ervin diff --git a/kicker/applets/menu/menuapplet.cpp b/kicker/applets/menu/menuapplet.cpp index 732f5acdb..8a9f68095 100644 --- a/kicker/applets/menu/menuapplet.cpp +++ b/kicker/applets/menu/menuapplet.cpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include // avoid X11 #define's #include -#include +#include #include #include #include diff --git a/kicker/applets/minipager/Makefile.am b/kicker/applets/minipager/Makefile.am index 9320c30f5..f1009df41 100644 --- a/kicker/applets/minipager/Makefile.am +++ b/kicker/applets/minipager/Makefile.am @@ -22,4 +22,4 @@ messages: rc.cpp $(XGETTEXT) *.cpp *.h -o $(podir)/kminipagerapplet.pot srcdoc: - kdoc -a -p -H -d $$HOME/web/src/kminipagerapplet kminipagerapplet *.h -lqt -ltdecore -ltdeui -lkfile + kdoc -a -p -H -d $$HOME/web/src/kminipagerapplet kminipagerapplet *.h -lqt -ltdecore -ltdeui -ltdefile diff --git a/kicker/applets/naughty/NaughtyApplet.cpp b/kicker/applets/naughty/NaughtyApplet.cpp index eb663814b..4e3332768 100644 --- a/kicker/applets/naughty/NaughtyApplet.cpp +++ b/kicker/applets/naughty/NaughtyApplet.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/applets/run/CMakeLists.txt b/kicker/applets/run/CMakeLists.txt index 68c7c7c0c..0e1ca3960 100644 --- a/kicker/applets/run/CMakeLists.txt +++ b/kicker/applets/run/CMakeLists.txt @@ -29,6 +29,6 @@ install( FILES runapplet.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/applets tde_add_kpart( run_panelapplet AUTOMOC SOURCES runapplet.cpp - LINK kio-shared + LINK tdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kicker/applets/run/runapplet.cpp b/kicker/applets/run/runapplet.cpp index f0069cae6..5f930190a 100644 --- a/kicker/applets/run/runapplet.cpp +++ b/kicker/applets/run/runapplet.cpp @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/applets/swallow/swallow.cpp b/kicker/applets/swallow/swallow.cpp index 428d0bb7e..2f5000b72 100644 --- a/kicker/applets/swallow/swallow.cpp +++ b/kicker/applets/swallow/swallow.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/applets/systemtray/Makefile.am b/kicker/applets/systemtray/Makefile.am index 2749c7391..3ba76ca5c 100644 --- a/kicker/applets/systemtray/Makefile.am +++ b/kicker/applets/systemtray/Makefile.am @@ -21,4 +21,4 @@ messages: $(XGETTEXT) *.cpp *.h -o $(podir)/ksystemtrayapplet.pot srcdoc: - kdoc -a -p -H -d $$HOME/web/src/ksystemtrayapplet ksystemtrayapplet *.h -lqt -ltdecore -ltdeui -lkfile + kdoc -a -p -H -d $$HOME/web/src/ksystemtrayapplet ksystemtrayapplet *.h -lqt -ltdecore -ltdeui -ltdefile diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index 02f13df2b..835174f92 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/applets/taskbar/Makefile.am b/kicker/applets/taskbar/Makefile.am index 9f6914f8e..c1375230e 100644 --- a/kicker/applets/taskbar/Makefile.am +++ b/kicker/applets/taskbar/Makefile.am @@ -19,4 +19,4 @@ messages: $(XGETTEXT) *.cpp *.h -o $(podir)/ktaskbarapplet.pot srcdoc: - kdoc -a -p -H -d $$HOME/web/src/ktaskbarapplet ktaskbarapplet *.h -lqt -ltdecore -ltdeui -lkfile + kdoc -a -p -H -d $$HOME/web/src/ktaskbarapplet ktaskbarapplet *.h -lqt -ltdecore -ltdeui -ltdefile diff --git a/kicker/applets/trash/trashapplet.cpp b/kicker/applets/trash/trashapplet.cpp index 6e1f11504..478ac01ec 100644 --- a/kicker/applets/trash/trashapplet.cpp +++ b/kicker/applets/trash/trashapplet.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/applets/trash/trashbutton.cpp b/kicker/applets/trash/trashbutton.cpp index 57904db43..1f45e1fb4 100644 --- a/kicker/applets/trash/trashbutton.cpp +++ b/kicker/applets/trash/trashbutton.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/kicker/applets/trash/trashbutton.h b/kicker/applets/trash/trashbutton.h index 891e274c0..0ddad290e 100644 --- a/kicker/applets/trash/trashbutton.h +++ b/kicker/applets/trash/trashbutton.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/kicker/extensions/dockbar/dockbarextension.cpp b/kicker/extensions/dockbar/dockbarextension.cpp index 393e9a2d6..79c504874 100644 --- a/kicker/extensions/dockbar/dockbarextension.cpp +++ b/kicker/extensions/dockbar/dockbarextension.cpp @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/extensions/kasbar/kasbarapp.cpp b/kicker/extensions/kasbar/kasbarapp.cpp index abd6337df..f35fc997b 100644 --- a/kicker/extensions/kasbar/kasbarapp.cpp +++ b/kicker/extensions/kasbar/kasbarapp.cpp @@ -53,7 +53,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/kicker/extensions/kasbar/kasbarextension.cpp b/kicker/extensions/kasbar/kasbarextension.cpp index 6e011cc71..ff2a7c60d 100644 --- a/kicker/extensions/kasbar/kasbarextension.cpp +++ b/kicker/extensions/kasbar/kasbarextension.cpp @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include diff --git a/kicker/extensions/kasbar/kasprefsdlg.cpp b/kicker/extensions/kasbar/kasprefsdlg.cpp index 31f5c5a33..c3f34c0ac 100644 --- a/kicker/extensions/kasbar/kasprefsdlg.cpp +++ b/kicker/extensions/kasbar/kasprefsdlg.cpp @@ -63,7 +63,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/extensions/kasbar/kastasker.cpp b/kicker/extensions/kasbar/kastasker.cpp index a11c18547..86d688b27 100644 --- a/kicker/extensions/kasbar/kastasker.cpp +++ b/kicker/extensions/kasbar/kastasker.cpp @@ -55,13 +55,13 @@ #include #include -#include +#include #include #include #include #include -//#include +//#include #include diff --git a/kicker/kicker/CMakeLists.txt b/kicker/kicker/CMakeLists.txt index 313187cee..ce4befcae 100644 --- a/kicker/kicker/CMakeLists.txt +++ b/kicker/kicker/CMakeLists.txt @@ -30,12 +30,12 @@ link_directories( ${TQT_LIBRARY_DIRS} ) install( FILES panel.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) install( FILES kcmkicker.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES kickerrc.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update ) +install( FILES kickerrc.upd DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update ) install( PROGRAMS kicker-3.1-properSizeSetting.pl kicker-3.5-taskbarEnums.pl - kicker-3.5-kconfigXTize.pl - DESTINATION ${DATA_INSTALL_DIR}/kconf_update ) + kicker-3.5-tdeconfigXTize.pl + DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update ) ##### kicker-3.4-reverseLayout (executable) ##### @@ -43,7 +43,7 @@ install( PROGRAMS tde_add_executable( kicker-3.4-reverseLayout SOURCES kicker-3.4-reverseLayout.cpp LINK tdecore-shared - DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin + DESTINATION ${LIB_INSTALL_DIR}/tdeconf_update_bin ) diff --git a/kicker/kicker/Makefile.am b/kicker/kicker/Makefile.am index cf22b5c70..c97d61f60 100644 --- a/kicker/kicker/Makefile.am +++ b/kicker/kicker/Makefile.am @@ -28,14 +28,14 @@ messages: rc.cpp dummy.cpp: echo > $@ -kconf_PROGRAMS = kicker-3.4-reverseLayout -kconfdir = $(libdir)/kconf_update_bin +tdeconf_PROGRAMS = kicker-3.4-reverseLayout +tdeconfdir = $(libdir)/tdeconf_update_bin kicker_3_4_reverseLayout_SOURCES = kicker-3.4-reverseLayout.cpp kicker_3_4_reverseLayout_LDADD = $(LIB_QT) $(LIB_TDECORE) kicker_3_4_reverseLayout_LDFLAGS = $(all_libraries) -updatedir = $(kde_datadir)/kconf_update +updatedir = $(kde_datadir)/tdeconf_update update_DATA = kickerrc.upd -update_SCRIPTS = kicker-3.1-properSizeSetting.pl kicker-3.5-taskbarEnums.pl kicker-3.5-kconfigXTize.pl +update_SCRIPTS = kicker-3.1-properSizeSetting.pl kicker-3.5-taskbarEnums.pl kicker-3.5-tdeconfigXTize.pl diff --git a/kicker/kicker/buttons/browserbutton.cpp b/kicker/kicker/buttons/browserbutton.cpp index e470fb93a..36d650271 100644 --- a/kicker/kicker/buttons/browserbutton.cpp +++ b/kicker/kicker/buttons/browserbutton.cpp @@ -25,10 +25,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include -#include +#include #include "kicker.h" #include "browser_mnu.h" diff --git a/kicker/kicker/buttons/desktopbutton.cpp b/kicker/kicker/buttons/desktopbutton.cpp index c35a8bf47..dc6063c2b 100644 --- a/kicker/kicker/buttons/desktopbutton.cpp +++ b/kicker/kicker/buttons/desktopbutton.cpp @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include "showdesktop.h" #include "kicker.h" diff --git a/kicker/kicker/buttons/extensionbutton.cpp b/kicker/kicker/buttons/extensionbutton.cpp index 8ab9fd0bd..f45a61a4b 100644 --- a/kicker/kicker/buttons/extensionbutton.cpp +++ b/kicker/kicker/buttons/extensionbutton.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -#include +#include #include #include "menuinfo.h" diff --git a/kicker/kicker/buttons/nonkdeappbutton.cpp b/kicker/kicker/buttons/nonkdeappbutton.cpp index e48386008..016c75aee 100644 --- a/kicker/kicker/buttons/nonkdeappbutton.cpp +++ b/kicker/kicker/buttons/nonkdeappbutton.cpp @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/buttons/servicemenubutton.cpp b/kicker/kicker/buttons/servicemenubutton.cpp index 0ebc931f4..a15ba1cf1 100644 --- a/kicker/kicker/buttons/servicemenubutton.cpp +++ b/kicker/kicker/buttons/servicemenubutton.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -#include +#include #include #include diff --git a/kicker/kicker/buttons/urlbutton.cpp b/kicker/kicker/buttons/urlbutton.cpp index 132aa8193..ac9934b33 100644 --- a/kicker/kicker/buttons/urlbutton.cpp +++ b/kicker/kicker/buttons/urlbutton.cpp @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/core/container_applet.cpp b/kicker/kicker/core/container_applet.cpp index a35b34fd0..d3d7f10ba 100644 --- a/kicker/kicker/core/container_applet.cpp +++ b/kicker/kicker/core/container_applet.cpp @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/core/container_base.cpp b/kicker/kicker/core/container_base.cpp index 56c09f285..1efafe801 100644 --- a/kicker/kicker/core/container_base.cpp +++ b/kicker/kicker/core/container_base.cpp @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include "global.h" diff --git a/kicker/kicker/core/container_button.cpp b/kicker/kicker/core/container_button.cpp index 30c31401d..8196127e9 100644 --- a/kicker/kicker/core/container_button.cpp +++ b/kicker/kicker/core/container_button.cpp @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp index 7639fe146..d2f2982b7 100644 --- a/kicker/kicker/core/container_extension.cpp +++ b/kicker/kicker/core/container_extension.cpp @@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp index 12949f95b..c42ffc13a 100644 --- a/kicker/kicker/core/containerarea.cpp +++ b/kicker/kicker/core/containerarea.cpp @@ -45,7 +45,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index 62594443f..893cb1665 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -27,10 +27,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -233,7 +233,7 @@ void ExtensionManager::migrateMenubar() // will have a menubar in it, and if so, abort creating one of our // own. // - // the reason i didn't do this as a kconfig_update script is that + // the reason i didn't do this as a tdeconfig_update script is that // most people don't use this feature, so no reason to penalize // everyone, and moreover the user may added this to their main // panel, meaning kickerrc itself would have to be vastly modified diff --git a/kicker/kicker/core/kicker.cpp b/kicker/kicker/core/kicker.cpp index 3fa04e374..0521e6413 100644 --- a/kicker/kicker/core/kicker.cpp +++ b/kicker/kicker/core/kicker.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/core/main.cpp b/kicker/kicker/core/main.cpp index 17a148474..e6c5ba842 100644 --- a/kicker/kicker/core/main.cpp +++ b/kicker/kicker/core/main.cpp @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include diff --git a/kicker/kicker/core/panelextension.cpp b/kicker/kicker/core/panelextension.cpp index 6b41f1c50..fbf6b9e43 100644 --- a/kicker/kicker/core/panelextension.cpp +++ b/kicker/kicker/core/panelextension.cpp @@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include "container_applet.h" diff --git a/kicker/kicker/kcmkicker.desktop b/kicker/kicker/kcmkicker.desktop index 929871123..348ed746e 100644 --- a/kicker/kicker/kcmkicker.desktop +++ b/kicker/kicker/kcmkicker.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Icon=kcmkicker Type=Application -Exec=kcmshell %i kicker_config kcmtaskbar +Exec=tdecmshell %i kicker_config kcmtaskbar Name=Configure the Panel Name[af]=Stel die paneel op Name[ar]=قم بإعداد اللوحة diff --git a/kicker/kicker/kicker-3.4-reverseLayout.cpp b/kicker/kicker/kicker-3.4-reverseLayout.cpp index a588c6258..9491e7d41 100644 --- a/kicker/kicker/kicker-3.4-reverseLayout.cpp +++ b/kicker/kicker/kicker-3.4-reverseLayout.cpp @@ -130,7 +130,7 @@ int main(int argc, char** argv) if (!childPanelConfigFiles.isEmpty()) { - // Create a temporary kconf_update .upd file for updating the childpanels + // Create a temporary tdeconf_update .upd file for updating the childpanels KTempFile tempFile(TQString::null, ".upd"); TQTextStream* upd = tempFile.textStream(); for (it = childPanelConfigFiles.begin(); it != childPanelConfigFiles.end(); ++it) @@ -142,10 +142,10 @@ int main(int argc, char** argv) } tempFile.close(); - // Run kconf_update on the childpanel config files. - TDEProcess kconf_update; - kconf_update << "kconf_update" << tempFile.name(); - kconf_update.start(TDEProcess::Block); + // Run tdeconf_update on the childpanel config files. + TDEProcess tdeconf_update; + tdeconf_update << "tdeconf_update" << tempFile.name(); + tdeconf_update.start(TDEProcess::Block); tempFile.unlink(); } diff --git a/kicker/kicker/kicker-3.5-kconfigXTize.pl b/kicker/kicker/kicker-3.5-kconfigXTize.pl deleted file mode 100755 index e836116d7..000000000 --- a/kicker/kicker/kicker-3.5-kconfigXTize.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -$detailed = 1; -$namesfirst = 1; - -while (<>) -{ - ($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/); - if ($key eq "DetailedMenuEntries") - { - if ($value eq "false") - { - $detailed = 0; - } - } - elsif ($key eq "DetailedEntriesNamesFirst") - { - if ($value eq "false") - { - $namesfirst = 0; - } - } -} - -if (not $detailed) -{ - print "MenuEntryFormat=NameOnly\n"; -} -elsif ($namesfirst) -{ - print "MenuEntryFormat=NameAndDescription\n"; -} -else -{ - print "MenuEntryFormat=DescriptionAndName\n"; -} - diff --git a/kicker/kicker/kicker-3.5-tdeconfigXTize.pl b/kicker/kicker/kicker-3.5-tdeconfigXTize.pl new file mode 100755 index 000000000..e836116d7 --- /dev/null +++ b/kicker/kicker/kicker-3.5-tdeconfigXTize.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +$detailed = 1; +$namesfirst = 1; + +while (<>) +{ + ($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/); + if ($key eq "DetailedMenuEntries") + { + if ($value eq "false") + { + $detailed = 0; + } + } + elsif ($key eq "DetailedEntriesNamesFirst") + { + if ($value eq "false") + { + $namesfirst = 0; + } + } +} + +if (not $detailed) +{ + print "MenuEntryFormat=NameOnly\n"; +} +elsif ($namesfirst) +{ + print "MenuEntryFormat=NameAndDescription\n"; +} +else +{ + print "MenuEntryFormat=DescriptionAndName\n"; +} + diff --git a/kicker/kicker/kickerrc.upd b/kicker/kicker/kickerrc.upd index 282a52cb1..5b82f9e2c 100644 --- a/kicker/kicker/kickerrc.upd +++ b/kicker/kicker/kickerrc.upd @@ -14,9 +14,9 @@ Group=General Options=overwrite Script=kicker-3.5-taskbarEnums.pl,perl -Id=kde_3_5_kconfigXTize +Id=kde_3_5_tdeconfigXTize File=kickerrc Group=menus -Script=kicker-3.5-kconfigXTize.pl,perl +Script=kicker-3.5-tdeconfigXTize.pl,perl RemoveKey=DetailedEntriesNamesFirst RemoveKey=DetailedMenuEntries diff --git a/kicker/kicker/ui/browser_dlg.cpp b/kicker/kicker/ui/browser_dlg.cpp index 6aa246eb6..3ebe095dc 100644 --- a/kicker/kicker/ui/browser_dlg.cpp +++ b/kicker/kicker/ui/browser_dlg.cpp @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include diff --git a/kicker/kicker/ui/browser_mnu.cpp b/kicker/kicker/ui/browser_mnu.cpp index c6ca4ab32..9aa352500 100644 --- a/kicker/kicker/ui/browser_mnu.cpp +++ b/kicker/kicker/ui/browser_mnu.cpp @@ -28,12 +28,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kicker/kicker/ui/itemview.cpp b/kicker/kicker/ui/itemview.cpp index 3d33a825a..ee82bc91f 100644 --- a/kicker/kicker/ui/itemview.cpp +++ b/kicker/kicker/ui/itemview.cpp @@ -50,7 +50,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp index 84c977331..eb87f02d0 100644 --- a/kicker/kicker/ui/k_mnu.cpp +++ b/kicker/kicker/ui/k_mnu.cpp @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp index 6f2c4eacb..f5bf25471 100644 --- a/kicker/kicker/ui/k_new_mnu.cpp +++ b/kicker/kicker/ui/k_new_mnu.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -70,8 +70,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -3512,16 +3512,16 @@ bool KMenu::ensureServiceRunning(const TQString & service) TQDataStream arg(data, IO_WriteOnly); arg << service << URLs; - if ( !kapp->dcopClient()->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)", + if ( !kapp->dcopClient()->call( "tdelauncher", "tdelauncher", "start_service_by_desktop_name(TQString,TQStringList)", data, replyType, replyData) ) { - tqWarning( "call to klauncher failed."); + tqWarning( "call to tdelauncher failed."); return false; } TQDataStream reply(replyData, IO_ReadOnly); if ( replyType != "serviceResult" ) { - tqWarning( "unexpected result '%s' from klauncher.", replyType.data()); + tqWarning( "unexpected result '%s' from tdelauncher.", replyType.data()); return false; } int result; diff --git a/kicker/kicker/ui/service_mnu.cpp b/kicker/kicker/ui/service_mnu.cpp index 1e77a1731..dfe3f4433 100644 --- a/kicker/kicker/ui/service_mnu.cpp +++ b/kicker/kicker/ui/service_mnu.cpp @@ -44,7 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include "global.h" #include "kicker.h" diff --git a/kicker/libkicker/CMakeLists.txt b/kicker/libkicker/CMakeLists.txt index 036095728..e2ec5a6ba 100644 --- a/kicker/libkicker/CMakeLists.txt +++ b/kicker/libkicker/CMakeLists.txt @@ -37,6 +37,6 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 1.0.0 - LINK kio-shared + LINK tdeio-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/kicker/libkicker/global.cpp b/kicker/libkicker/global.cpp index f300df3a2..87f990b30 100644 --- a/kicker/libkicker/global.cpp +++ b/kicker/libkicker/global.cpp @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/libkicker/panelbutton.cpp b/kicker/libkicker/panelbutton.cpp index e9481ea85..1f011da5a 100644 --- a/kicker/libkicker/panelbutton.cpp +++ b/kicker/libkicker/panelbutton.cpp @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include diff --git a/kicker/menuext/kate/katesessionmenu.cpp b/kicker/menuext/kate/katesessionmenu.cpp index 032a2ab05..e4de35081 100644 --- a/kicker/menuext/kate/katesessionmenu.cpp +++ b/kicker/menuext/kate/katesessionmenu.cpp @@ -22,7 +22,7 @@ #include "katesessionmenu.moc" #include -#include +#include #include #include #include diff --git a/kicker/menuext/konq-profiles/CMakeLists.txt b/kicker/menuext/konq-profiles/CMakeLists.txt index 9154412c8..2847be4fe 100644 --- a/kicker/menuext/konq-profiles/CMakeLists.txt +++ b/kicker/menuext/konq-profiles/CMakeLists.txt @@ -28,6 +28,6 @@ install( FILES konquerormenu.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/menu tde_add_kpart( kickermenu_konqueror AUTOMOC SOURCES konqy_menu.cpp - LINK kio-shared + LINK tdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kicker/menuext/konq-profiles/konqy_menu.cpp b/kicker/menuext/konq-profiles/konqy_menu.cpp index a3c076741..4ed8c32e1 100644 --- a/kicker/menuext/konq-profiles/konqy_menu.cpp +++ b/kicker/menuext/konq-profiles/konqy_menu.cpp @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include diff --git a/kicker/menuext/konsole/CMakeLists.txt b/kicker/menuext/konsole/CMakeLists.txt index e16884acf..9c2f7224f 100644 --- a/kicker/menuext/konsole/CMakeLists.txt +++ b/kicker/menuext/konsole/CMakeLists.txt @@ -28,6 +28,6 @@ install( FILES konsolemenu.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/menuex tde_add_kpart( kickermenu_konsole AUTOMOC SOURCES konsole_mnu.cpp konsolebookmarkhandler.cpp konsolebookmarkmenu.cpp - LINK kio-shared + LINK tdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kicker/menuext/konsole/konsole_mnu.cpp b/kicker/menuext/konsole/konsole_mnu.cpp index dbaa1e434..d2fb755bb 100644 --- a/kicker/menuext/konsole/konsole_mnu.cpp +++ b/kicker/menuext/konsole/konsole_mnu.cpp @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kicker/menuext/konsole/konsolebookmarkhandler.cpp b/kicker/menuext/konsole/konsolebookmarkhandler.cpp index e515e41f5..e12d6ebc1 100644 --- a/kicker/menuext/konsole/konsolebookmarkhandler.cpp +++ b/kicker/menuext/konsole/konsolebookmarkhandler.cpp @@ -1,4 +1,4 @@ -// Born as tdelibs/kio/kfile/kfilebookmarkhandler.cpp +// Born as tdelibs/tdeio/tdefile/tdefilebookmarkhandler.cpp #include #include @@ -29,7 +29,7 @@ KonsoleBookmarkHandler::KonsoleBookmarkHandler( KonsoleMenu *konsole, bool ) // import old bookmarks if ( !KStandardDirs::exists( file ) ) { - TQString oldFile = locate( "data", "kfile/bookmarks.html" ); + TQString oldFile = locate( "data", "tdefile/bookmarks.html" ); if ( !oldFile.isEmpty() ) importOldBookmarks( oldFile, file ); } diff --git a/kicker/menuext/konsole/konsolebookmarkhandler.h b/kicker/menuext/konsole/konsolebookmarkhandler.h index cc0b1886b..733e52442 100644 --- a/kicker/menuext/konsole/konsolebookmarkhandler.h +++ b/kicker/menuext/konsole/konsolebookmarkhandler.h @@ -1,4 +1,4 @@ -// Born as tdelibs/kio/kfile/kfilebookmarkhandler.h +// Born as tdelibs/tdeio/tdefile/tdefilebookmarkhandler.h #ifndef KONSOLEBOOKMARKHANDLER_H #define KONSOLEBOOKMARKHANDLER_H diff --git a/kicker/menuext/recentdocs/CMakeLists.txt b/kicker/menuext/recentdocs/CMakeLists.txt index ebefed9c6..4b3053efe 100644 --- a/kicker/menuext/recentdocs/CMakeLists.txt +++ b/kicker/menuext/recentdocs/CMakeLists.txt @@ -28,6 +28,6 @@ install( FILES recentdocs.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/menuext tde_add_kpart( kickermenu_recentdocs AUTOMOC SOURCES recentdocsmenu.cpp - LINK kio-shared + LINK tdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kicker/menuext/system/systemmenu.h b/kicker/menuext/system/systemmenu.h index f25280989..1efbc3c57 100644 --- a/kicker/menuext/system/systemmenu.h +++ b/kicker/menuext/system/systemmenu.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include class SystemMenu : public KPanelMenu { diff --git a/kicker/menuext/tdeprint/print_mnu.cpp b/kicker/menuext/tdeprint/print_mnu.cpp index fb10e0f34..e611b039e 100644 --- a/kicker/menuext/tdeprint/print_mnu.cpp +++ b/kicker/menuext/tdeprint/print_mnu.cpp @@ -112,7 +112,7 @@ void PrintMenu::slotExec(int ID) kapp->tdeinitExec("kaddprinterwizard", TQStringList("--serverconfig")); break; case PRINT_MANAGER_ID: - KRun::runCommand("kcmshell tde-printers.desktop"); + KRun::runCommand("tdecmshell tde-printers.desktop"); break; case PRINT_BROWSER_ID: KRun::runCommand("kfmclient openProfile filemanagement print:/", "kfmclient", "konqueror"); diff --git a/kicker/taskmanager/taskmanager.cpp b/kicker/taskmanager/taskmanager.cpp index 6215f9ba6..a1d68e98a 100644 --- a/kicker/taskmanager/taskmanager.cpp +++ b/kicker/taskmanager/taskmanager.cpp @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include #include -- cgit v1.2.3