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
@@ -13,2 +13,3 @@ AbConfig::AbConfig( ):
m_barPos( QMainWindow::Top ),
+ m_fixedBars( true ),
m_changed( false )
@@ -56,2 +57,6 @@ QMainWindow::ToolBarDock AbConfig::getToolBarPos() const
+bool AbConfig::fixedBars() const
+{
+ return m_fixedBars;
+}
@@ -100,2 +105,8 @@ void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v )
+void AbConfig::setFixedBars( const bool fixed )
+{
+ m_fixedBars = fixed;
+ m_changed = true;
+}
+
void AbConfig::load()
@@ -135,2 +146,3 @@ void AbConfig::load()
m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top );
+ m_fixedBars= cfg.readBoolEntry( "fixedBars", true );
@@ -162,2 +174,3 @@ void AbConfig::save()
cfg.writeEntry( "Position", m_barPos );
+ cfg.writeEntry( "fixedBars", m_fixedBars );
@@ -182,2 +195,3 @@ void AbConfig::operator= ( const AbConfig& cnf )
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
@@ -21,2 +21,3 @@ public:
QMainWindow::ToolBarDock getToolBarPos() const;
+ bool fixedBars() const;
@@ -30,2 +31,3 @@ public:
void setToolBarDock( const QMainWindow::ToolBarDock v );
+ void setFixedBars( const bool fixed );
@@ -49,2 +51,3 @@ protected:
int m_barPos;
+ bool m_fixedBars;
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
@@ -89,12 +89,10 @@ 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 );
@@ -104,2 +102,13 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
+ // 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() );
@@ -245,10 +254,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
- // 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());
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
@@ -124,3 +124,4 @@ void ConfigDlg::setConfig( const AbConfig& cnf )
-
+ m_fixedBars->setChecked( m_config.fixedBars() );
+ m_moveBars->setChecked( !m_config.fixedBars() );
}
@@ -148,2 +149,4 @@ AbConfig ConfigDlg::getConfig()
+ 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
@@ -82,3 +82,3 @@
<name>margin</name>
- <number>5</number>
+ <number>2</number>
</property>
@@ -257,2 +257,61 @@
</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>
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
@@ -5,3 +5,3 @@
#define SUBVERSION "9"
-#define PATCHVERSION "2"
+#define PATCHVERSION "3"