summaryrefslogtreecommitdiff
path: root/core/settings/button/buttonutils.cpp
Unidiff
Diffstat (limited to 'core/settings/button/buttonutils.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/button/buttonutils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/settings/button/buttonutils.cpp b/core/settings/button/buttonutils.cpp
index 91d2af3..27a2f38 100644
--- a/core/settings/button/buttonutils.cpp
+++ b/core/settings/button/buttonutils.cpp
@@ -44,49 +44,50 @@ ButtonUtils *ButtonUtils::ButtonUtils::inst ( )
44 } 44 }
45 return p; 45 return p;
46} 46}
47 47
48void ButtonUtils::cleanup ( ) 48void ButtonUtils::cleanup ( )
49{ 49{
50 delete inst ( ); 50 delete inst ( );
51} 51}
52 52
53ButtonUtils::ButtonUtils ( ) 53ButtonUtils::ButtonUtils ( )
54{ 54{
55 m_apps = new AppLnkSet( MimeType::appsFolderName ( )); 55 m_apps = new AppLnkSet( MimeType::appsFolderName ( ));
56} 56}
57 57
58ButtonUtils::~ButtonUtils ( ) 58ButtonUtils::~ButtonUtils ( )
59{ 59{
60 delete m_apps; 60 delete m_apps;
61} 61}
62 62
63qCopInfo ButtonUtils::messageToInfo ( const OQCopMessage &c ) 63qCopInfo ButtonUtils::messageToInfo ( const OQCopMessage &c )
64{ 64{
65 QCString ch = c. channel ( ); 65 QCString ch = c. channel ( );
66 QCString f = c. message ( ); 66 QCString f = c. message ( );
67 67
68 if ( ch. isNull ( )) 68
69 if ( ch == "ignore" )
69 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Ignored</nobr>" )); 70 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Ignored</nobr>" ));
70 71
71 for ( const predef_qcop *p = predef; p-> m_text; p++ ) { 72 for ( const predef_qcop *p = predef; p-> m_text; p++ ) {
72 if (( ch == p-> m_channel ) && ( f == p-> m_function )) 73 if (( ch == p-> m_channel ) && ( f == p-> m_function ))
73 return qCopInfo ( qApp-> translate ( "ButtonSettings", p-> m_text ), Resource::loadPixmap ( p-> m_pixmap )); 74 return qCopInfo ( qApp-> translate ( "ButtonSettings", p-> m_text ), Resource::loadPixmap ( p-> m_pixmap ));
74 } 75 }
75 76
76 if ( ch. left ( 16 ) == "QPE/Application/" ) { 77 if ( ch. left ( 16 ) == "QPE/Application/" ) {
77 QString app = ch. mid ( 16 ); 78 QString app = ch. mid ( 16 );
78 const AppLnk *applnk = m_apps-> findExec ( app ); 79 const AppLnk *applnk = m_apps-> findExec ( app );
79 if ( applnk ) 80 if ( applnk )
80 app = applnk-> name ( ); 81 app = applnk-> name ( );
81 82
82 if (( f == "raise()" ) || ( f == "nextView()" )) 83 if (( f == "raise()" ) || ( f == "nextView()" ))
83 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Show <b>%1</b></nobr>" ). arg ( app ), applnk ? applnk-> pixmap ( ) : QPixmap ( )); 84 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Show <b>%1</b></nobr>" ). arg ( app ), applnk ? applnk-> pixmap ( ) : QPixmap ( ));
84 else 85 else
85 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Call <b>%1</b>: <i>%2</i></nobr>" ). arg ( app ). arg ( f ), applnk ? applnk-> pixmap ( ) : QPixmap ( )); 86 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Call <b>%1</b>: <i>%2</i></nobr>" ). arg ( app ). arg ( f ), applnk ? applnk-> pixmap ( ) : QPixmap ( ));
86 } 87 }
87 else { 88 else {
88 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Call <b>%1</b> <i>%2</i></nobr>" ). arg (( ch. left ( 4 ) == "QPE/" ) ? ch. mid ( 4 ) : ch ). arg ( f )); 89 return qCopInfo ( qApp-> translate ( "ButtonSettings", "<nobr>Call <b>%1</b> <i>%2</i></nobr>" ). arg (( ch. left ( 4 ) == "QPE/" ) ? ch. mid ( 4 ) : ch ). arg ( f ));
89 } 90 }
90} 91}
91 92
92 93