Browse Source

* Added Kickoff menu

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1171422 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 12 years ago
parent
commit
fd7a608ffe
  1. 2
      kcontrol/kicker/kicker_config_hiding.desktop
  2. 2
      kcontrol/kicker/kicker_config_menus.desktop
  3. 70
      kcontrol/kicker/menutab.ui
  4. 50
      kcontrol/kicker/menutab_impl.cpp
  5. 1
      kcontrol/kicker/menutab_impl.h
  6. 4
      kicker/applets/clock/clock.cpp
  7. 2
      kicker/applets/launcher/quicklauncher.cpp
  8. 55
      kicker/applets/media/mediumbutton.cpp
  9. 2
      kicker/applets/minipager/pagerbutton.cpp
  10. 2
      kicker/applets/naughty/NaughtyProcessMonitor.cpp
  11. 2
      kicker/applets/systemtray/systemtrayapplet.cpp
  12. 2
      kicker/applets/trash/trashbutton.cpp
  13. 78
      kicker/configure.in.in
  14. 2
      kicker/data/Makefile.am
  15. 14
      kicker/data/kickoff/Makefile.am
  16. BIN
      kicker/data/kickoff/kmenu_active.png
  17. BIN
      kicker/data/kickoff/kmenu_basic.mng
  18. BIN
      kicker/data/kickoff/kmenu_flipped.mng
  19. BIN
      kicker/data/kickoff/kmenu_vertical.mng
  20. 5
      kicker/data/kmenu_side/Makefile.am
  21. 2
      kicker/extensions/kasbar/kasbar.cpp
  22. 2
      kicker/extensions/kasbar/kasclockitem.cpp
  23. 2
      kicker/extensions/kasbar/kasloaditem.cpp
  24. 2
      kicker/extensions/kasbar/kasstartupitem.cpp
  25. 5
      kicker/kicker/Makefile.am
  26. 4
      kicker/kicker/buttons/Makefile.am
  27. 2
      kicker/kicker/buttons/browserbutton.cpp
  28. 3
      kicker/kicker/buttons/kbutton.cpp
  29. 455
      kicker/kicker/buttons/knewbutton.cpp
  30. 98
      kicker/kicker/buttons/knewbutton.h
  31. 8
      kicker/kicker/core/Makefile.am
  32. 23
      kicker/kicker/core/applethandle.cpp
  33. 11
      kicker/kicker/core/container_button.cpp
  34. 3
      kicker/kicker/core/containerarea.cpp
  35. 5
      kicker/kicker/core/kicker.cpp
  36. 300
      kicker/kicker/core/kmenubase.ui
  37. 9
      kicker/kicker/core/kmenubase.ui.h
  38. 2
      kicker/kicker/core/main.cpp
  39. 32
      kicker/kicker/core/menumanager.cpp
  40. 9
      kicker/kicker/core/menumanager.h
  41. 2
      kicker/kicker/core/unhidetrigger.cpp
  42. 12
      kicker/kicker/interfaces/Makefile.am
  43. 37
      kicker/kicker/interfaces/kickoff-search-plugin.cpp
  44. 106
      kicker/kicker/interfaces/kickoff-search-plugin.h
  45. 27
      kicker/kicker/interfaces/kickoffsearchinterface.cpp
  46. 46
      kicker/kicker/interfaces/kickoffsearchinterface.h
  47. 4
      kicker/kicker/interfaces/kickoffsearchplugin.desktop
  48. 24
      kicker/kicker/plugins/Makefile.am
  49. 362
      kicker/kicker/plugins/beaglesearch.cpp
  50. 234
      kicker/kicker/plugins/beaglesearch.h
  51. 499
      kicker/kicker/plugins/kickoff-beagle-plugin.cpp
  52. 64
      kicker/kicker/plugins/kickoff-beagle-plugin.h
  53. 6
      kicker/kicker/plugins/kickoffsearch_beagle.desktop
  54. 24
      kicker/kicker/ui/Makefile.am
  55. 1
      kicker/kicker/ui/addappletvisualfeedback.cpp
  56. 22
      kicker/kicker/ui/appletop_mnu.cpp
  57. 3
      kicker/kicker/ui/appletop_mnu.h
  58. 2
      kicker/kicker/ui/browser_mnu.cpp
  59. 9
      kicker/kicker/ui/default-favs
  60. 324
      kicker/kicker/ui/flipscrollview.cpp
  61. 118
      kicker/kicker/ui/flipscrollview.h
  62. 1257
      kicker/kicker/ui/itemview.cpp
  63. 260
      kicker/kicker/ui/itemview.h
  64. 141
      kicker/kicker/ui/k_mnu_stub.cpp
  65. 72
      kicker/kicker/ui/k_mnu_stub.h
  66. 3779
      kicker/kicker/ui/k_new_mnu.cpp
  67. 343
      kicker/kicker/ui/k_new_mnu.h
  68. 200
      kicker/kicker/ui/kickoff_bar.cpp
  69. 53
      kicker/kicker/ui/kickoff_bar.h
  70. 141
      kicker/kicker/ui/kmenuitembase.ui
  71. 57
      kicker/kicker/ui/media_watcher.cpp
  72. 51
      kicker/kicker/ui/media_watcher.h
  73. 54
      kicker/kicker/ui/mykickoffsearchinterface.cpp
  74. 47
      kicker/kicker/ui/mykickoffsearchinterface.h
  75. 136
      kicker/kicker/ui/query.cpp
  76. 55
      kicker/kicker/ui/query.h
  77. 100
      kicker/libkicker/kickerSettings.kcfg
  78. 24
      kicker/libkicker/kickertip.cpp
  79. 2
      kicker/libkicker/kickertip.h
  80. 56
      kicker/libkicker/panelbutton.cpp
  81. 13
      kicker/libkicker/panelbutton.h
  82. 3
      kicker/taskbar/taskbar.cpp
  83. 12
      kicker/taskbar/taskcontainer.cpp

2
kcontrol/kicker/kicker_config_hiding.desktop

