Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/formattabwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/netsystemtime/formattabwidget.cpp b/noncore/settings/netsystemtime/formattabwidget.cpp index daa020f..982305b 100644 --- a/noncore/settings/netsystemtime/formattabwidget.cpp +++ b/noncore/settings/netsystemtime/formattabwidget.cpp | |||
@@ -93,50 +93,50 @@ FormatTabWidget::FormatTabWidget( QWidget *parent ) | |||
93 | DateFormat df(QChar(config.readEntry("Separator", "/")[0]), | 93 | DateFormat df(QChar(config.readEntry("Separator", "/")[0]), |
94 | (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), | 94 | (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), |
95 | (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear)); | 95 | (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear)); |
96 | 96 | ||
97 | int currentdf = 0; | 97 | int currentdf = 0; |
98 | date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear ); | 98 | date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear ); |
99 | cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) ); | 99 | cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) ); |
100 | date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear ); | 100 | date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear ); |
101 | if ( df == date_formats[1] ) | 101 | if ( df == date_formats[1] ) |
102 | currentdf = 1; | 102 | currentdf = 1; |
103 | cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) ); | 103 | cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) ); |
104 | date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear ); | 104 | date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear ); |
105 | if ( df == date_formats[2] ) | 105 | if ( df == date_formats[2] ) |
106 | currentdf = 2; | 106 | currentdf = 2; |
107 | cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601 | 107 | cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601 |
108 | date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear ); | 108 | date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear ); |
109 | if ( df == date_formats[3] ) | 109 | if ( df == date_formats[3] ) |
110 | currentdf = 3; | 110 | currentdf = 3; |
111 | cbDateFormat->insertItem( tr( date_formats[3].toNumberString() ) ); | 111 | cbDateFormat->insertItem( tr( date_formats[3].toNumberString() ) ); |
112 | 112 | ||
113 | cbDateFormat->setCurrentItem( currentdf ); | 113 | cbDateFormat->setCurrentItem( currentdf ); |
114 | //dateButton->setDateFormat( df ); | 114 | //dateButton->setDateFormat( df ); |
115 | 115 | ||
116 | config.setGroup( "Time" ); | 116 | config.setGroup( "Time" ); |
117 | cbAmpm->setCurrentItem( config.readBoolEntry( "AMPM" ) ? 1 : 0 ); | 117 | cbAmpm->setCurrentItem( config.readBoolEntry( "AMPM", FALSE ) ? 1 : 0 ); |
118 | cbWeekStart->setCurrentItem( config.readBoolEntry( "MONDAY" ) ? 1 : 0 ); | 118 | cbWeekStart->setCurrentItem( config.readBoolEntry( "MONDAY", TRUE ) ? 1 : 0 ); |
119 | 119 | ||
120 | // Send initial configuration options | 120 | // Send initial configuration options |
121 | QTimer::singleShot( 1200, this, SLOT(sendOptions()) ); | 121 | QTimer::singleShot( 1200, this, SLOT(sendOptions()) ); |
122 | } | 122 | } |
123 | 123 | ||
124 | FormatTabWidget::~FormatTabWidget() | 124 | FormatTabWidget::~FormatTabWidget() |
125 | { | 125 | { |
126 | } | 126 | } |
127 | 127 | ||
128 | void FormatTabWidget::saveSettings( bool commit ) | 128 | void FormatTabWidget::saveSettings( bool commit ) |
129 | { | 129 | { |
130 | int ampm = cbAmpm->currentItem(); | 130 | int ampm = cbAmpm->currentItem(); |
131 | int weekstart = cbWeekStart->currentItem(); | 131 | int weekstart = cbWeekStart->currentItem(); |
132 | DateFormat df = date_formats[cbDateFormat->currentItem()]; | 132 | DateFormat df = date_formats[cbDateFormat->currentItem()]; |
133 | int appletformat = cbAppletFormat->currentItem(); | 133 | int appletformat = cbAppletFormat->currentItem(); |
134 | 134 | ||
135 | if ( commit ) | 135 | if ( commit ) |
136 | { | 136 | { |
137 | // Write settings to config file | 137 | // Write settings to config file |
138 | Config config("qpe"); | 138 | Config config("qpe"); |
139 | config.setGroup( "Time" ); | 139 | config.setGroup( "Time" ); |
140 | config.writeEntry( "AMPM", ampm ); | 140 | config.writeEntry( "AMPM", ampm ); |
141 | config.writeEntry( "MONDAY", weekstart ); | 141 | config.writeEntry( "MONDAY", weekstart ); |
142 | config.setGroup( "Date" ); | 142 | config.setGroup( "Date" ); |