You are not logged in.

#1 2009-12-08 10:57:33

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

[SOLVED] KDE 4, plasma source code question.

when hovering the mouse above an icon on KDE 4 a tip pops up in less than a second. I want to find the source code and adjust the delay for the pop up. What packet is the main for plasma? It really annoying. I have been told the the delay is higher on other distros.

See the picture bellow.

archlinux20090903161941.png

Last edited by firewalker (2009-12-10 08:25:39)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#2 2009-12-08 11:24:53

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED] KDE 4, plasma source code question.

FYI, there's no tooltip with lancelot.

Offline

#3 2009-12-08 11:48:58

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] KDE 4, plasma source code question.

lucke wrote:

FYI, there's no tooltip with lancelot.

What do you mean. I am new to KDE 4.

The tip pops up on every icon on the task bar. Not only Kicoff.

Last edited by firewalker (2009-12-08 11:50:21)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#4 2009-12-08 11:51:47

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED] KDE 4, plasma source code question.

Add a widget called lancelot - it's an alternate menu. It has no tooltip.

Offline

#5 2009-12-08 11:56:28

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: [SOLVED] KDE 4, plasma source code question.

That would indeed be interesting to know, firewalker. Perhaps you find something here:

http://plasma.kde.org/


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#6 2009-12-08 12:01:08

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED] KDE 4, plasma source code question.

It's probably in kdebase-workspace.

Offline

#7 2009-12-08 12:05:59

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] KDE 4, plasma source code question.

lucke wrote:

Add a widget called lancelot - it's an alternate menu. It has no tooltip.

Lancelot doesn't have a tooltip. But every other icon does.

snapshot2p.th.png


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#8 2009-12-08 13:16:08

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [SOLVED] KDE 4, plasma source code question.

Hmmm, i did a patch for this stuff around 4.0 or 4.1, dont remember exactly, let me search for it smile

Edit: Its here, in lines 160 + 162:

http://websvn.kde.org/trunk/KDE/kdelibs … iew=markup

Last edited by funkyou (2009-12-08 13:23:03)


want a modular and tweaked KDE for arch? try kdemod

Offline

#9 2009-12-08 13:29:47

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] KDE 4, plasma source code question.

Thanks you funkyou.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#10 2009-12-08 13:37:39

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] KDE 4, plasma source code question.

I heard there is a way to turn this off, in KDE 4.4.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#11 2009-12-08 13:53:43

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] KDE 4, plasma source code question.

Gen2ly wrote:

I heard there is a way to turn this off, in KDE 4.4.

I had filled a feature request. Vote for it.

https://bugs.kde.org/show_bug.cgi?id=215729


Another feature request.

https://bugs.kde.org/show_bug.cgi?id=215725


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#12 2009-12-08 14:48:13

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] KDE 4, plasma source code question.

Ah, and the folder popup too smile:

https://bugs.kde.org/show_bug.cgi?id=192821


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#13 2009-12-10 08:22:44

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] KDE 4, plasma source code question.

I don't how to program with C or C++.  The following stuff may fry your videotape recorder and make your espresso machine go wild.

I made a little patch. Now the program responsible for the tip will search for a file named tooltipmanager_delay located at /home/user_name/.kde4/share/config/. It opens the file and reads the integer value inside expressed in msecs. The file must only contain an integer number. I do not implent any check for the data contained in the file (a valid value would be 3000, witch means 3 seconds). I only check if the file exists and can be opened. If the file does not exist or there is a read error the program uses the default value (700 msecs).


--- kdelibs-4.3.4/plasma/tooltipmanager-orig.cpp    2009-06-03 14:54:42.000000000 +0300
+++ kdelibs-4.3.4/plasma/tooltipmanager.cpp    2009-12-09 20:16:39.000000000 +0200
@@ -21,6 +21,17 @@
 
 #include "tooltipmanager.h"
 
+#include <iostream>
+using std::cerr;
+using std::cout;
+using std::endl;
+
+#include <fstream>
+using std::ifstream;
+
+#include <stdlib.h>
+using namespace std;
+
 //Qt
 #include <QCoreApplication>
 #include <QLabel>
@@ -51,6 +62,13 @@
 namespace Plasma
 {
 
+
+
+
+
+
+
+
 class ToolTipManagerPrivate
 {
 public :
@@ -133,6 +151,35 @@
 
 void ToolTipManager::show(QGraphicsWidget *widget)
 {
+    std::string file_path_delay_var; //File path variable
+    std::string file_name_var; //File name variable
+    ifstream indata;
+
+    int delay_num; // variable for input value
+
+    file_path_delay_var = getenv ("HOME"); //Get the home variable
+    file_name_var = "/.kde4/share/config/tooltipmanager_delay";
+    file_path_delay_var = file_path_delay_var + file_name_var;
+   
+    ifstream ifile(file_path_delay_var.c_str());
+    if (ifile) {
+        indata.open(file_path_delay_var.c_str()); // opens the file
+
+        if(!indata) {
+            delay_num = 700; // sets value if no file found
+            }
+        else {
+
+            indata >> delay_num;
+        indata.close();
+
+            }
+    }
+    else {
+        delay_num = 700;    
+    }
+
+
     if (!d->tooltips.contains(widget)) {
         return;
     }
@@ -147,7 +194,7 @@
         // which can be too much for less powerful CPUs to keep up with
         d->showTimer->start(200);
     } else {
-        d->showTimer->start(700);
+        d->showTimer->start(delay_num);
     }
 }

Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

Board footer

Powered by FluxBB