Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 084900d..53db477 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -62,15 +62,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | |||
62 | packageListServers.update(); | 62 | packageListServers.update(); |
63 | pvDebug(9,"packageListDocLnk.update"); | 63 | pvDebug(9,"packageListDocLnk.update"); |
64 | pvDebug(0,"no UPDATE of DocLnk"); | ||
65 | packageListDocLnk.update(); | 64 | packageListDocLnk.update(); |
66 | pvDebug(9,"makeMenu"); | 65 | pvDebug(9,"makeMenu"); |
67 | makeMenu(); | 66 | makeMenu(); |
68 | makeChannel(); | 67 | makeChannel(); |
69 | //opie is hardcoded default ;) | 68 | |
70 | //pvDebug(9,"section->setCurrentItem"); | ||
71 | // for (int i=0;i<section->count();i++) | ||
72 | // if (section->text(i)=="opie") | ||
73 | // section->setCurrentItem(i); | ||
74 | // sectionChanged(); | ||
75 | 69 | ||
76 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); | 70 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); |
@@ -152,10 +146,16 @@ void MainWindow::makeMenu() | |||
152 | addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); | 146 | addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); |
153 | sectionBar->setHorizontalStretchable( true ); | 147 | sectionBar->setHorizontalStretchable( true ); |
154 | QLabel *label = new QLabel( tr("Section: "), sectionBar ); | 148 | QLabel *label = new QLabel( sectionBar, "section" ); |
155 | label->setBackgroundColor( sectionBar->backgroundColor() ); | 149 | // label->setBackgroundMode( NoBackground ); |
150 | label->font().setPointSize( 8 ); | ||
151 | label->setText( tr( "Section:" ) ); | ||
152 | sectionBar->setStretchableWidget( label ); | ||
156 | section = new QComboBox( false, sectionBar ); | 153 | section = new QComboBox( false, sectionBar ); |
154 | section->font().setPointSize( 8 ); | ||
157 | label = new QLabel( " / ", sectionBar ); | 155 | label = new QLabel( " / ", sectionBar ); |
158 | label->setBackgroundColor( sectionBar->backgroundColor() ); | 156 | label->font().setPointSize( 8 ); |
157 | // label->setBackgroundMode( PaletteForeground ); | ||
159 | subsection = new QComboBox( false, sectionBar ); | 158 | subsection = new QComboBox( false, sectionBar ); |
159 | subsection->font().setPointSize( 8 ); | ||
160 | a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 160 | a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
161 | connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); | 161 | connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); |
@@ -167,5 +167,5 @@ void MainWindow::makeMenu() | |||
167 | sectionAction->setToggleAction( true ); | 167 | sectionAction->setToggleAction( true ); |
168 | sectionAction->addTo( viewMenu ); | 168 | sectionAction->addTo( viewMenu ); |
169 | sectionBar->setStretchableWidget( section ); | 169 | // sectionBar->setStretchableWidget( section ); |
170 | 170 | ||
171 | //FIND | 171 | //FIND |
@@ -173,5 +173,5 @@ void MainWindow::makeMenu() | |||
173 | addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); | 173 | addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); |
174 | label = new QLabel( tr("Filter: "), findBar ); | 174 | label = new QLabel( tr("Filter: "), findBar ); |
175 | label->setBackgroundColor( findBar->backgroundColor() ); | 175 | // label->setBackgroundMode( PaletteForeground ); |
176 | findBar->setHorizontalStretchable( TRUE ); | 176 | findBar->setHorizontalStretchable( TRUE ); |
177 | findEdit = new QLineEdit( findBar, "findEdit" ); | 177 | findEdit = new QLineEdit( findBar, "findEdit" ); |
@@ -194,5 +194,5 @@ void MainWindow::makeMenu() | |||
194 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); | 194 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); |
195 | label = new QLabel( tr("ipkgfind: "), searchBar ); | 195 | label = new QLabel( tr("ipkgfind: "), searchBar ); |
196 | label->setBackgroundColor( searchBar->backgroundColor() ); | 196 | // label->setBackgroundMode( PaletteForeground ); |
197 | searchBar->setHorizontalStretchable( TRUE ); | 197 | searchBar->setHorizontalStretchable( TRUE ); |
198 | searchEdit = new QLineEdit( searchBar, "seachEdit" ); | 198 | searchEdit = new QLineEdit( searchBar, "seachEdit" ); |
@@ -218,5 +218,5 @@ void MainWindow::makeMenu() | |||
218 | addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); | 218 | addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); |
219 | label = new QLabel( tr("Destination: "), destBar ); | 219 | label = new QLabel( tr("Destination: "), destBar ); |
220 | label->setBackgroundColor( destBar->backgroundColor() ); | 220 | // label->setBackgroundMode( PaletteForeground ); |
221 | destBar->setHorizontalStretchable( TRUE ); | 221 | destBar->setHorizontalStretchable( TRUE ); |
222 | destination = new QComboBox( false, destBar ); | 222 | destination = new QComboBox( false, destBar ); |
@@ -226,7 +226,7 @@ void MainWindow::makeMenu() | |||
226 | settings, SLOT(activeDestinationChange(int)) ); | 226 | settings, SLOT(activeDestinationChange(int)) ); |
227 | spacer = new QLabel( " ", destBar ); | 227 | spacer = new QLabel( " ", destBar ); |
228 | spacer->setBackgroundColor( destBar->backgroundColor() ); | 228 | // spacer->setBackgroundMode( PaletteForeground ); |
229 | CheckBoxLink = new QCheckBox( tr("Link"), destBar); | 229 | CheckBoxLink = new QCheckBox( tr("Link"), destBar); |
230 | CheckBoxLink->setBackgroundColor( destBar->backgroundColor() ); | 230 | // CheckBoxLink->setBackgroundMode( PaletteForeground ); |
231 | CheckBoxLink->setChecked( settings->createLinks() ); | 231 | CheckBoxLink->setChecked( settings->createLinks() ); |
232 | connect( CheckBoxLink, SIGNAL(toggled(bool)), | 232 | connect( CheckBoxLink, SIGNAL(toggled(bool)), |
@@ -286,4 +286,6 @@ void MainWindow::makeMenu() | |||
286 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); | 286 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); |
287 | destShow( cfg.readBoolEntry( "destBar", false ) ); | 287 | destShow( cfg.readBoolEntry( "destBar", false ) ); |
288 | setComboName(section,cfg.readEntry("default_section")); | ||
289 | sectionChanged(); | ||
288 | } | 290 | } |
289 | 291 | ||
@@ -296,4 +298,5 @@ MainWindow::~MainWindow() | |||
296 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); | 298 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); |
297 | cfg.writeEntry( "destBar", !destBar->isHidden() ); | 299 | cfg.writeEntry( "destBar", !destBar->isHidden() ); |
300 | cfg.writeEntry( "default_section", section->currentText() ); | ||
298 | 301 | ||
299 | } | 302 | } |