Changeset 1875
- Timestamp:
- Tue Jan 3 20:16:18 2006
- Files:
-
- trunk/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx (added)
- trunk/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/src/OptionsWindow.h (added)
- trunk/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/var/root.txt (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/etc/Makefile.in (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h
r1869 r1875 58 58 #include "SchedulerWindow.h" 59 59 #include "SearchWindow.h" 60 #include "OptionsWindow.h" 60 61 61 62 … … 215 216 216 217 /** 218 * The button to invoke the Options Window. 219 */ 220 Button * optionsButton; 221 222 /** 217 223 * The gLiveSupport object, handling the logic of the application. 218 224 */ … … 247 253 * The one and only search window. 248 254 */ 249 Ptr<SearchWindow>::Ref searchWindow; 255 Ptr<SearchWindow>::Ref searchWindow; 256 257 /** 258 * The one and only options window. 259 */ 260 Ptr<OptionsWindow>::Ref optionsWindow; 250 261 251 262 /** … … 365 376 366 377 /** 378 * Function to catch the event of the Options button 379 * button being pressed. 380 */ 381 virtual void 382 onOptionsButtonClicked(void) throw () 383 { 384 if (!optionsWindow || 385 optionsWindow && !optionsWindow->is_visible()) { 386 updateOptionsWindow(); 387 } else { 388 gLiveSupport->putWindowPosition(optionsWindow); 389 optionsWindow->hide(); 390 } 391 } 392 393 /** 367 394 * Signal handler for a key pressed at one of the entries. 368 395 * The keys can be customized by the keyboardShortcutContainer 469 496 470 497 /** 498 * Update the Options Window 499 */ 500 void 501 updateOptionsWindow(void) throw (); 502 503 /** 471 504 * Get the next item from the top of the Live Mode window. 472 505 * The item is removed from the Live Mode window. -
trunk/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx
r1869 r1875 194 194 schedulerButton = 0; 195 195 searchButton = 0; 196 optionsButton = 0; 196 197 changeLanguage(bundle); 197 198 … … 242 243 buttonBar->remove(*searchButton); 243 244 } 245 if (optionsButton) { 246 buttonBar->remove(*optionsButton); 247 } 244 248 245 249 try { … … 260 264 searchButton = Gtk::manage(wf->createButton( 261 265 *getResourceUstring("searchButtonLabel"))); 266 optionsButton = Gtk::manage(wf->createButton( 267 *getResourceUstring("optionsButtonLabel"))); 262 268 } catch (std::invalid_argument &e) { 263 269 std::cerr << e.what() << std::endl; … … 286 292 Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 287 293 5, 0); 294 buttonBar->attach(*optionsButton, 6, 7, 0, 1, 295 Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 296 5, 0); 288 297 289 298 // re-bind events to the buttons … … 301 310 searchButton->signal_clicked().connect(sigc::mem_fun(*this, 302 311 &MasterPanelWindow::onSearchButtonClicked)); 312 optionsButton->signal_clicked().connect(sigc::mem_fun(*this, 313 &MasterPanelWindow::onOptionsButtonClicked)); 303 314 } 304 315 … … 541 552 542 553 /*------------------------------------------------------------------------------ 554 * The event when the Options button has been clicked. 555 *----------------------------------------------------------------------------*/ 556 void 557 MasterPanelWindow :: updateOptionsWindow(void) throw () 558 { 559 if (!optionsWindow.get()) { 560 Ptr<ResourceBundle>::Ref bundle; 561 try { 562 bundle = getBundle("optionsWindow"); 563 } catch (std::invalid_argument &e) { 564 std::cerr << e.what() << std::endl; 565 return; 566 } 567 568 optionsWindow.reset(new OptionsWindow(gLiveSupport, bundle)); 569 gLiveSupport->getWindowPosition(optionsWindow); 570 } 571 572 if (!optionsWindow->is_visible()) { 573 gLiveSupport->getWindowPosition(optionsWindow); 574 optionsWindow->show(); 575 } 576 } 577 578 579 /*------------------------------------------------------------------------------ 543 580 * Show only the UI components that are visible when no one is logged in 544 581 *----------------------------------------------------------------------------*/ … … 553 590 schedulerButton->hide(); 554 591 searchButton->hide(); 592 optionsButton->hide(); 555 593 556 594 if (liveModeWindow.get()) { 596 634 searchWindow.reset(); 597 635 } 636 if (optionsWindow.get()) { 637 if (optionsWindow->is_visible()) { 638 gLiveSupport->putWindowPosition(optionsWindow); 639 optionsWindow->hide(); 640 } 641 optionsWindow.reset(); 642 } 598 643 } 599 644 -
trunk/livesupport/src/products/gLiveSupport/var/root.txt
r1729 r1875 13 13 schedulerButtonLabel:string { "scheduler" } 14 14 searchButtonLabel:string { "search" } 15 optionsButtonLabel:string { "options" } 15 16 16 17 cancelButtonLabel:string { "Cancel" } 217 218 } 218 219 220 optionsWindow:table 221 { 222 windowTitle:string { "LiveSupport Options Window" } 223 224 aboutSectionLabel:string { "About" } 225 226 cancelButtonLabel:string { "Cancel" } 227 applyButtonLabel:string { "Apply" } 228 okButtonLabel:string { "OK" } 229 } 230 219 231 metadataTypes:table 220 232 { -
trunk/livesupport/src/products/gLiveSupport/etc/Makefile.in
r1747 r1875 260 260 ${TMP_DIR}/CuePlayer.o \ 261 261 ${TMP_DIR}/KeyboardShortcut.o \ 262 ${TMP_DIR}/KeyboardShortcutContainer.o 262 ${TMP_DIR}/KeyboardShortcutContainer.o \ 263 ${TMP_DIR}/OptionsWindow.o 263 264 264 265 G_LIVESUPPORT_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \