[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2008-11-02 6:05:32
Message-ID: 1225605932.152096.29385.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 878926 by aseigo:

ToolTipContent


 M  +1 -1      CMakeLists.txt  
 M  +1 -2      comic/comic.cpp  
 M  +10 -10    luna/luna.cpp  
 M  +2 -3      showdashboard/showdashboard.cpp  
 M  +3 -5      showdesktop/showdesktop.cpp  


--- trunk/KDE/kdeplasma-addons/applets/CMakeLists.txt #878925:878926
@@ -37,7 +37,7 @@
 endif(QT_QTWEBKIT_FOUND)
 
 if(NOT WIN32)
-  add_subdirectory(lancelot)
+#  add_subdirectory(lancelot)
   add_subdirectory(incomingmsg)
   add_subdirectory(leavenote)
   add_subdirectory(showdesktop)
--- trunk/KDE/kdeplasma-addons/applets/comic/comic.cpp #878925:878926
@@ -387,7 +387,6 @@
 void ComicApplet::paintInterface( QPainter *p, const QStyleOptionGraphicsItem*, \
const QRect &contentRect )  {
     // get the text at top
-    Plasma::ToolTipManager::Content toolTipData;
     QString tempTop;
 
     if ( mShowComicTitle ) {
@@ -467,7 +466,7 @@
     mIdealSize = size() - contentsRect().size() +
                  mImage.size() + QSizeF( leftImageGap + rightImageGap, urlHeight + \
topHeight );  
-    toolTipData.mainText += mAdditionalText;
+    Plasma::ToolTipContent toolTipData(mAdditionalText, QString());
     Plasma::ToolTipManager::self()->setContent( this, toolTipData );
 }
 
--- trunk/KDE/kdeplasma-addons/applets/luna/luna.cpp #878925:878926
@@ -140,7 +140,7 @@
 
 void Luna::calcStatus(time_t time)
 {
-    Plasma::ToolTipManager::Content toolTipData;
+    Plasma::ToolTipContent toolTipData;
 
     uint lun = 0;
     time_t last_new = 0;
@@ -187,7 +187,7 @@
 
     if ( fm.daysTo( now ) == 0 ) {
         counter = 14;
-        toolTipData.mainText = i18n( "Full Moon" );
+        toolTipData.setMainText( i18n( "Full Moon" ) );
         return;
     } else if ( counter <= 15 && counter >= 13 ) {
         counter = 14 + fm.daysTo( now );
@@ -230,7 +230,7 @@
 
     switch (counter) {
     case 0:
-        toolTipData.mainText = i18n("New Moon");
+        toolTipData.setMainText( i18n("New Moon") );
         return;
     case 1:
     case 2:
@@ -238,10 +238,10 @@
     case 4:
     case 5:
     case 6:
-        toolTipData.mainText = i18np("Waxing Crescent (New Moon was yesterday)", \
"Waxing Crescent (%1 days since New Moon)", counter ); +        \
toolTipData.setMainText( i18np("Waxing Crescent (New Moon was yesterday)", "Waxing \
Crescent (%1 days since New Moon)", counter ) );  break;
     case 7:
-        toolTipData.mainText = i18n("First Quarter");
+        toolTipData.setMainText( i18n("First Quarter") );
         break;
     case 8:
     case 9:
@@ -249,7 +249,7 @@
     case 11:
     case 12:
     case 13:
-        toolTipData.mainText = i18np( "Waxing Gibbous (Tomorrow is Full Moon)", \
"Waxing Gibbous (%1 days to Full Moon)", -fm.daysTo( now ) ); +        \
toolTipData.setMainText( i18np( "Waxing Gibbous (Tomorrow is Full Moon)", "Waxing \
Gibbous (%1 days to Full Moon)", -fm.daysTo( now ) ) );  break;
     case 14:
         assert( false );
@@ -260,10 +260,10 @@
     case 18:
     case 19:
     case 20:
-        toolTipData.mainText = i18np("Waning Gibbous (Yesterday was Full Moon)", \
"Waning Gibbous (%1 days since Full Moon)", fm.daysTo( now ) ); +        \
toolTipData.setMainText( i18np("Waning Gibbous (Yesterday was Full Moon)", "Waning \
Gibbous (%1 days since Full Moon)", fm.daysTo( now ) ) );  break;
     case 21:
-        toolTipData.mainText = i18n("Last Quarter");
+        toolTipData.setMainText( i18n("Last Quarter") );
         break;
     case 22:
     case 23:
@@ -273,12 +273,12 @@
     case 27:
     case 28:
         kDebug() << "nn.days " << ln.daysTo( now ) << " " << nn.daysTo( now );
-        toolTipData.mainText = i18np("Waning Crescent (Tomorrow is New Moon)", \
"Waning Crescent (%1 days to New Moon)", -nn.daysTo( now ) ); +        \
toolTipData.setMainText( i18np("Waning Crescent (Tomorrow is New Moon)", "Waning \
Crescent (%1 days to New Moon)", -nn.daysTo( now ) ) );  break;
     default:
         kFatal() << "coolo can't count\n";
     }
-    Plasma::ToolTipManager::self()->setContent(this,toolTipData);
+    Plasma::ToolTipManager::self()->setContent(this, toolTipData);
 }
 
 #include "luna.moc"
--- trunk/KDE/kdeplasma-addons/applets/showdashboard/showdashboard.cpp #878925:878926
@@ -51,9 +51,8 @@
     layout->addItem(icon);
 
     Plasma::ToolTipManager::self()->registerWidget(this);
-    Plasma::ToolTipManager::Content toolTipData;
-    toolTipData.mainText = i18n("Show the Plasma Dashboard");
-    toolTipData.image = icon->icon().pixmap(IconSize(KIconLoader::Desktop));
+    Plasma::ToolTipContent toolTipData(i18n("Show the Plasma Dashboard"), QString(),
+                                       \
icon->icon().pixmap(IconSize(KIconLoader::Desktop)));  \
Plasma::ToolTipManager::self()->setContent(this, toolTipData);  \
setAspectRatioMode(Plasma::ConstrainedSquare);  
--- trunk/KDE/kdeplasma-addons/applets/showdesktop/showdesktop.cpp #878925:878926
@@ -53,11 +53,9 @@
     registerAsDragHandle(icon);
     connect(icon, SIGNAL(clicked()), this, SLOT(pressed()));
 
-    Plasma::ToolTipManager::self()->registerWidget(this);
-    Plasma::ToolTipManager::Content toolTipData;
-    toolTipData.mainText = i18n("Show the Desktop");
-    toolTipData.subText = i18n("Minimize all open windows and show the Desktop");
-    toolTipData.image = icon->icon().pixmap(IconSize(KIconLoader::Desktop));
+    Plasma::ToolTipContent toolTipData(i18n("Show the Desktop"),
+                                       i18n("Minimize all open windows and show the \
Desktop"), +                                       \
icon->icon().pixmap(IconSize(KIconLoader::Desktop)));  \
Plasma::ToolTipManager::self()->setContent(this, toolTipData);  
     NETRootInfo info(QX11Info::display(), NET::Supported);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic