from pida.ui.views import WindowConfig from pida.core.pdbus import DbusConfig, EXPORT from pida.core import environment from pygtkhelpers.gthreads import AsyncTask, gcall from pida.core.projects import REFRESH_PRIORITY # locale from pida.core.locale import Locale locale = Locale('project') _ = locale.gettext from .views import ProjectListView, ProjectSetupView LEXPORT = EXPORT(suffix='project') def open_directory_dialog(parent, title, folder=''): filechooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) filechooser.set_default_response(gtk.RESPONSE_OK) if folder: filechooser.set_current_folder(folder) response = filechooser.run() if response != gtk.RESPONSE_OK: filechooser.destroy()
from pida.ui.views import PidaView, WindowConfig from pida.ui.dropdownmenutoolbutton import DropDownMenuToolButton from pygtkhelpers.ui.widgets import AttrSortCombo from pygtkhelpers.ui.objectlist import Column, ObjectList from pygtkhelpers.ui import dialogs import filehiddencheck # locale from pida.core.locale import Locale locale = Locale('filemanager') _ = locale.gettext IEXPORT = EXPORT(suffix='filemanager') state_text = dict( hidden=' ', none='?', new='A', #XXX added='A', modified='M', ignored=' ', normal=' ', error='E', empty='!', conflict='C', removed='D', missing='!', max='+',
from pida.core.actions import ActionsConfig from pida.core.pdbus import DbusConfig, EXPORT from pida.ui.views import WindowConfig from pida.core.document import Document, DocumentException from pygtkhelpers.gthreads import gcall # locale from pida.core.locale import Locale locale = Locale('buffer') _ = locale.gettext from .view import BufferListView, attributes LEXPORT = EXPORT(suffix='buffer') class BufferActionsConfig(ActionsConfig): def create_actions(self): self.create_action( 'open_file', gtk.Action, _('_Open File'), _('Open a file with a graphical file browser'), gtk.STOCK_OPEN, self.on_open_file, '<Shift><Control>O', ) self.create_action(
# ui from pida.ui.prioritywindow import Category from pida.ui.views import WindowConfig from .disabled import (NoopCompleter, NoopValidator, NoopDefiner, NoopDocumentator, NoopOutliner) # locale from pida.core.locale import Locale locale = Locale('plugins') _ = locale.gettext logger = logbook.Logger('service.language') LEXPORT = EXPORT(suffix='language') # we have to put our type database here, as plugins may need it long before # registering from .__init__ import DOCTYPES from .views import ( ValidatorView, BrowserView, DefinitionView, LanguageEntry, LanguagePriorityView, ) def prio_path(): return environment.settings_dir().join(
# PIDA Imports from pida.core.service import Service from pida.core.options import OptionsConfig from pida.core.actions import ActionsConfig from pida.core.pdbus import DbusConfig, SIGNAL, EXPORT, BUS, DBUS_NS from pida.core.environment import workspace_name from json import loads, dumps # locale from pida.core.locale import Locale locale = Locale('appcontroller') _ = locale.gettext LEXPORT = EXPORT(suffix='appcontroller') LSIGNAL = SIGNAL(suffix='appcontroller') class AppcontrollerConfig(OptionsConfig): def create_options(self): self.create_option( 'open_workspace_manager', _('Always show workspace manager'), bool, False, _('Always open the workspace manager when no workspace name is given'), ) class AppcontrollerActions(ActionsConfig):
import os # PIDA Imports import pida.core.environment as env from pida.ui.views import PidaView from pida.core.editors import EditorService # Emacs specific from .emacsembed import EmacsEmbedWidget from .emacscom import EmacsClient from pida.core.pdbus import DbusConfig, EXPORT EEXPORT = EXPORT(suffix='emacs') class EmacsView(PidaView): """ UI class for emacs editor uses EmacsEmbedWidget to integrate into a PidaView widget """ def create_ui(self): self._emacs = EmacsEmbedWidget( 'emacs', self.svc.initscript, ['-eval', '(pida-connect 1001)'] ) self.add_main_widget(self._emacs) def run(self):