@ -150,7 +150,7 @@ Keywords[csb]=kicker,panel,kpanel,lëstëw zadaniów,sztartowô lëstëw,lëstë
Keywords[cy]=ciciwr,kicker,panel,kpanel,bar tasgau,bar cychwyn,bar lansio,lleoliad,maint,awto-guddio,hunan-guddio,cuddio,botymau,animeiddiad,cefndir,themâu,storfa dewislen, storfa,cache,celc,cudd,K-Menu,nodau tudalen,dogfenni diweddar,porydd cyflym,dewislen porydd,dewislen,eiconau,teiliau,rhaglenigion,ymcychwyn,amlygu,carnau,eiconau chwyddo
Keywords[da]=kicker,panel,kpanel,opgavelinje,startlinje,sted,størrelse,autogem,gem,knapper,animering,baggrund,temaer,menucache,cache,skjult,K-Menu,bogmærker,nylige dokumenter,hurtigsøger,søgemenu,menu,ikoner,fliser,panelprogrammer,opstart,markér,håndterer,ikoner
Keywords[de]=Kicker,Panel,Taskbar,Kontrollleiste,Startleiste,Klickstartleiste,Fensterleiste,Autom. ausblenden,Ausblenden, Knöpfe,Animation,Hintergründe,Stile,Design,Themes,Menü-Zwischenspeicher, K-Menü,Zwischenspeicher,Lesezeichen,Zuletzt geöffnete Dateien, Schnellanzeiger,Menüs,Symbole,Icons,Kacheln,Applets,Miniprogramme, Java-Miniprogramme,Hervorhebung,Anfasser,Sicherheitsstufen,Zoom für Symbole
Keywords[el]=kicker,πίνακας,kpanel,γραμμή εργασιών,γραμμή έναρξης,γραμμή εκκίνησης,τοποθεσία,μέγεθος,αυτόματη απόκρυψη,απόκρυψη,κουμπιά,εφέ κίνησης,φόντο,θέματα,λανθάνουσα μνήμη μενού,λανθάνουσα μνήμη,κρυφό, K-Μενού,σελιδοδείκτες,πρόσφατα έγγραφα,γρήγορος εξερευνητής,μενού εξερευνητή,μενού,εικονίδια,tiles,μικροεφαρμογές,έναρξη,τονισμός,χειριστήρια, μεγέθυνση εικονιδίων
Keywords[el]=kicker,πίνακας,kpanel,γραμμή εργασιών,γραμμή έναρξης,γραμμή εκκίνησης,τοποθεσία,μέγεθος,αυτόματη απόκρυψη,απόκρυψη,κουμπιά,εφέ κίνησης,φόντο,θέματα,λανθάνουσα μνήμη μενού,λανθάνουσα μνήμη,κρυφό, K-Μενού,σελιδοδείκτες,πρόσφατα έγγραφα,γρήγορος εξερευνητής,μενού εξερευνητή,μενού,εικονίδια,tiles,εφαρμογίδια,έναρξη,τονισμός,χειριστήρια, μεγέθυνση εικονιδίων
Keywords[eo]=lanĉilo,panelo,tasklistelo,situo,grandeco,aŭtokaŝo,kaŝo,butono,fono,etoso,menubufro,K-Menuo,legosigno,lasta dokumento,rapidrigardilo,rigardmenuo,piktogramo,kahelo,aplikaĵo,lanĉo,emfazo,teniloj,pligrandigo,fidindaj aplikaĵetoj,sekurecnivelo
Keywords[es]=kicker,panel,kpanel,barra de tareas,barra de inicio,barra de lanzamiento,dirección,tamaño,auto ocultar,ocultar,botones,animación,fondo,temas,caché de menú,caché,oculto,Menú K,marcadores,documentos recientes,navegador rápido,menú navegador,menú,iconos,mosaicos,miniaplicaciones,arranque,resaltado,asas,iconos ampliados
Keywords[et]=kicker,paneel,kpanel,tegumiriba,käivitusriba,asukoht,suurus,terminal,automaatne peitmine,peitmine,nupud,animatsioon,taust,teemad,menüü vahemälu,vahemälu,peidetud,K-menüü,järjehoidjad,viimati kasutatud dokumendid, kiirbrauser,lehitsemise menüü,menüü,ikoonid,apletid,käivitamine,esiletõstmine,piirded,ikoonide suurendamine,usaldusväärsed apletid,turvatase

2
kcontrol/kicker/kicker_config_menus.desktop

@ -147,7 +147,7 @@ Keywords[csb]=kicker,panel,kpanel,lëstëw zadaniów,sztartowô lëstëw,lëstë
Keywords[cy]=ciciwr,kicker,panel,kpanel,bar tasgau,bar cychwyn,bar lansio,lleoliad,maint,awto-guddio,hunan-guddio,cuddio,botymau,animeiddiad,cefndir,themâu,storfa dewislen, storfa,cache,celc,cudd,K-Menu,nodau tudalen,dogfenni diweddar,porydd cyflym,dewislen porydd,dewislen,eiconau,teiliau,rhaglenigion,ymcychwyn,amlygu,carnau,eiconau chwyddo
Keywords[da]=kicker,panel,kpanel,opgavelinje,startlinje,sted,størrelse,autogem,gem,knapper,animering,baggrund,temaer,menucache,cache,skjult,K-Menu,bogmærker,nylige dokumenter,hurtigsøger,søgemenu,menu,ikoner,fliser,panelprogrammer,opstart,markér,håndterer,ikoner
Keywords[de]=Kicker,Panel,Taskbar,Kontrollleiste,Startleiste,Klickstartleiste,Fensterleiste,Autom. ausblenden,Ausblenden, Knöpfe,Animation,Hintergründe,Stile,Design,Themes,Menü-Zwischenspeicher, K-Menü,Zwischenspeicher,Lesezeichen,Zuletzt geöffnete Dateien, Schnellanzeiger,Menüs,Symbole,Icons,Kacheln,Applets,Miniprogramme, Java-Miniprogramme,Hervorhebung,Anfasser,Sicherheitsstufen,Zoom für Symbole
Keywords[el]=kicker,πίνακας,kpanel,γραμμή εργασιών,γραμμή έναρξης,γραμμή εκκίνησης,τοποθεσία,μέγεθος,αυτόματη απόκρυψη,απόκρυψη,κουμπιά,εφέ κίνησης,φόντο,θέματα,λανθάνουσα μνήμη μενού,λανθάνουσα μνήμη,κρυφό, K-Μενού,σελιδοδείκτες,πρόσφατα έγγραφα,γρήγορος εξερευνητής,μενού εξερευνητή,μενού,εικονίδια,tiles,μικροεφαρμογές,έναρξη,τονισμός,χειριστήρια, μεγέθυνση εικονιδίων
Keywords[el]=kicker,πίνακας,kpanel,γραμμή εργασιών,γραμμή έναρξης,γραμμή εκκίνησης,τοποθεσία,μέγεθος,αυτόματη απόκρυψη,απόκρυψη,κουμπιά,εφέ κίνησης,φόντο,θέματα,λανθάνουσα μνήμη μενού,λανθάνουσα μνήμη,κρυφό, K-Μενού,σελιδοδείκτες,πρόσφατα έγγραφα,γρήγορος εξερευνητής,μενού εξερευνητή,μενού,εικονίδια,tiles,εφαρμογίδια,έναρξη,τονισμός,χειριστήρια, μεγέθυνση εικονιδίων
Keywords[eo]=lanĉilo,panelo,tasklistelo,situo,grandeco,aŭtokaŝo,kaŝo,butono,fono,etoso,menubufro,K-Menuo,legosigno,lasta dokumento,rapidrigardilo,rigardmenuo,piktogramo,kahelo,aplikaĵo,lanĉo,emfazo,teniloj,pligrandigo,fidindaj aplikaĵetoj,sekurecnivelo
Keywords[es]=kicker,panel,kpanel,barra de tareas,barra de inicio,barra de lanzamiento,dirección,tamaño,auto ocultar,ocultar,botones,animación,fondo,temas,caché de menú,caché,oculto,Menú K,marcadores,documentos recientes,navegador rápido,menú navegador,menú,iconos,mosaicos,miniaplicaciones,arranque,resaltado,asas,iconos ampliados
Keywords[et]=kicker,paneel,kpanel,tegumiriba,käivitusriba,asukoht,suurus,terminal,automaatne peitmine,peitmine,nupud,animatsioon,taust,teemad,menüü vahemälu,vahemälu,peidetud,K-menüü,järjehoidjad,viimati kasutatud dokumendid, kiirbrauser,lehitsemise menüü,menüü,ikoonid,apletid,käivitamine,esiletõstmine,piirded,ikoonide suurendamine,usaldusväärsed apletid,turvatase

