@ -57,10 +57,10 @@ LikeBack::LikeBack(Button buttons)
{
{
TQHBoxLayout * layout = new TQHBoxLayout ( this ) ;
TQHBoxLayout * layout = new TQHBoxLayout ( this ) ;
TQIconSet likeIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " likeback_like " , TDEIcon : : Small ) ;
TQIconSet likeIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " likeback_like " , TDEIcon : : Small ) ;
TQIconSet dislikeIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " likeback_dislike " , TDEIcon : : Small ) ;
TQIconSet dislikeIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " likeback_dislike " , TDEIcon : : Small ) ;
TQIconSet bugIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " likeback_bug " , TDEIcon : : Small ) ;
TQIconSet bugIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " likeback_bug " , TDEIcon : : Small ) ;
// TQIconSet configureIconSet = ka pp->iconLoader()->loadIconSet("configure", TDEIcon::Small);
// TQIconSet configureIconSet = tdeA pp->iconLoader()->loadIconSet("configure", TDEIcon::Small);
TQToolButton * m_likeButton = new TQToolButton ( this , " ilike " ) ;
TQToolButton * m_likeButton = new TQToolButton ( this , " ilike " ) ;
m_likeButton - > setIconSet ( likeIconSet ) ;
m_likeButton - > setIconSet ( likeIconSet ) ;
@ -84,7 +84,7 @@ LikeBack::LikeBack(Button buttons)
layout - > add ( m_bugButton ) ;
layout - > add ( m_bugButton ) ;
m_configureButton = new TQToolButton ( this , " configure " ) ;
m_configureButton = new TQToolButton ( this , " configure " ) ;
TQIconSet helpIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " help " , TDEIcon : : Small ) ;
TQIconSet helpIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " help " , TDEIcon : : Small ) ;
m_configureButton - > setIconSet ( helpIconSet ) ;
m_configureButton - > setIconSet ( helpIconSet ) ;
m_configureButton - > setTextLabel ( i18n ( " Configure... " ) ) ;
m_configureButton - > setTextLabel ( i18n ( " Configure... " ) ) ;
m_configureButton - > setAutoRaise ( true ) ;
m_configureButton - > setAutoRaise ( true ) ;
@ -93,9 +93,9 @@ LikeBack::LikeBack(Button buttons)
TQPopupMenu * configureMenu = new TQPopupMenu ( this ) ;
TQPopupMenu * configureMenu = new TQPopupMenu ( this ) ;
configureMenu - > insertItem ( helpIconSet , i18n ( " What's &This? " ) , this , TQ_SLOT ( showWhatsThisMessage ( ) ) ) ;
configureMenu - > insertItem ( helpIconSet , i18n ( " What's &This? " ) , this , TQ_SLOT ( showWhatsThisMessage ( ) ) ) ;
TQIconSet changeEmailIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " mail_generic " , TDEIcon : : Small ) ;
TQIconSet changeEmailIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " mail_generic " , TDEIcon : : Small ) ;
configureMenu - > insertItem ( changeEmailIconSet , i18n ( " &Configure Email Address... " ) , this , TQ_SLOT ( askEMail ( ) ) ) ;
configureMenu - > insertItem ( changeEmailIconSet , i18n ( " &Configure Email Address... " ) , this , TQ_SLOT ( askEMail ( ) ) ) ;
// TQIconSet dontHelpIconSet = ka pp->iconLoader()->loadIconSet("process-stop", TDEIcon::Small);
// TQIconSet dontHelpIconSet = tdeA pp->iconLoader()->loadIconSet("process-stop", TDEIcon::Small);
// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , TQ_SLOT(doNotHelpAnymore()) );
// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , TQ_SLOT(doNotHelpAnymore()) );
m_configureButton - > setPopup ( configureMenu ) ;
m_configureButton - > setPopup ( configureMenu ) ;
connect ( m_configureButton , TQ_SIGNAL ( pressed ( ) ) , this , TQ_SLOT ( openConfigurePopup ( ) ) ) ;
connect ( m_configureButton , TQ_SIGNAL ( pressed ( ) ) , this , TQ_SLOT ( openConfigurePopup ( ) ) ) ;
@ -131,7 +131,7 @@ void LikeBack::doNotHelpAnymore()
{
{
disable ( ) ;
disable ( ) ;
int result = KMessageBox : : questionYesNo (
int result = KMessageBox : : questionYesNo (
ka pp- > activeWindow ( ) ,
tdeA pp- > activeWindow ( ) ,
i18n ( " Are you sure you do not want to participate anymore in the application enhancing program? " ) ,
i18n ( " Are you sure you do not want to participate anymore in the application enhancing program? " ) ,
i18n ( " Do not Help Anymore " ) ) ;
i18n ( " Do not Help Anymore " ) ) ;
if ( result = = KMessageBox : : No ) {
if ( result = = KMessageBox : : No ) {
@ -153,7 +153,7 @@ void LikeBack::showWhatsThisMessage()
bool LikeBack : : userWantToParticipate ( )
bool LikeBack : : userWantToParticipate ( )
{
{
if ( ! ka pp)
if ( ! tdeA pp)
return true ;
return true ;
s_config - > setGroup ( " LikeBack " ) ;
s_config - > setGroup ( " LikeBack " ) ;
@ -164,9 +164,9 @@ bool LikeBack::userWantToParticipate()
void LikeBack : : showInformationMessage ( )
void LikeBack : : showInformationMessage ( )
{
{
TQPixmap likeIcon = ka pp- > iconLoader ( ) - > loadIcon ( " likeback_like " , TDEIcon : : Small ) ;
TQPixmap likeIcon = tdeA pp- > iconLoader ( ) - > loadIcon ( " likeback_like " , TDEIcon : : Small ) ;
TQPixmap dislikeIcon = ka pp- > iconLoader ( ) - > loadIcon ( " likeback_dislike " , TDEIcon : : Small ) ;
TQPixmap dislikeIcon = tdeA pp- > iconLoader ( ) - > loadIcon ( " likeback_dislike " , TDEIcon : : Small ) ;
TQPixmap bugIcon = ka pp- > iconLoader ( ) - > loadIcon ( " likeback_bug " , TDEIcon : : Small ) ;
TQPixmap bugIcon = tdeA pp- > iconLoader ( ) - > loadIcon ( " likeback_bug " , TDEIcon : : Small ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_like " , likeIcon ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_like " , likeIcon ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_dislike " , dislikeIcon ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_dislike " , dislikeIcon ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_bug " , bugIcon ) ;
TQMimeSourceFactory : : defaultFactory ( ) - > setPixmap ( " likeback_icon_bug " , bugIcon ) ;
@ -276,7 +276,7 @@ void LikeBack::autoMove()
{
{
static TQWidget * lastWindow = 0 ;
static TQWidget * lastWindow = 0 ;
TQWidget * window = ka pp- > activeWindow ( ) ;
TQWidget * window = tdeA pp- > activeWindow ( ) ;
// When a Kicker applet has the focus, like the Commandline TQLineEdit,
// When a Kicker applet has the focus, like the Commandline TQLineEdit,
// the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon.
// the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon.
// It's obviously bad ;-) :
// It's obviously bad ;-) :
@ -311,7 +311,7 @@ void LikeBack::iDoNotLike()
void LikeBack : : iFoundABug ( )
void LikeBack : : iFoundABug ( )
{
{
( void ) new KRun ( Piklab : : URLS [ Piklab : : BugReport ] , ka pp- > mainWidget ( ) ) ;
( void ) new KRun ( Piklab : : URLS [ Piklab : : BugReport ] , tdeA pp- > mainWidget ( ) ) ;
// showDialog(IFoundABug);
// showDialog(IFoundABug);
}
}
@ -322,7 +322,7 @@ void LikeBack::configure()
TQString LikeBack : : activeWindowPath ( )
TQString LikeBack : : activeWindowPath ( )
{
{
TQStringList windowNames ;
TQStringList windowNames ;
TQWidget * window = ka pp- > activeWindow ( ) ;
TQWidget * window = tdeA pp- > activeWindow ( ) ;
while ( window ) {
while ( window ) {
TQString name = window - > name ( ) ;
TQString name = window - > name ( ) ;
if ( name = = " unnamed " )
if ( name = = " unnamed " )
@ -347,7 +347,7 @@ void LikeBack::showDialog(Button button)
LikeBackDialog dialog ( button , activeWindowPath ( ) , " " ) ;
LikeBackDialog dialog ( button , activeWindowPath ( ) , " " ) ;
disable ( ) ;
disable ( ) ;
hide ( ) ;
hide ( ) ;
ka pp- > processEvents ( ) ;
tdeA pp- > processEvents ( ) ;
dialog . exec ( ) ;
dialog . exec ( ) ;
enable ( ) ;
enable ( ) ;
}
}
@ -396,7 +396,7 @@ void LikeBack::askEMail()
" <p> " + i18n ( " The email address is optional. If you do not provide any, your comments will be sent anonymously. Just click OK in that case. " ) + " </p> " +
" <p> " + i18n ( " The email address is optional. If you do not provide any, your comments will be sent anonymously. Just click OK in that case. " ) + " </p> " +
" <p> " + i18n ( " You can change or remove your email address whenever you want. For that, use the little arrow icon at the top-right corner of a window. " ) + " </p> " +
" <p> " + i18n ( " You can change or remove your email address whenever you want. For that, use the little arrow icon at the top-right corner of a window. " ) + " </p> " +
" <p> " + i18n ( " Your email address (keep empty to post comments anonymously): " ) ,
" <p> " + i18n ( " Your email address (keep empty to post comments anonymously): " ) ,
currentEMailAddress , & ok , ka pp- > activeWindow ( ) , /*name=*/ ( const char * ) 0 , & emailValidator ) ;
currentEMailAddress , & ok , tdeA pp- > activeWindow ( ) , /*name=*/ ( const char * ) 0 , & emailValidator ) ;
enable ( ) ;
enable ( ) ;
if ( ok )
if ( ok )
@ -430,9 +430,9 @@ void LikeBack::init(Button buttons)
void LikeBack : : init ( bool isDevelopmentVersion , Button buttons )
void LikeBack : : init ( bool isDevelopmentVersion , Button buttons )
{
{
if ( s_config = = 0 )
if ( s_config = = 0 )
s_config = ka pp- > config ( ) ;
s_config = tdeA pp- > config ( ) ;
if ( s_about = = 0 )
if ( s_about = = 0 )
s_about = ( TDEAboutData * ) ka pp- > aboutData ( ) ;
s_about = ( TDEAboutData * ) tdeA pp- > aboutData ( ) ;
if ( LikeBack : : userWantToParticipate ( ) & & isDevelopmentVersion )
if ( LikeBack : : userWantToParticipate ( ) & & isDevelopmentVersion )
new LikeBack ( buttons ) ;
new LikeBack ( buttons ) ;
@ -503,7 +503,7 @@ void LikeBack::endFetchingEmailFrom()
/** class LikeBackDialog: */
/** class LikeBackDialog: */
LikeBackDialog : : LikeBackDialog ( LikeBack : : Button reason , TQString windowName , TQString context )
LikeBackDialog : : LikeBackDialog ( LikeBack : : Button reason , TQString windowName , TQString context )
: KDialog ( ka pp- > activeWindow ( ) , " _likeback_feedback_window_ " )
: KDialog ( tdeA pp- > activeWindow ( ) , " _likeback_feedback_window_ " )
, m_reason ( reason )
, m_reason ( reason )
, m_windowName ( windowName )
, m_windowName ( windowName )
, m_context ( context )
, m_context ( context )
@ -526,21 +526,21 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS
case LikeBack : : ILike :
case LikeBack : : ILike :
color = TQColor ( " #DFFFDF " ) ;
color = TQColor ( " #DFFFDF " ) ;
lineColor = TQt : : green ;
lineColor = TQt : : green ;
icon = ka pp- > iconLoader ( ) - > loadIcon ( " likeback_like " , TDEIcon : : Small ) ;
icon = tdeA pp- > iconLoader ( ) - > loadIcon ( " likeback_like " , TDEIcon : : Small ) ;
title = i18n ( " I like... " ) ;
title = i18n ( " I like... " ) ;
please = i18n ( " Please briefly describe what you like. " ) ;
please = i18n ( " Please briefly describe what you like. " ) ;
break ;
break ;
case LikeBack : : IDoNotLike :
case LikeBack : : IDoNotLike :
color = TQColor ( " #FFDFDF " ) ;
color = TQColor ( " #FFDFDF " ) ;
lineColor = TQt : : red ;
lineColor = TQt : : red ;
icon = ka pp- > iconLoader ( ) - > loadIcon ( " likeback_dislike " , TDEIcon : : Small ) ;
icon = tdeA pp- > iconLoader ( ) - > loadIcon ( " likeback_dislike " , TDEIcon : : Small ) ;
title = i18n ( " I do not like... " ) ;
title = i18n ( " I do not like... " ) ;
please = i18n ( " Please briefly describe what you do not like. " ) ;
please = i18n ( " Please briefly describe what you do not like. " ) ;
break ;
break ;
case LikeBack : : IFoundABug :
case LikeBack : : IFoundABug :
color = TQColor ( " #C0C0C0 " ) ;
color = TQColor ( " #C0C0C0 " ) ;
lineColor = TQt : : black ;
lineColor = TQt : : black ;
icon = ka pp- > iconLoader ( ) - > loadIcon ( " bug " , TDEIcon : : Small ) ;
icon = tdeA pp- > iconLoader ( ) - > loadIcon ( " bug " , TDEIcon : : Small ) ;
title = i18n ( " I found a bug... " ) ;
title = i18n ( " I found a bug... " ) ;
please = i18n ( " Please briefly describe the bug you encountered. " ) ;
please = i18n ( " Please briefly describe the bug you encountered. " ) ;
break ;
break ;
@ -578,7 +578,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS
commentLayout - > setMargin ( 0 ) ;
commentLayout - > setMargin ( 0 ) ;
commentLayout - > setSpacing ( KDialogBase : : spacingHint ( ) ) ;
commentLayout - > setSpacing ( KDialogBase : : spacingHint ( ) ) ;
m_comment = new TQTextEdit ( coloredWidget ) ;
m_comment = new TQTextEdit ( coloredWidget ) ;
TQIconSet sendIconSet = ka pp- > iconLoader ( ) - > loadIconSet ( " mail-send " , TDEIcon : : Toolbar ) ;
TQIconSet sendIconSet = tdeA pp- > iconLoader ( ) - > loadIconSet ( " mail-send " , TDEIcon : : Toolbar ) ;
m_sendButton = new TQPushButton ( sendIconSet , i18n ( " Send " ) , coloredWidget ) ;
m_sendButton = new TQPushButton ( sendIconSet , i18n ( " Send " ) , coloredWidget ) ;
m_sendButton - > setSizePolicy ( TQSizePolicy : : Fixed , TQSizePolicy : : Expanding ) ;
m_sendButton - > setSizePolicy ( TQSizePolicy : : Fixed , TQSizePolicy : : Expanding ) ;
m_sendButton - > setEnabled ( false ) ;
m_sendButton - > setEnabled ( false ) ;
@ -604,9 +604,9 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS
) + " </p> "
) + " </p> "
) ;
) ;
resize ( ka pp- > desktop ( ) - > width ( ) / 2 , ka pp- > desktop ( ) - > height ( ) / 3 ) ;
resize ( tdeA pp- > desktop ( ) - > width ( ) / 2 , tdeA pp- > desktop ( ) - > height ( ) / 3 ) ;
setCaption ( ka pp- > makeStdCaption ( i18n ( " Send a Comment " ) ) ) ;
setCaption ( tdeA pp- > makeStdCaption ( i18n ( " Send a Comment " ) ) ) ;
// setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work!
// setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work!
}
}