def preferences_dialog(self): if self._preferences_dialog is None: dl = self._preferences_dialog = PreferencesDialog(self) plugin_icon = QtGui.QIcon(":icons/plugins.png") plugins_pref = Preference(_("Plugins")) plugins_pref.setIcon(plugin_icon) pl_widg = PluginOptionsWidget(self) plugins_pref.setWidget(pl_widg) dl.insert_preference_dialog(0, plugins_pref) return self._preferences_dialog
def preferences_dialog(self): if self._preferences_dialog is None: dl = PlugableMainWindow.preferences_dialog(self) connections_pref = Preference(_("Database Connections")) m_d_widg = ManageDatabasesWidget(self) m_d_widg.set_connections(self.known_session_params) connections_pref.setWidget(m_d_widg) dl.insert_preference_dialog(0, connections_pref) self._preferences_dialog = dl return self._preferences_dialog
def add_font_option(self): ''' this is so useful, I include it by default ''' pref = Preference(_("Fonts")) pref.setWidget(FontOptionsWidget(self.parent())) pref.setIcon(QtGui.QIcon.fromTheme("applications-fonts")) self.add_preference_dialog(pref)