70
kcontrol/kicker/menutab.ui

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
<height>437</height>
<width>923</width>
<height>649</height>
</rect>
</property>
<vbox>
@ -19,6 +19,59 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Start menu style:</string>
</property>
<property name="buddy" stdset="0">
<cstring>comboMenuStyle</cstring>
</property>
</widget>
<widget class="QComboBox">
<item>
<property name="text">
<string>Kickoff</string>
</property>
</item>
<item>
<property name="text">
<string>Trinity Classic</string>
</property>
</item>
<property name="name">
<cstring>m_comboMenuStyle</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>m_kmenuGroup</cstring>
@ -38,6 +91,14 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox" row="0" column="0">
<property name="name">
<cstring>m_openOnHover</cstring>
</property>
<property name="text">
<string>Open menu on mouse hover</string>
</property>
</widget>
<widget class="QButtonGroup">
<property name="name">
<cstring>kcfg_MenuEntryFormat</cstring>
@ -649,6 +710,8 @@
</grid>
</vbox>
</widget>
<customwidgets>
</customwidgets>
<tabstops>
<tabstop>m_formatSimple</tabstop>
<tabstop>m_formatNameDesc</tabstop>
@ -672,8 +735,5 @@
<includehints>
<includehint>klistview.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>

50
kcontrol/kicker/menutab_impl.cpp

@ -16,12 +16,16 @@
*/
#include <tqcheckbox.h>
#include <tqgroupbox.h>
#include <tqdir.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqpushbutton.h>
#include <tqradiobutton.h>
#include <tqcombobox.h>
#include <tqbuttongroup.h>
#include <dcopref.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdesktopfile.h>
@ -148,12 +152,47 @@ void MenuTab::load( bool useDefaults )
}
}
c->setGroup("General");
m_comboMenuStyle->setCurrentItem( c->readBoolEntry("LegacyKMenu", true) ? 1 : 0 );
m_openOnHover->setChecked( c->readBoolEntry("OpenOnHover", true) );
menuStyleChanged();
connect(m_comboMenuStyle, TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed()));
connect(m_comboMenuStyle, TQT_SIGNAL(activated(int)), TQT_SLOT(menuStyleChanged()));
connect(m_openOnHover, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()));
m_showFrequent->setChecked(true);
if ( useDefaults )
emit changed();
}
void MenuTab::menuStyleChanged()
{
if (m_comboMenuStyle->currentItem()==1) {
m_openOnHover->setEnabled(false);
m_subMenus->setEnabled(true);
kcfg_UseSidePixmap->setEnabled(true);
kcfg_MenuEntryFormat->setEnabled(true);
kcfg_RecentVsOften->setEnabled(true);
m_showFrequent->setEnabled(true);
kcfg_UseSearchBar->setEnabled(true);
kcfg_MaxEntries2->setEnabled(true);
maxrecentdocs->setEnabled(true);
}
else {
m_openOnHover->setEnabled(true);
m_subMenus->setEnabled(false);
kcfg_UseSidePixmap->setEnabled(false);
kcfg_MenuEntryFormat->setEnabled(false);
kcfg_RecentVsOften->setEnabled(false);
m_showFrequent->setEnabled(false);
kcfg_UseSearchBar->setEnabled(false);
kcfg_MaxEntries2->setEnabled(false);
maxrecentdocs->setEnabled(false);
}
}
void MenuTab::save()
{
KSharedConfig::Ptr c = KSharedConfig::openConfig(KickerConfig::the()->configName());
@ -179,9 +218,18 @@ void MenuTab::save()
}
}
c->writeEntry("Extensions", ext);
c->setGroup("General");
bool kmenusetting = m_comboMenuStyle->currentItem()==1;
bool oldkmenusetting = c->readBoolEntry("LegacyKMenu", true);
c->writeEntry("LegacyKMenu", kmenusetting);
c->writeEntry("OpenOnHover", m_openOnHover->isChecked());
c->sync();
if (kmenusetting != oldkmenusetting)
DCOPRef ("kicker", "default").call("restart()");
// Save KMenu settings
c->setGroup("KMenu");
c->writeEntry("CustomIcon", m_kmenu_icon);
@ -195,7 +243,7 @@ void MenuTab::save()
config->sync();
if (m_kmenu_button_changed == true) {
system("dcop kicker kicker restart &");
DCOPRef ("kicker", "default").call("restart()");
}
}

1
kcontrol/kicker/menutab_impl.h

@ -65,6 +65,7 @@ signals:
public slots:
void launchMenuEditor();
void menuStyleChanged();
void launchIconEditor();
void kmenuChanged();

4
kicker/applets/clock/clock.cpp

