Beispiel #1
0
    def addFileTab(self, file_path=None):
        if file_path in self.open_files:
            return

        if file_path:
            index = self.addTab(Editor(self, file_path),
                                file_path.split("/")[-1])

        else:
            index = self.addTab(Editor(
                self,
                file_path,
            ), self.tr("untitled"))

        self.open_files.append(file_path)
        self.setCurrentIndex(index)
Beispiel #2
0
    def __init__(self, setting):
        """Constructor

        """
        super(EditorApplication, self).__init__(setting)
        self.editor_settings = self.settings.getSettingsFromFile("fife-rpg")
        # For IDES
        if False:
            self.editor_gui = EditorGui(self)

        self.editor_gui = None

        self.changed_maps = []
        self.add_map_load_callback(self.cb_map_loaded)
        self._objects_imported_callbacks = []
        self.selected_object = None
        self.editor = Editor(self.engine)
        self.editor_gui = EditorGui(self)
        self.current_dialog = None
Beispiel #3
0
    def __init__(self, app):
        Gtk.Window.__init__(self, title='ImEditor', application=app)
        self.set_default_size(700, 500)
        self.set_position(Gtk.WindowPosition.CENTER)

        grid = Gtk.Grid()
        self.add(grid)

        self.editor = Editor()
        self.editor.set_win(self)

        # Menubar:
        create_menubar(self, app.menu_info)
        # Toolbar:
        toolbar = create_toolbar(self)
        grid.attach(toolbar, 0, 0, 1, 1)
        # Tabs:
        self.notebook = Gtk.Notebook()
        grid.attach(self.notebook, 0, 1, 1, 1)

        self.root = self.get_root_window()
        self.default_cursor = Gdk.Cursor(Gdk.CursorType.ARROW)
        self.draw_cursor = Gdk.Cursor(Gdk.CursorType.PENCIL)
        self.move_cursor = Gdk.Cursor(Gdk.CursorType.FLEUR)
Beispiel #4
0
from editor.editor import Editor

e = Editor()
e.showWindow()