summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-26 17:06:57 (UTC)
committer zautrix <zautrix>2005-03-26 17:06:57 (UTC)
commitc692f6870157f428aebf1dfdab4fbb6e88699c31 (patch) (unidiff)
tree43c45e0aef74c1d1fcc42d22bc1e05c9318159ca
parent5079ed1883f8e53bc12be971c3c9495f45abf341 (diff)
downloadkdepimpi-c692f6870157f428aebf1dfdab4fbb6e88699c31.zip
kdepimpi-c692f6870157f428aebf1dfdab4fbb6e88699c31.tar.gz
kdepimpi-c692f6870157f428aebf1dfdab4fbb6e88699c31.tar.bz2
layout fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp4
-rw-r--r--korganizer/calendarview.cpp18
-rw-r--r--korganizer/mainwindow.cpp23
-rw-r--r--korganizer/mainwindow.h1
4 files changed, 35 insertions, 11 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 4af4a8c..40347cc 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -68,16 +68,20 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
68{ 68{
69 69
70 setCaption( i18n("Settings - some need a restart (nr)")); 70 setCaption( i18n("Settings - some need a restart (nr)"));
71 setupGlobalTab(); 71 setupGlobalTab();
72 setupMainTab(); 72 setupMainTab();
73 setupMailTab();; 73 setupMailTab();;
74 setupFontsTab(); 74 setupFontsTab();
75 readConfig(); 75 readConfig();
76#ifndef DESKTOP_VERSION
77 if ( QApplication::desktop()->height() == 480 )
78 hideButtons();
79#endif
76 80
77#if 0 81#if 0
78 82
79 setupMainTab(); 83 setupMainTab();
80 setupLocaleTab(); 84 setupLocaleTab();
81 setupTimeZoneTab(); 85 setupTimeZoneTab();
82 setupTimeTab(); 86 setupTimeTab();
83 setupLocaleDateTab(); 87 setupLocaleDateTab();
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 92fd59c..3a16fe6 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3601,31 +3601,37 @@ void CalendarView::showDates(const DateList &selectedDates)
3601 if ( !mBlockShowDates ) { 3601 if ( !mBlockShowDates ) {
3602 if ( mViewManager->currentView() ) { 3602 if ( mViewManager->currentView() ) {
3603 updateView( selectedDates.first(), selectedDates.last() ); 3603 updateView( selectedDates.first(), selectedDates.last() );
3604 } else { 3604 } else {
3605 mViewManager->showAgendaView(); 3605 mViewManager->showAgendaView();
3606 } 3606 }
3607 } 3607 }
3608 3608
3609 QDate date = selectedDates.first();
3610 if ( ! date.isValid() ) {
3611 topLevelWidget()->setCaption("");
3612 return;
3613 }
3614
3609 QString selDates; 3615 QString selDates;
3610 selDates = KGlobal::locale()->formatDate( selectedDates.first(), true); 3616 selDates = KGlobal::locale()->formatDate( date, true);
3611 if (selectedDates.first() < selectedDates.last() ) 3617 if (selectedDates.first() < selectedDates.last() )
3612 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 3618 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
3613 else { 3619 else {
3614 QString addString; 3620 QString addString;
3615 if ( selectedDates.first() == QDateTime::currentDateTime().date() ) 3621 if ( date == QDateTime::currentDateTime().date() )
3616 addString = i18n("Today"); 3622 addString = i18n("Today");
3617 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) 3623 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
3618 addString = i18n("Tomorrow"); 3624 addString = i18n("Tomorrow");
3619 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) 3625 else if ( date == QDateTime::currentDateTime().date().addDays(-1) )
3620 addString = i18n("Yesterday"); 3626 addString = i18n("Yesterday");
3621 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) 3627 else if ( date == QDateTime::currentDateTime().date().addDays(-2) )
3622 addString = i18n("Day before yesterday"); 3628 addString = i18n("Day before yesterday");
3623 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) 3629 else if ( date == QDateTime::currentDateTime().date().addDays(2) )
3624 addString = i18n("Day after tomorrow"); 3630 addString = i18n("Day after tomorrow");
3625 if ( !addString.isEmpty() ) { 3631 if ( !addString.isEmpty() ) {
3626 topLevelWidget()->setCaption( addString+", " + selDates ); 3632 topLevelWidget()->setCaption( addString+", " + selDates );
3627 return; 3633 return;
3628 } 3634 }
3629 } 3635 }
3630 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 3636 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
3631 3637
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7faf675..7d5cf72 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -136,17 +136,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
136 mClosed = false; 136 mClosed = false;
137 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 137 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
138 QString confFile = locateLocal("config","korganizerrc"); 138 QString confFile = locateLocal("config","korganizerrc");
139 QFileInfo finf ( confFile ); 139 QFileInfo finf ( confFile );
140 bool showWarning = !finf.exists(); 140 bool showWarning = !finf.exists();
141 setIcon(SmallIcon( "ko24" ) ); 141 setIcon(SmallIcon( "ko24" ) );
142 mBlockAtStartup = true; 142 mBlockAtStartup = true;
143 mFlagKeyPressed = false; 143 mFlagKeyPressed = false;
144 setCaption("KOrganizer/Pi"); 144 setCaption("KO/Pi");
145 KOPrefs *p = KOPrefs::instance(); 145 KOPrefs *p = KOPrefs::instance();
146 KPimGlobalPrefs::instance()->setGlobalConfig(); 146 KPimGlobalPrefs::instance()->setGlobalConfig();
147 if ( p->mHourSize > 22 ) 147 if ( p->mHourSize > 22 )
148 p->mHourSize = 22; 148 p->mHourSize = 22;
149 QMainWindow::ToolBarDock tbd; 149 QMainWindow::ToolBarDock tbd;
150 if ( p->mToolBarHor ) { 150 if ( p->mToolBarHor ) {
151 if ( p->mToolBarUp ) 151 if ( p->mToolBarUp )
152 tbd = Bottom; 152 tbd = Bottom;
@@ -1847,28 +1847,41 @@ void MainWindow::configureToolBar( int item )
1847 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 1847 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
1848 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 1848 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
1849 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 1849 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
1850 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 1850 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
1851 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 1851 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
1852 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); 1852 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
1853 // initActions(); 1853 // initActions();
1854} 1854}
1855 1855void MainWindow::setCaption ( const QString & c )
1856{
1857 QString cap = c;
1858 cap.replace( QRegExp("\n"), " " );
1859 cap = cap.stripWhiteSpace();
1860 if ( cap.isEmpty() )
1861 cap = "KO/Pi";
1862 QWidget::setCaption( cap );
1863}
1856void MainWindow::setCaptionToDates() 1864void MainWindow::setCaptionToDates()
1857{ 1865{
1858 QString selDates; 1866 QString selDates;
1859 selDates = KGlobal::locale()->formatDate(mView->startDate(), true); 1867 QDate date = mView->startDate();
1868 if ( ! date.isValid() ) {
1869 setCaption("");
1870 return;
1871 }
1872 selDates = KGlobal::locale()->formatDate( date, true);
1860 if (mView->startDate() < mView->endDate() ) 1873 if (mView->startDate() < mView->endDate() )
1861 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 1874 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
1862 else { 1875 else {
1863 QString addString; 1876 QString addString;
1864 if ( mView->startDate() == QDateTime::currentDateTime().date() ) 1877 if ( date == QDateTime::currentDateTime().date() )
1865 addString = i18n("Today"); 1878 addString = i18n("Today");
1866 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) ) 1879 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
1867 addString = i18n("Tomorrow"); 1880 addString = i18n("Tomorrow");
1868 if ( !addString.isEmpty() ) 1881 if ( !addString.isEmpty() )
1869 selDates = addString+", "+selDates ; 1882 selDates = addString+", "+selDates ;
1870 } 1883 }
1871 setCaption( i18n("Dates: ") + selDates ); 1884 setCaption( i18n("Dates: ") + selDates );
1872 1885
1873} 1886}
1874void MainWindow::showConfigureAgenda( ) 1887void MainWindow::showConfigureAgenda( )
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 5808700..7604529 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -45,16 +45,17 @@ class MainWindow : public QMainWindow
45 public: 45 public:
46 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); 46 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
47 ~MainWindow(); 47 ~MainWindow();
48 bool beamReceiveEnabled(); 48 bool beamReceiveEnabled();
49 static QString defaultFileName(); 49 static QString defaultFileName();
50 static QString syncFileName(); 50 static QString syncFileName();
51 static QString resourcePath(); 51 static QString resourcePath();
52 public slots: 52 public slots:
53 void setCaption ( const QString & );
53 void updateWeekNum(const KCal::DateList &); 54 void updateWeekNum(const KCal::DateList &);
54 void updateWeek(QDate); 55 void updateWeek(QDate);
55 virtual void showMaximized (); 56 virtual void showMaximized ();
56 void configureAgenda( int ); 57 void configureAgenda( int );
57 void recieve( const QCString& msg, const QByteArray& data ); 58 void recieve( const QCString& msg, const QByteArray& data );
58 protected slots: 59 protected slots:
59 void setCaptionToDates(); 60 void setCaptionToDates();
60 void weekAction(); 61 void weekAction();