@ -901,8 +901,8 @@ ClockApplet::ClockApplet(const TQString& configFile, Type t, int actions,
_calendar(0),
_disableCalendar(false),
_clock(0),
_timer(new TQTimer(this)),
m_layoutTimer(new TQTimer(this)),
_timer(new TQTimer(this, "ClockApplet::_timer")),
m_layoutTimer(new TQTimer(this, "m_layoutTimer")),
m_layoutDelay(0),
m_followBackgroundSetting(true),
m_dateFollowBackgroundSetting(true),

2
kicker/applets/launcher/quicklauncher.cpp

@ -110,7 +110,7 @@ QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions,
m_configAction = new KAction(i18n("Configure Quicklauncher..."), "configure", KShortcut(),
this, TQT_SLOT(slotConfigure()), this);
m_saveTimer = new TQTimer(this);
m_saveTimer = new TQTimer(this, "m_saveTimer");
connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig()));
m_popularity = new PopularityStatistics();

55
kicker/applets/media/mediumbutton.cpp

@ -45,7 +45,8 @@
#include <konq_drag.h>
MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem)
: PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem)
: PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem), mOpenTimer(0,
"MediumButton::mOpenTimer")
{
KAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()),
&mActions, "pasteto");
@ -74,9 +75,9 @@ MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem)
MediumButton::~MediumButton()
{
TQPopupMenu *menu = popup();
setPopup(0);
delete menu;
TQPopupMenu *menu = static_cast<TQPopupMenu*>(popup());
setPopup(0);
delete menu;
}
const KFileItem &MediumButton::fileItem() const
@ -94,29 +95,29 @@ void MediumButton::setFileItem(const KFileItem &fileItem)
void MediumButton::initPopup()
{
TQPopupMenu *old_popup = popup();
KFileItemList items;
items.append(&mFileItem);
KonqPopupMenu::KonqPopupFlags kpf =
KonqPopupMenu::ShowProperties
| KonqPopupMenu::ShowNewWindow;
KParts::BrowserExtension::PopupFlags bef =
KParts::BrowserExtension::DefaultPopupItems;
KonqPopupMenu *new_popup = new KonqPopupMenu(0L, items,
KURL("media:/"), mActions, 0L,
this, kpf, bef);
KPopupTitle *title = new KPopupTitle(new_popup);
title->setTitle(mFileItem.text());
new_popup->insertItem(title, -1, 0);
setPopup(new_popup);
if (old_popup!=0L) delete old_popup;
TQPopupMenu *old_popup = static_cast<TQPopupMenu*>(popup());
KFileItemList items;
items.append(&mFileItem);
KonqPopupMenu::KonqPopupFlags kpf =
KonqPopupMenu::ShowProperties
| KonqPopupMenu::ShowNewWindow;
KParts::BrowserExtension::PopupFlags bef =
KParts::BrowserExtension::DefaultPopupItems;
KonqPopupMenu *new_popup = new KonqPopupMenu(0L, items,
KURL("media:/"), mActions, 0L,
this, kpf, bef);
KPopupTitle *title = new KPopupTitle(new_popup);
title->setTitle(mFileItem.text());
new_popup->insertItem(title, -1, 0);
setPopup(new_popup);
if (old_popup!=0L) delete old_popup;
}
void MediumButton::refreshType()

2
kicker/applets/minipager/pagerbutton.cpp

@ -70,6 +70,8 @@ KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const TQPoint& v
m_bgPixmap(0),
m_isCommon(false),
m_currentWindow(0),
m_updateCompressor(0, "KMiniPagerButton::updateCompressor"),
m_dragSwitchTimer(0, "KMiniPagerButton::dragSwitchTimer"),
m_inside(false)
{
setToggleButton(true);

2
kicker/applets/naughty/NaughtyProcessMonitor.cpp

@ -94,7 +94,7 @@ NaughtyProcessMonitor::NaughtyProcessMonitor
d = new NaughtyProcessMonitorPrivate;
d->interval_ = interval * 1000;
d->triggerLevel_ = triggerLevel;
d->timer_ = new TQTimer(this);
d->timer_ = new TQTimer(this, "NaughtyProcessMonitorPrivate::timer");
connect(d->timer_, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
}

2
kicker/applets/systemtray/systemtrayapplet.cpp

@ -401,7 +401,7 @@ void SystemTrayApplet::showExpandButton(bool show)
connect(m_expandButton, TQT_SIGNAL(clicked()),
this, TQT_SLOT(toggleExpanded()));
m_autoRetractTimer = new TQTimer(this);
m_autoRetractTimer = new TQTimer(this, "m_autoRetractTimer");
connect(m_autoRetractTimer, TQT_SIGNAL(timeout()),
this, TQT_SLOT(checkAutoRetract()));
}

2
kicker/applets/trash/trashbutton.cpp

