summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abconfig.cpp14
-rw-r--r--core/pim/addressbook/abconfig.h3
-rw-r--r--core/pim/addressbook/addressbook.cpp32
-rw-r--r--core/pim/addressbook/configdlg.cpp5
-rw-r--r--core/pim/addressbook/configdlg_base.ui61
-rw-r--r--core/pim/addressbook/version.h2
6 files changed, 101 insertions, 16 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp
index e58fa76..0b61614 100644
--- a/core/pim/addressbook/abconfig.cpp
+++ b/core/pim/addressbook/abconfig.cpp
@@ -12,4 +12,5 @@ AbConfig::AbConfig( ):
m_fontSize( 1 ),
m_barPos( QMainWindow::Top ),
+ m_fixedBars( true ),
m_changed( false )
{
@@ -55,4 +56,8 @@ QMainWindow::ToolBarDock AbConfig::getToolBarPos() const
}
+bool AbConfig::fixedBars() const
+{
+ return m_fixedBars;
+}
void AbConfig::setUseRegExp( bool v )
@@ -99,4 +104,10 @@ void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v )
}
+void AbConfig::setFixedBars( const bool fixed )
+{
+ m_fixedBars = fixed;
+ m_changed = true;
+}
+
void AbConfig::load()
{
@@ -134,4 +145,5 @@ void AbConfig::load()
cfg.setGroup("ToolBar");
m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top );
+ m_fixedBars= cfg.readBoolEntry( "fixedBars", true );
m_changed = false;
@@ -161,4 +173,5 @@ void AbConfig::save()
cfg.setGroup("ToolBar");
cfg.writeEntry( "Position", m_barPos );
+ cfg.writeEntry( "fixedBars", m_fixedBars );
cfg.setGroup("Version");
@@ -181,4 +194,5 @@ void AbConfig::operator= ( const AbConfig& cnf )
m_ordered = cnf.m_ordered;
m_barPos = cnf.m_barPos;
+ m_fixedBars = cnf.m_fixedBars;
}
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h
index b8460d7..ce51b4c 100644
--- a/core/pim/addressbook/abconfig.h
+++ b/core/pim/addressbook/abconfig.h
@@ -20,4 +20,5 @@ public:
QValueList<int> orderList() const;
QMainWindow::ToolBarDock getToolBarPos() const;
+ bool fixedBars() const;
void setUseRegExp( bool v );
@@ -29,4 +30,5 @@ public:
void setOrderList( const QValueList<int>& list );
void setToolBarDock( const QMainWindow::ToolBarDock v );
+ void setFixedBars( const bool fixed );
void operator= ( const AbConfig& cnf );
@@ -48,4 +50,5 @@ protected:
QValueList<int> m_ordered;
int m_barPos;
+ bool m_fixedBars;
bool m_changed;
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 14e5b3f..a5bf19b 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -88,14 +88,12 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
// Settings for Main Menu
- setToolBarsMovable( true );
+ // setToolBarsMovable( false );
+ setToolBarsMovable( !m_config.fixedBars() );
setRightJustification( true );
- // Create Toolbar
- listTools = new QPEToolBar( this, "list operations" );
- listTools->setHorizontalStretchable( true );
- addToolBar( listTools );
- moveToolBar( listTools, m_config.getToolBarPos() );
+ QPEToolBar *bar = new QPEToolBar( this );
+ bar->setHorizontalStretchable( TRUE );
- QPEMenuBar *mbList = new QPEMenuBar( this );
+ QPEMenuBar *mbList = new QPEMenuBar( bar );
mbList->setMargin( 0 );
@@ -103,4 +101,15 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
mbList->insertItem( tr( "Contact" ), edit );
+ // Category Menu
+ catMenu = new QPopupMenu( this );
+ catMenu->setCheckable( TRUE );
+ connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
+ mbList->insertItem( tr("View"), catMenu );
+
+ // Create Toolbar
+ listTools = new QPEToolBar( this, "list operations" );
+ listTools->setHorizontalStretchable( true );
+ addToolBar( listTools );
+ moveToolBar( listTools, m_config.getToolBarPos() );
// View Icons
@@ -244,12 +253,9 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
vb->addWidget( pLabel );
- // Category Menu
- catMenu = new QPopupMenu( this );
- catMenu->setCheckable( TRUE );
- connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
+ // All Categories into view-menu..
populateCategories();
- mbList->insertItem( tr("View"), catMenu );
- defaultFont = new QFont( m_abView->font() );
+ // Fontsize
+ defaultFont = new QFont( m_abView->font() );
slotSetFont(m_config.fontSize());
m_curFontSize = m_config.fontSize();
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp
index f2f4141..629feef 100644
--- a/core/pim/addressbook/configdlg.cpp
+++ b/core/pim/addressbook/configdlg.cpp
@@ -123,5 +123,6 @@ void ConfigDlg::setConfig( const AbConfig& cnf )
}
-
+ m_fixedBars->setChecked( m_config.fixedBars() );
+ m_moveBars->setChecked( !m_config.fixedBars() );
}
@@ -147,4 +148,6 @@ AbConfig ConfigDlg::getConfig()
m_config.setOrderList( orderlist );
+ m_config.setFixedBars( m_fixedBars->isChecked() );
+
return m_config;
}
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index 308e138..1b5ac17 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -81,5 +81,5 @@
<property stdset="1">
<name>margin</name>
- <number>5</number>
+ <number>2</number>
</property>
<property stdset="1">
@@ -256,4 +256,63 @@
</hbox>
</widget>
+ <widget>
+ <class>QButtonGroup</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ButtonGroup4</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Tool-/Menubar</string>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>m_fixedBars</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Fixed</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string></string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Switch to fixed menu-/toolbars after restarting application !</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>m_moveBars</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Movable</string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Switch to moveable menu-/toolbars after restarting application !</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
<spacer>
<property>
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h
index 999ce67..d590a86 100644
--- a/core/pim/addressbook/version.h
+++ b/core/pim/addressbook/version.h
@@ -4,5 +4,5 @@
#define MAINVERSION "0"
#define SUBVERSION "9"
-#define PATCHVERSION "2"
+#define PATCHVERSION "3"
#define APPNAME "OPIE_ADDRESSBOOK"