Ensure that the default for "Use custom templates in this folder" is off.

Make the "Insert command" button in the templates dialogue into a proper
menu button, using QPushButton::setMenu().

Eliminate "No newline at end of file" warning for stringutil.h

CCBUG:184307

svn path=/trunk/KDE/kdepim/; revision=951937
wilder-work
Jonathan Marten 17 years ago
parent 249d337317
commit eed01f610f
  1. 2
      stringutil.h
  2. 1
      templatesconfiguration_kfg.kcfg
  3. 14
      templatesinsertcommand.cpp
  4. 1
      templatesinsertcommand.h

@ -158,4 +158,4 @@ namespace StringUtil
}
#endif
#endif

@ -9,6 +9,7 @@
<group name="Templates #$(folder)">
<entry name="UseCustomTemplates" type="Bool" key="UseCustomTemplates">
<default>false</default>
</entry>
<entry name="TemplateNewMessage" type="String" key="TemplateNewMessage">
</entry>

@ -33,9 +33,7 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam
: QPushButton( parent )
{
setObjectName( name );
setText( i18n( "&Insert Command..." ) );
connect( this, SIGNAL( clicked() ),
this, SLOT( slotClicked() ) );
setText( i18n( "&Insert Command" ) );
KAction *action;
KActionMenu *menu;
@ -44,7 +42,7 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam
connect( mapper, SIGNAL( mapped(int) ),
this, SLOT( slotMapped(int) ) );
mMenu = new KActionMenu( i18n( "Insert Command..." ), this );
mMenu = new KActionMenu( i18n( "Insert Command" ), this );
// ******************************************************
menu = new KActionMenu( i18n( "Original Message" ), mMenu );
@ -371,16 +369,12 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam
connect(action,SIGNAL(triggered(bool)),mapper,SLOT(map()));
mapper->setMapping( action, CDebugOff );
menu->addAction( action );
}
TemplatesInsertCommand::~TemplatesInsertCommand()
{
setMenu( mMenu->menu() );
}
void TemplatesInsertCommand::slotClicked()
TemplatesInsertCommand::~TemplatesInsertCommand()
{
QSize ps = mMenu->menu()->sizeHint();
mMenu->menu()->popup( mapToGlobal( QPoint( 0, -(ps.height()) ) ) );
}
void TemplatesInsertCommand::slotMapped( int cmd )

@ -50,7 +50,6 @@ class TemplatesInsertCommand : public QPushButton
void insertCommand( const QString& cmd, int adjustCursor = 0 );
public slots:
void slotClicked();
void slotMapped( int cmd );
protected:

Loading…
Cancel
Save