From 86c420a68008e4430bd769ebdecdfa430ba552f5 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 21 Mar 2005 14:46:33 +0000 Subject: init fix --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 96ced08..90b36ac 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1823,6 +1823,49 @@ void CalendarView::readSettings() //mViewManager->readSettings( config ); mTodoList->restoreLayout(config,QString("Todo Layout")); readFilterSettings(config); + +#ifdef DESKTOP_VERSION + config->setGroup("WidgetLayout"); + QStringList list; + list = config->readListEntry("MainLayout"); + int x,y,w,h; + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + topLevelWidget()->setGeometry(x,y,w,h); + + } else { + topLevelWidget()->setGeometry( 40 ,40 , 640, 440); + } + list = config->readListEntry("EditEventLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + mEventEditor->setGeometry(x,y,w,h); + + } + list = config->readListEntry("EditTodoLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + mTodoEditor->setGeometry(x,y,w,h); + + } + list = config->readListEntry("ViewerLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + getEventViewerDialog()->setGeometry(x,y,w,h); + } +#endif config->setGroup( "Views" ); int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); @@ -1898,49 +1941,6 @@ void CalendarView::readSettings() updateConfig(); globalFlagBlockAgenda = 2; mViewManager->readSettings( config ); -#ifdef DESKTOP_VERSION - config->setGroup("WidgetLayout"); - QStringList list; - list = config->readListEntry("MainLayout"); - int x,y,w,h; - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - topLevelWidget()->setGeometry(x,y,w,h); - - } else { - topLevelWidget()->setGeometry( 40 ,40 , 640, 440); - } - list = config->readListEntry("EditEventLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - mEventEditor->setGeometry(x,y,w,h); - - } - list = config->readListEntry("EditTodoLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - mTodoEditor->setGeometry(x,y,w,h); - - } - list = config->readListEntry("ViewerLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - getEventViewerDialog()->setGeometry(x,y,w,h); - } -#endif - } -- cgit v0.9.0.2