@ -78,7 +78,7 @@ void TrashButton::setItemCount(int count)
void TrashButton::initPopup()
{
TQPopupMenu *old_popup = popup();
TQPopupMenu *old_popup = static_cast<TQPopupMenu*>(popup());
KFileItemList items;
items.append(&mFileItem);

78
kicker/configure.in.in

@ -0,0 +1,78 @@
dnl Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "$PKG_CONFIG" = "no"; then
AC_MSG_ERROR([
This package requires pkg-config.
])
fi
dnl Check for Glib-2.0
# GLIB_CFLAGS: cflags for compiling glib dependant sources
# GLIB_LIBADD: glib libraries (-l options)
# GLIB_LDFLAGS: flags containing path to glib libraries (-L options)
GLIB_PACKAGES="gmodule-2.0 gthread-2.0"
GLIB_VERSION="1.3.3"
AC_MSG_CHECKING(for GLib-2.0 (at least $GLIB_VERSION))
if $PKG_CONFIG --atleast-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $GLIB_VERSION $GLIB_PACKAGES >/dev/null 2>&1 ; then
GLIB_CFLAGS="`$PKG_CONFIG --cflags $GLIB_PACKAGES`"
GLIB_LIBADD="`$PKG_CONFIG --libs-only-l --libs-only-other $GLIB_PACKAGES`"
GLIB_LDFLAGS="`$PKG_CONFIG --libs-only-L $GLIB_PACKAGES`"
AC_MSG_RESULT(yes)
fi
else
if $PKG_CONFIG --atleast-version $GLIB_VERSION $GLIB_PACKAGES >/dev/null 2>&1 ; then
GLIB_CFLAGS="`$PKG_CONFIG --cflags $GLIB_PACKAGES`"
GLIB_LIBADD="`$PKG_CONFIG --libs-only-l $GLIB_PACKAGES`"
GLIB_LDFLAGS="`$PKG_CONFIG --libs-only-L $GLIB_PACKAGES`"
AC_MSG_RESULT(yes)
AC_MSG_WARN([you may need to run make LDFLAGS=-pthread to compile arts])
fi
fi
if test -z "$GLIB_LIBADD"; then
AC_MSG_RESULT(not installed)
DO_NOT_COMPILE="$DO_NOT_COMPILE kerry gmcop"
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBADD)
AC_SUBST(GLIB_LDFLAGS)
dnl Check for libbeagle 0.2.0
# LIBBEAGLE_CFLAGS: cflags for compiling libbeagle dependant sources
# LIBBEAGLE_LIBADD: libbeagle libraries (-l options)
# LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options)
LIBBEAGLE_PACKAGES="libbeagle-0.0"
LIBBEAGLE_VERSION="0.2.4"
AC_MSG_CHECKING(for libbeagle-0.2.4 (at least $LIBBEAGLE_VERSION))
if $PKG_CONFIG --atleast-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; then
LIBBEAGLE_CFLAGS="`$PKG_CONFIG --cflags $LIBBEAGLE_PACKAGES`"
LIBBEAGLE_LIBADD="`$PKG_CONFIG --libs-only-l --libs-only-other $LIBBEAGLE_PACKAGES`"
LIBBEAGLE_LDFLAGS="`$PKG_CONFIG --libs-only-L $LIBBEAGLE_PACKAGES`"
AC_MSG_RESULT(yes)
fi
else
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; then
LIBBEAGLE_CFLAGS="`$PKG_CONFIG --cflags $LIBBEAGLE_PACKAGES`"
LIBBEAGLE_LIBADD="`$PKG_CONFIG --libs-only-l $LIBBEAGLE_PACKAGES`"
LIBBEAGLE_LDFLAGS="`$PKG_CONFIG --libs-only-L $LIBBEAGLE_PACKAGES`"
AC_MSG_RESULT(yes)
AC_MSG_WARN([you may need to run make LDFLAGS=-pthread to compile arts])
fi
fi
if test -z "$LIBBEAGLE_LIBADD"; then
AC_MSG_RESULT(not installed)
DO_NOT_COMPILE="$DO_NOT_COMPILE kerry gmcop"
fi
AC_SUBST(LIBBEAGLE_CFLAGS)
AC_SUBST(LIBBEAGLE_LIBADD)
AC_SUBST(LIBBEAGLE_LDFLAGS)

2
kicker/data/Makefile.am

@ -1 +1 @@
SUBDIRS = icons tiles app_start_anim wallpaper kmenu_side
SUBDIRS = icons tiles app_start_anim wallpaper kmenu_side kickoff

14
kicker/data/kickoff/Makefile.am

@ -0,0 +1,14 @@
kicker_kmenuside_pics_data_DATA = resize_handle.png \
main_corner_tl.png main_corner_tr.png search-gradient.png \
menu_separator.png search-tab-center.png search-tab-left.png \
search-tab-right.png search-tab-top-center.png search-tab-top-left.png \
left_triangle.png right_triangle.png \
kmenu_basic.mng kmenu_flipped.mng kmenu_vertical.mng \
search-tab-top-right.png search-gradient-topdown.png search-running.mng
kicker_kmenuside_pics_datadir = $(kde_datadir)/kicker/pics
EXTRA_DIST = $(kicker_kmenuside_pics_data_DATA)
kickerdir = $(kde_datadir)/kicker/icons
kicker_ICON = leave recently_used suspend2disk suspend2ram

BIN
kicker/data/kickoff/kmenu_active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
kicker/data/kickoff/kmenu_basic.mng

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
kicker/data/kickoff/kmenu_flipped.mng

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
kicker/data/kickoff/kmenu_vertical.mng

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

5
kicker/data/kmenu_side/Makefile.am

@ -1,6 +1,5 @@
kicker_kmenuside_pics_data_DATA = kside.png kside_tile.png
kicker_kmenuside_pics_datadir = $(kde_datadir)/kicker/pics/
kicker_kmenuside_pics_data_DATA = kside.png kside_tile.png
kicker_kmenuside_pics_datadir = $(kde_datadir)/kicker/pics
EXTRA_DIST = $(kicker_kmenuside_pics_data_DATA)

2
kicker/extensions/kasbar/kasbar.cpp

@ -719,7 +719,7 @@ void KasBar::addTestItems()
i->setText( "Animated" );
i->setIcon( KGlobal::iconLoader()->loadIcon( "icons", KIcon::NoGroup, KIcon::SizeMedium ) );
i->setAnimation( resources()->startupAnimation() );
TQTimer *aniTimer = new TQTimer( i );
TQTimer *aniTimer = new TQTimer( i, "aniTimer" );
connect( aniTimer, TQT_SIGNAL( timeout() ), i, TQT_SLOT( advanceAnimation() ) );
aniTimer->start( 100 );
i->setShowAnimation( true );

2
kicker/extensions/kasbar/kasclockitem.cpp

@ -38,7 +38,7 @@ KasClockItem::KasClockItem( KasBar *parent )
{
setCustomPopup( true );
TQTimer *t = new TQTimer( this );
TQTimer *t = new TQTimer( this, "t" );
connect( t, TQT_SIGNAL( timeout() ), TQT_SLOT( updateTime() ) );
t->start( 1000 );

2
kicker/extensions/kasbar/kasloaditem.cpp

@ -33,7 +33,7 @@
KasLoadItem::KasLoadItem( KasBar *parent )
: KasItem( parent )
{
TQTimer *t = new TQTimer( this );
TQTimer *t = new TQTimer( this, "KasLoadItem::t" );
connect( t, TQT_SIGNAL( timeout() ), TQT_SLOT( updateDisplay() ) );
t->start( 1000 );
updateDisplay();

2
kicker/extensions/kasbar/kasstartupitem.cpp

@ -79,7 +79,7 @@ KasStartupItem::KasStartupItem( KasBar *parent, Startup::Ptr startup )
setShowFrame( false );
setAnimation( resources()->startupAnimation() );
aniTimer = new TQTimer( this );
aniTimer = new TQTimer( this, "aniTimer" );
connect( aniTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( aniTimerFired() ) );
aniTimer->start( 100 );
}

5
kicker/kicker/Makefile.am

@ -1,6 +1,7 @@
INCLUDES = $(all_includes)
SUBDIRS = core ui buttons .
# SUBDIRS = core interfaces ui buttons plugins .
SUBDIRS = core interfaces ui buttons .
bin_PROGRAMS =
lib_LTLIBRARIES =
@ -9,7 +10,7 @@ kdeinit_LTLIBRARIES = kicker.la
CLEANFILES = dummy.cpp
kicker_la_LIBADD = core/libkicker_core.la buttons/libkicker_buttons.la \
ui/libkicker_ui.la ../libkicker/libkickermain.la $(LIB_KIO) $(LIB_KUTILS)
ui/libkicker_ui.la ../libkicker/libkickermain.la $(LIB_KIO) $(LIB_KUTILS) $(LIB_KABC)
kicker_la_SOURCES = dummy.cpp
kicker_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)

