function setPreferencesNoticeBox($msg, $color = false) { global $dialogPreferences, $gui; if ($msg === false) { $dialogPreferences->get_widget('_noticeBar')->hide(); return; } $color = $color ?: $gui['CNoticeBarBG']; gtColor($dialogPreferences->get_widget('_noticeBar'), 'bg', $color); gtSetText($dialogPreferences->get_widget('_noticeLabel'), $msg); $dialogPreferences->get_widget('_noticeBar')->show(); }
$glade->get_widget('_btnTipUp')->connect_simple('clicked', 'setTip', -1); $glade->get_widget('_btnTipDown')->connect_simple('clicked', 'setTip', 1); $_btnAbout->connect_simple('clicked', 'showAboutDialog'); $_btnNavRefresh->connect_simple('clicked', 'refreshFile'); foreach ($_btnNav as $type => $btn) { $btn->connect_simple('clicked', 'navBarClick', $type); } /* Widget customization */ /* See guiOptions.php */ if ($debugMode) { $_mainWindow->set_title($i18n->_('debugModeTitle', $_mainWindow->get_title())); } gtColor('_infoBox', 'bg', $gui['CNoticeBarBG']); gtColor($_topLabel, 'fg', $gui['CNoticeBarFG']); gtFont($_topLabel, $gui['SNoticeBar']); gtColor($_tipLabel, 'fg', $gui['CNoticeBarFG']); gtFont($_tipLabel, $gui['XTipOfTheDay']); /* Setting widgets according to user config */ gtShow($glade->get_widget('_infoBar'), $config['displayInfobar']); gtShow($glade->get_widget('_navBar'), $config['displayNavbar']); gtShow($glade->get_widget('_previewArea'), $config['displayPreview']); $glade->get_widget('_toolbar')->set_toolbar_style($toolbarStyles[$config['toolbarStyle']]); gtShow($_btnUpload, $config['enableUpload']); /* Run */ if (!is_dir($config['tempDirectory'])) { makeDirHierarchy($config['tempDirectory']); } $_previewSpinner->hide(); setTip(); // set initial, random tip of the day if (isset($argv[1]) && file_exists($argv[1])) {