Changeset 1881
- Timestamp:
- Wed Jan 18 16:30:28 2006
- Files:
-
- trunk/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/src/OptionsContainer.cxx (added)
- trunk/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/src/OptionsWindow.h (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/src/OptionsContainer.h (added)
- trunk/livesupport/src/products/gLiveSupport/src/main.cxx (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/src/GLiveSupport.h (modified) (diff)
- trunk/livesupport/src/products/gLiveSupport/bin/gLiveSupport.sh (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/OptionsWindow.cxx
r1876 r1881 39 39 #include "LiveSupport/Widgets/Button.h" 40 40 #include "LiveSupport/Widgets/ScrolledNotebook.h" 41 #include "LiveSupport/Widgets/EntryBin.h" 41 42 #include "OptionsWindow.h" 42 43 … … 89 90 mainNotebook = Gtk::manage(new ScrolledNotebook); 90 91 Gtk::Box * aboutSectionBox = constructAboutSection(); 92 Gtk::Box * soundSectionBox = constructSoundSection(); 91 93 92 94 try { 93 95 mainNotebook->appendPage(*aboutSectionBox, 94 *getResourceUstring("aboutSectionLabel")); 96 *getResourceUstring("aboutSectionLabel")); 97 mainNotebook->appendPage(*soundSectionBox, 98 *getResourceUstring("soundSectionLabel")); 95 99 96 100 } catch (std::invalid_argument &e) { … … 139 143 // show everything 140 144 set_name(windowName); 141 set_default_size(350, 250);145 set_default_size(350, 300); 141 145 set_modal(false); 142 146 property_window_position().set_value(Gtk::WIN_POS_NONE); 216 220 } 217 221 222 223 /*------------------------------------------------------------------------------ 224 * Construct the "Sound" section. 225 *----------------------------------------------------------------------------*/ 226 Gtk::VBox* 227 OptionsWindow :: constructSoundSection(void) throw () 228 { 229 Ptr<OptionsContainer>::Ref optionsContainer 230 = gLiveSupport->getOptionsContainer(); 231 Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance(); 232 233 Gtk::Table * audioDeviceTable = Gtk::manage(new Gtk::Table); 234 audioDeviceTable->set_row_spacings(10); 235 audioDeviceTable->set_col_spacings(5); 236 237 // display the settings for the cue player device 238 Glib::ustring cuePlayerLabelContents; 239 try { 240 cuePlayerLabelContents.append(*getResourceUstring("cueDeviceLabel")); 241 242 } catch (std::invalid_argument &e) { 243 // TODO: signal error 244 std::cerr << e.what() << std::endl; 245 std::exit(1); 246 } 247 Gtk::Label * cuePlayerLabel = Gtk::manage( 248 new Gtk::Label(cuePlayerLabelContents) ); 249 audioDeviceTable->attach(*cuePlayerLabel, 0, 1, 0, 1); 250 251 EntryBin * cuePlayerEntry = Gtk::manage(wf->createEntryBin()); 252 cuePlayerEntry->set_text(*optionsContainer->getOptionItem( 253 OptionsContainer::cuePlayerDeviceName )); 254 audioDeviceTable->attach(*cuePlayerEntry, 1, 2, 0, 1); 255 256 // display the settings for the output player device 257 Glib::ustring outputPlayerLabelContents; 258 try { 259 outputPlayerLabelContents.append(*getResourceUstring( 260 "outputDeviceLabel")); 261 } catch (std::invalid_argument &e) { 262 // TODO: signal error 263 std::cerr << e.what() << std::endl; 264 std::exit(1); 265 } 266 Gtk::Label * outputPlayerLabel = Gtk::manage( 267 new Gtk::Label(outputPlayerLabelContents) ); 268 audioDeviceTable->attach(*outputPlayerLabel, 0, 1, 1, 2); 269 270 EntryBin * outputPlayerEntry = Gtk::manage(wf->createEntryBin()); 271 outputPlayerEntry->set_text(*optionsContainer->getOptionItem( 272 OptionsContainer::outputPlayerDeviceName )); 273 audioDeviceTable->attach(*outputPlayerEntry, 1, 2, 1, 2); 274 275 // TODO: remove this 276 Gtk::Label * notFinishedWarning = Gtk::manage(new Gtk::Label( 277 "Note: device settings can not be edited (yet)." )); 278 279 // make a new box and pack the components into it 280 Gtk::VBox * section = Gtk::manage(new Gtk::VBox); 281 section->pack_start(*audioDeviceTable, Gtk::PACK_SHRINK, 5); 282 section->pack_start(*notFinishedWarning, Gtk::PACK_SHRINK, 20); 283 284 return section; 285 } 286 -
trunk/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx
r1869 r1881 298 298 ++it; 299 299 } 300 301 // save the config file so we can modify it later 302 // TODO: move configuration code to the OptionsContainer class? 303 optionsContainer.reset(new OptionsContainer(element)); 300 304 } 301 305 -
trunk/livesupport/src/products/gLiveSupport/src/OptionsWindow.h
r1875 r1881 164 164 constructAboutSection(void) throw (); 165 165 166 /** 167 * Construct the "Sound" section. 168 * 169 * @return a pointer to the new box (already Gtk::manage()'ed) 170 */ 171 Gtk::VBox* 172 constructSoundSection(void) throw (); 173 166 174 167 175 public: -
trunk/livesupport/src/products/gLiveSupport/src/main.cxx
r1601 r1881 158 158 try { 159 159 std::auto_ptr<xmlpp::DomParser> 160 parser(new xmlpp::DomParser(configFileName, true));160 parser(new xmlpp::DomParser(configFileName, false)); 160 160 const xmlpp::Document * document = parser->get_document(); 161 161 gLiveSupport->configure(*(document->get_root_node())); -
trunk/livesupport/src/products/gLiveSupport/src/GLiveSupport.h
r1869 r1881 56 56 #include "LiveSupport/Widgets/WidgetFactory.h" 57 57 #include "KeyboardShortcutContainer.h" 58 #include "OptionsContainer.h" 58 59 59 60 … … 328 329 */ 329 330 WindowPositionsListType windowPositions; 331 332 /** 333 * An object containing the contents of the options file. 334 */ 335 Ptr<OptionsContainer>::Ref optionsContainer; 330 336 331 337 1021 1027 void 1022 1028 loadWindowPositions(void) throw (); 1029 1030 /** 1031 * Access the OptionsContainer object containing the options. 1032 */ 1033 Ptr<OptionsContainer>::Ref 1034 getOptionsContainer(void) throw() 1035 { 1036 return optionsContainer; 1037 } 1023 1038 }; 1024 1039 -
trunk/livesupport/src/products/gLiveSupport/bin/gLiveSupport.sh
r1823 r1881 50 50 export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH 51 51 gLiveSupport_exe=$bindir/gLiveSupport 52 config_file=$etcdir/gLiveSupport.xml 52 53 if [ -f ~/.livesupport/gLiveSupport.xml ]; then 54 config_file=~/.livesupport/gLiveSupport.xml 55 elif [ -f $etcdir/gLiveSupport.xml ]; then 56 config_file=$etcdir/gLiveSupport.xml 57 else 58 echo "Can't find configuration file."; 59 fi 53 60 54 61 $gLiveSupport_exe --version -
trunk/livesupport/src/products/gLiveSupport/var/root.txt
r1876 r1881 223 223 224 224 aboutSectionLabel:string { "About" } 225 soundSectionLabel:string { "Sound" } 225 226 226 227 cancelButtonLabel:string { "Cancel" } 229 230 230 231 reportBugsToText:string { "Report bugs to: {0}" } 232 233 cueDeviceLabel:string { "Cue audio device:" } 234 outputDeviceLabel:string { "Live Mode audio device:" } 231 235 } 232 236 -
trunk/livesupport/src/products/gLiveSupport/etc/Makefile.in
r1878 r1881 260 260 ${TMP_DIR}/KeyboardShortcut.o \ 261 261 ${TMP_DIR}/KeyboardShortcutContainer.o \ 262 ${TMP_DIR}/OptionsContainer.o \ 262 263 ${TMP_DIR}/OptionsWindow.o 263 264