4
kicker/kicker/buttons/Makefile.am

@ -1,10 +1,10 @@
INCLUDES = -I$(srcdir)/../core -I$(srcdir)/../../libkicker -I../../libkicker \
-I$(srcdir)/../ui -I$(top_srcdir)/libkonq $(all_includes)
-I../ui -I$(srcdir)/../ui -I$(top_srcdir)/libkonq $(all_includes) $(LIBBEAGLE_CFLAGS) $(GLIB_CFLAGS)
noinst_LTLIBRARIES = libkicker_buttons.la
libkicker_buttons_la_SOURCES = servicebutton.cpp bookmarksbutton.cpp \
browserbutton.cpp \
browserbutton.cpp knewbutton.cpp \
desktopbutton.cpp extensionbutton.cpp kbutton.cpp \
nonkdeappbutton.cpp servicemenubutton.cpp urlbutton.cpp \
windowlistbutton.cpp

2
kicker/kicker/buttons/browserbutton.cpp

@ -65,7 +65,7 @@ void BrowserButton::initialize( const TQString& icon, const TQString& path )
topMenu = new PanelBrowserMenu( path );
setPopup(topMenu);
_menuTimer = new TQTimer( this );
_menuTimer = new TQTimer( this, "_menuTimer" );
connect( _menuTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotDelayedPopup()) );
TQToolTip::add(this, i18n("Browse: %1").arg(path));

3
kicker/kicker/buttons/kbutton.cpp

@ -33,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "menumanager.h"
#include "k_mnu.h"
#include "k_mnu_stub.h"
#include "kbutton.h"
#include "kbutton.moc"
@ -43,7 +44,7 @@ KButton::KButton( TQWidget* parent )
TQToolTip::add(this, i18n("Applications, tasks and desktop sessions"));
setTitle(i18n("K Menu"));
setPopup(MenuManager::the()->kmenu());
setPopup(MenuManager::the()->kmenu()->widget());
MenuManager::the()->registerKButton(this);
setIcon("kmenu");

455
kicker/kicker/buttons/knewbutton.cpp

@ -0,0 +1,455 @@
/*****************************************************************
Copyright (c) 2006 Stephan Binner <binner@kde.org>
Stephan Kulow <coolo@kde.org>
Dirk Mueller <mueller@kde.org>
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 <cassert>
#include <cmath>
#include <tqtooltip.h>
#include <tqpainter.h>
#include <tqcursor.h>
#include <private/qeffects_p.h>
#include <klocale.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
#include <kdebug.h>
#include "kickerSettings.h"
#include "config.h"
#include "global.h"
#include "menumanager.h"
#include "k_mnu_stub.h"
#include "k_new_mnu.h"
#include "knewbutton.h"
#include "knewbutton.moc"
KNewButton *KNewButton::m_self = 0;
KNewButton::KNewButton( TQWidget* parent )
: KButton( parent ),
m_oldPos(0,0)
{
Q_ASSERT( !m_self );
m_self = this;
m_hoverTimer = -1;
m_openTimer = -1;
m_active = false;
m_mouseInside = false;
m_drag = false;
setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignRight));
setAcceptDrops(true);
setIcon("kmenu-suse");
setDrawArrow(false);
m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_basic.mng"));
m_movie->connectUpdate(this, TQT_SLOT(updateMovie()));
m_movie->connectStatus(this, TQT_SLOT(slotStatus(int)));
m_movie->connectResize(this, TQT_SLOT(slotSetSize(const TQSize&)));
TQApplication::desktop()->screen()->installEventFilter(this);
setMouseTracking(true);
}
KNewButton::~KNewButton()
{
if ( m_self == this )
m_self = 0;
setMouseTracking(false);
delete m_movie;
}
void KNewButton::slotStatus(int status)
{
if(status == TQMovie::EndOfLoop)
slotStopAnimation();
}
TQColor KNewButton::borderColor() const
{
TQImage img = m_active_pixmap.convertToImage();
for (int i = 0; i < img.width(); ++i) {
QRgb rgb = img.pixel(orientation() == Qt::Horizontal ? img.width() - i - 1 :
i, 2);
if (qGreen(rgb) > 0x50)
return rgb;
}
return img.pixel( orientation() == Qt::Horizontal ? img.width() - 2 : 2, 2);
}
void KNewButton::show()
{
KButton::show();
if (KickerSettings::firstRun()) {
TQTimer::singleShot(500,this,TQT_SLOT(slotExecMenu()));
KickerSettings::setFirstRun(false);
KickerSettings::writeConfig();
}
}
void KNewButton::updateMovie()
{
m_oldPos = TQPoint( -1, -1 );
drawEye();
if (!m_active && m_movie->running())
m_movie->pause();
}
void KNewButton::setPopupDirection(KPanelApplet::Direction d)
{
KButton::setPopupDirection(d);
delete m_movie;
switch (d) {
case KPanelApplet::Left:
setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignLeft));
m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_vertical.mng"));
break;
case KPanelApplet::Right:
setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignRight));
m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_vertical.mng"));
break;
case KPanelApplet::Up:
setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignHCenter));
m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_basic.mng"));
break;
case KPanelApplet::Down:
setIconAlignment((Qt::AlignmentFlags)(AlignBottom|AlignHCenter));
m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_flipped.mng"));
}
m_movie->connectUpdate(this, TQT_SLOT(updateMovie()));
m_movie->connectStatus(this, TQT_SLOT(slotStatus(int)));
m_movie->connectResize(this, TQT_SLOT(slotSetSize(const TQSize&)));
}
void KNewButton::slotSetSize(const TQSize& s)
{
m_iconSize = s;
}
double KNewButton::buttonScaleFactor(const TQSize& s) const
{
double sf = 1.0;
switch (popupDirection()) {
case KPanelApplet::Left:
case KPanelApplet::Right:
// sf = kMin(double(s.width()) / m_iconSize.height(), double(s.height()) / m_iconSize.width());
// break;
case KPanelApplet::Up:
case KPanelApplet::Down:
sf = kMin(double(s.width()) / m_iconSize.width(), double(s.height()) / m_iconSize.height());
break;
}
if (sf > 0.8) sf = 1.0;
return sf;
}
int KNewButton::widthForHeight(int height) const
{
int r = m_iconSize.width() * buttonScaleFactor(TQSize(m_iconSize.width(), height));
if (!m_movie->running() && height != m_active_pixmap.height())
{
KNewButton* that = const_cast<KNewButton*>(this);
TQTimer::singleShot(0, that, TQT_SLOT(slotStopAnimation()));
}
return r;
}
int KNewButton::preferredDimension(int panelDim) const
{
return kMax(m_icon.width(), m_icon.height());
}
int KNewButton::heightForWidth(int width) const
{
int r = m_iconSize.width() * buttonScaleFactor(TQSize(width, m_iconSize.height()));
if (!m_movie->running() && width != m_active_pixmap.width())
{
KNewButton* that = const_cast<KNewButton*>(this);
TQTimer::singleShot(0, that, TQT_SLOT(slotStopAnimation()));
}
return r;
}
bool KNewButton::eventFilter(TQObject *o, TQEvent *e)
{
if (e->type() == TQEvent::MouseButtonRelease ||
e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseButtonDblClick )
{
TQMouseEvent *me = static_cast<TQMouseEvent *>(e);
if (rect().contains(mapFromGlobal(me->globalPos())))
{
if (m_pressedDuringPopup && m_popup && m_openTimer != -1
&& (me->button() & Qt::LeftButton) )
return true;
}
}
if (KickerSettings::kickoffDrawGeekoEye() && e->type() == TQEvent::MouseMove)
{
TQMouseEvent *me = static_cast<TQMouseEvent *>(e);
if ((me->state() & MouseButtonMask) == NoButton)
drawEye();
}
return KButton::eventFilter(o, e);
}
void KNewButton::drawEye()
{
#define eye_x 62
#define eye_y 13
TQPoint mouse = TQCursor::pos();
TQPoint me = mapToGlobal(TQPoint(eye_x, eye_y));
double a = atan2(mouse.y() - me.y(), mouse.x() - me.x());
int dx = int(2.1 * cos(a));
int dy = int(2.1 * sin(a));
TQPoint newpos(eye_x+dx,eye_y+dy);
if (newpos!=m_oldPos) {
m_oldPos = newpos;
TQPixmap pixmap = m_active_pixmap;
double sf = 1.0;
if(!m_movie->framePixmap().isNull())
{
pixmap = m_movie->framePixmap();
pixmap.detach();
m_iconSize = pixmap.size();
sf = buttonScaleFactor(size());
if (KickerSettings::kickoffDrawGeekoEye()) {
TQPainter p(&pixmap);
p.setPen(white);
p.setBrush(white);
// p.setPen(TQColor(110,185,55));
p.drawRect(eye_x+dx, eye_y+dy, 2, 2);
p. end();
}
}
TQWMatrix matrix;
switch (popupDirection()) {
case KPanelApplet::Left:
matrix.scale(sf, -sf);
matrix.rotate(90);
break;
case KPanelApplet::Up:
matrix.scale(sf, sf);
break;
case KPanelApplet::Right:
matrix.scale(sf, -sf);
matrix.rotate(90);
break;
case KPanelApplet::Down:
matrix.scale(sf, sf);
break;
}
m_active_pixmap = pixmap.xForm(matrix);
repaint(false);
}
#undef eye_x
#undef eye_y
}
void KNewButton::enterEvent(TQEvent* e)
{
KButton::enterEvent(e);
TQSize s(size());
s *= 0.25;
s = s.expandedTo(TQSize(6,6));
switch (popupDirection()) {
case KPanelApplet::Left:
m_sloppyRegion = TQRect(rect().topRight() - TQPoint(s.width()-1, 0), s);
break;
case KPanelApplet::Right:
m_sloppyRegion = TQRect(rect().topLeft(), s);
break;
case KPanelApplet::Up:
m_sloppyRegion = TQRect(rect().bottomLeft() - TQPoint(0, s.height()-1), s);
break;
case KPanelApplet::Down:
m_sloppyRegion = TQRect(rect().topLeft(), s);
}
m_active = true;
m_movie->unpause();
m_movie->restart();
}
void KNewButton::rewindMovie()
{
m_oldPos = TQPoint( -1, -1 );
m_movie->unpause();
}
void KNewButton::dragEnterEvent(TQDragEnterEvent* /*e*/)
{
if (m_hoverTimer != -1)
killTimer(m_hoverTimer);
m_hoverTimer = startTimer(TQApplication::startDragTime());
m_mouseInside = true;
m_drag = true;
}
void KNewButton::dragLeaveEvent(TQDragLeaveEvent* /*e*/)
{
m_mouseInside = false;
m_drag = false;
}
void KNewButton::leaveEvent(TQEvent* e)
{
m_mouseInside = false;
if (m_hoverTimer != -1)
killTimer(m_hoverTimer);
m_hoverTimer = -1;
KButton::leaveEvent(e);
}
void KNewButton::mouseMoveEvent(TQMouseEvent* e)
{
KButton::mouseMoveEvent(e);
m_mouseInside = m_sloppyRegion.contains(e->pos());
if ( m_sloppyRegion.contains(e->pos()))
{
if (m_hoverTimer == -1 && KickerSettings::openOnHover())
m_hoverTimer = startTimer(kMax(200,TQApplication::doubleClickInterval()/2));
}
else if (m_hoverTimer != -1)
{
killTimer(m_hoverTimer);
m_hoverTimer = -1;
}
}
void KNewButton::slotStopAnimation()
{
m_active = false;
m_movie->pause();
m_movie->restart();
TQTimer::singleShot(200, this, TQT_SLOT(rewindMovie()));
}
const TQPixmap& KNewButton::labelIcon() const
{
return m_active_pixmap;
}
void KNewButton::slotExecMenu()
{
if (m_openTimer != -1)
killTimer(m_openTimer);
m_openTimer = startTimer(TQApplication::doubleClickInterval() * 3);
if (m_active)
{
m_active = false;
m_movie->pause();
m_movie->restart();
}
KButton::slotExecMenu();
assert(!KickerTip::tippingEnabled());
assert(dynamic_cast<KMenu*>(m_popup));
disconnect(dynamic_cast<KMenu*>(m_popup), TQT_SIGNAL(aboutToHide()), this,
TQT_SLOT(slotStopAnimation()));
connect(dynamic_cast<KMenu*>(m_popup), TQT_SIGNAL(aboutToHide()),
TQT_SLOT(slotStopAnimation()));
m_popup->move(KickerLib::popupPosition(popupDirection(), m_popup, this));
// I wish KMenu would properly done itself when it closes. But it doesn't.
bool useEffect = true; // could be TQApplication::isEffectEnabled()
useEffect = false; // too many TQt bugs to be useful
if (m_drag)
useEffect = false;
m_drag = false; // once is enough
if (useEffect)
{
switch (popupDirection()) {
case KPanelApplet::Left:
qScrollEffect(m_popup, QEffects::LeftScroll);
break;
case KPanelApplet::Up:
qScrollEffect(m_popup, QEffects::UpScroll);
break;
case KPanelApplet::Right:
qScrollEffect(m_popup, QEffects::RightScroll);
break;
case KPanelApplet::Down:
qScrollEffect(m_popup, QEffects::DownScroll);
break;
}
}
else
static_cast<KMenu*>(m_popup)->show();
}
void KNewButton::timerEvent(TQTimerEvent* e)
{
if (e->timerId() == m_hoverTimer)
{
if (m_mouseInside && !isDown())
showMenu();
killTimer(m_hoverTimer);
m_hoverTimer = -1;
}
if (e->timerId() == m_openTimer)
{
killTimer(m_openTimer);
m_openTimer = -1;
}
}

98
kicker/kicker/buttons/knewbutton.h

@ -0,0 +1,98 @@
/*****************************************************************
Copyright (c) 2006 Stephan Binner <binner@kde.org>
Stephan Kulow <coolo@kde.org>
Dirk Mueller <mueller@kde.org>
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 __knewbutton_h__
#define __knewbutton_h__
#include "kbutton.h"
#include <tqmovie.h>
#include <tqpoint.h>
/**
* Button that contains the PanelKMenu and client menu manager.
*/
class KNewButton : public KButton
{
Q_OBJECT
public:
KNewButton( TQWidget *parent );
~KNewButton();
static KNewButton *self() { return m_self; }
void loadConfig( const KConfigGroup& config );
virtual const TQPixmap& labelIcon() const;
virtual int widthForHeight(int height) const;
virtual int preferredDimension(int panelDim) const;
virtual int heightForWidth(int width) const;
TQColor borderColor() const;
virtual void setPopupDirection(KPanelApplet::Direction d);
private slots:
void slotStatus(int);
void slotSetSize(const TQSize&);
void slotStopAnimation();
void rewindMovie();
void updateMovie();
protected:
virtual void show();
virtual void slotExecMenu();
virtual TQString tileName() { return "KMenu"; }
virtual TQString defaultIcon() const { return "go"; }
virtual void enterEvent(TQEvent* e);
virtual void leaveEvent(TQEvent* e);
virtual void mouseMoveEvent(TQMouseEvent* e);
virtual void dragEnterEvent(TQDragEnterEvent*);
virtual void dragLeaveEvent(TQDragLeaveEvent*);
virtual bool eventFilter(TQObject *, TQEvent *);
void timerEvent(TQTimerEvent*);
private:
void drawEye();
double buttonScaleFactor(const TQSize& s) const;
TQMovie* m_movie;
TQPixmap m_active_pixmap;
TQPoint m_oldPos;
TQSize m_iconSize;
TQRect m_sloppyRegion;
int m_hoverTimer;
int m_openTimer;
bool m_active;
bool m_mouseInside;
bool m_drag;
static KNewButton *m_self;
};
#endif

8
kicker/kicker/core/Makefile.am

@ -1,12 +1,14 @@
INCLUDES = -I$(srcdir)/../../libkicker -I../../libkicker \
-I$(srcdir)/../ui -I$(srcdir)/../buttons -I$(top_srcdir)/libkonq \
$(all_includes)
-I../ui -I$(srcdir)/../ui -I$(srcdir)/../buttons -I$(top_srcdir)/libkonq \
$(all_includes) $(LIBBEAGLE_CFLAGS) $(GLIB_CFLAGS)
noinst_LTLIBRARIES = libkicker_core.la
libkicker_core_la_COMPILE_FIRST = kmenubase.h
libkicker_core_la_SOURCES = extensionSettings.kcfgc \
main.cpp kicker.cpp kicker.skel \
userrectsel.cpp containerarea.cpp \
userrectsel.cpp containerarea.cpp kmenubase.ui \
applethandle.cpp container_base.cpp container_button.cpp \
container_applet.cpp container_extension.cpp extensionmanager.cpp \
menumanager.cpp pluginmanager.cpp showdesktop.cpp \

23
kicker/kicker/core/applethandle.cpp

@ -150,7 +150,7 @@ void AppletHandle::setFadeOutHandle(bool fadeOut)
{
if (!m_handleHoverTimer)
{
m_handleHoverTimer = new TQTimer(this);
m_handleHoverTimer = new TQTimer(this, "m_handleHoverTimer");
connect(m_handleHoverTimer, TQT_SIGNAL(timeout()),
this, TQT_SLOT(checkHandleHover()));
m_applet->installEventFilter(this);
@ -177,11 +177,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
m_drawHandle = true;
resetLayout();
if (m_handleHoverTimer)
{
m_handleHoverTimer->start(250);
}
break;
break;
}
case TQEvent::Leave:
@ -191,6 +187,11 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
break;
}
if (m_handleHoverTimer)
{
m_handleHoverTimer->start(250);
}
TQWidget* w = dynamic_cast<TQWidget*>(o);
bool nowDrawIt = false;
@ -207,11 +208,6 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
if (nowDrawIt != m_drawHandle)
{
if (m_handleHoverTimer)
{
m_handleHoverTimer->stop();
}
m_drawHandle = nowDrawIt;
resetLayout();
}
@ -297,6 +293,11 @@ void AppletHandle::toggleMenuButtonOff()
}
m_menuButton->setDown(false);
if (m_handleHoverTimer)
{
m_handleHoverTimer->start(250);
}