예제 #1
0
 def __init__(self):
     app = None
     if __name__ != '__main__':
         from application import get_app
         app = get_app()
         self._brush = app.brush
         bm = app.brushmanager
         bm.brush_selected += self.brush_selected_cb
     else:
         self._brush = lib.brush.BrushInfo()
         self._brush.load_defaults()
     SubWindow.__init__(self, app, key_input=False)
     # Adjusters: may be shared those of the app
     self._base_adj = {}  #: setting cname => base value adj
     self._input_y_adj = {}  #: input name => scale y range (+-) adj
     self._input_xmin_adj = {}  #: input name => scale x min adj
     self._input_xmax_adj = {}  #: input name => scale x min adj
     self._disable_input_adj_changed_cb = False
     self._init_adjustments()
     self.set_title("Brush Settings Editor")
     self._setting = None
     self._builder = Gtk.Builder()
     self._build_ui()
     self.connect_after("show", self._post_show_cb)
     editor = self._builder.get_object("brush_editor")
     self.add(editor)
     self._brush.observers.append(self.brush_modified_cb)
     self._live_update_idle_cb_id = None
     GObject.idle_add(self._update_brush_header)
예제 #2
0
 def __init__(self):
     app = None
     if __name__ != '__main__':
         from application import get_app
         app = get_app()
         self._brush = app.brush
         bm = app.brushmanager
         bm.brush_selected += self.brush_selected_cb
     else:
         self._brush = lib.brush.BrushInfo()
         self._brush.load_defaults()
     SubWindow.__init__(self, app, key_input=True)
     # Adjusters: may be shared those of the app
     self._base_adj = {}  #: setting cname => base value adj
     self._input_y_adj = {}  #: input name => scale y range (+-) adj
     self._input_xmin_adj = {}  #: input name => scale x min adj
     self._input_xmax_adj = {}  #: input name => scale x min adj
     self._disable_input_adj_changed_cb = False
     self._init_adjustments()
     self.set_title(C_(
         "brush settings editor: subwindow title",
         "Brush Settings Editor",
     ))
     self._setting = None
     self._builder = Gtk.Builder()
     self._build_ui()
     self.connect_after("show", self._post_show_cb)
     editor = self._builder.get_object("brush_editor")
     self.add(editor)
     self._brush.observers.append(self.brush_modified_cb)
     self._live_update_idle_cb_id = None
     self._updating_metadata_ui = False
예제 #3
0
 def __init__(self):
     app = None
     if __name__ != '__main__':
         from application import get_app
         app = get_app()
         self._brush = app.brush
         bm = app.brushmanager
         bm.brush_selected += self.brush_selected_cb
     else:
         self._brush = lib.brush.BrushInfo()
         self._brush.load_defaults()
     SubWindow.__init__(self, app, key_input=True)
     # Tracking vars for updating the treestore in response to
     # brush setting changes and loading new brushes.
     self._treestore = None
     self._setting_treepath = {}  # {cname: Gtk.TreePath}, path for setting
     self._group_treepath = {}  # {groupid: Gtk.TreePath}, path for group
     self._setting_group = {}  # {cname: groupid}, group containing setting
     # Adjusters: may be shared with those of the app
     self._base_adj = {}  #: setting cname => base value adj
     self._input_y_adj = {}  #: input name => scale y range (+-) adj
     self._input_xmin_adj = {}  #: input name => scale x min adj
     self._input_xmax_adj = {}  #: input name => scale x min adj
     self._disable_input_adj_changed_cb = False
     self._init_adjustments()
     self.set_title(
         C_(
             "brush settings editor: subwindow title",
             "Brush Settings Editor",
         ))
     self._setting = None
     self._builder = Gtk.Builder()
     self._builder.set_translation_domain("mypaint")
     self._build_ui()
     self.connect_after("show", self._post_show_cb)
     editor = self._builder.get_object("brush_editor")
     self.add(editor)
     self._brush.observers.append(self.brush_modified_cb)
     self._live_update_idle_cb_id = None
     self._updating_metadata_ui = False
예제 #4
0
 def __init__(self):
     app = None
     if __name__ != '__main__':
         from application import get_app
         app = get_app()
         self._brush = app.brush
         bm = app.brushmanager
         bm.brush_selected += self.brush_selected_cb
     else:
         self._brush = lib.brush.BrushInfo()
         self._brush.load_defaults()
     SubWindow.__init__(self, app, key_input=True)
     # Tracking vars for updating the treestore in response to
     # brush setting changes and loading new brushes.
     self._treestore = None
     self._setting_treepath = {}  # {cname: Gtk.TreePath}, path for setting
     self._group_treepath = {}  # {groupid: Gtk.TreePath}, path for group
     self._setting_group = {}  # {cname: groupid}, group containing setting
     # Adjusters: may be shared with those of the app
     self._base_adj = {}  #: setting cname => base value adj
     self._input_y_adj = {}  #: input name => scale y range (+-) adj
     self._input_xmin_adj = {}  #: input name => scale x min adj
     self._input_xmax_adj = {}  #: input name => scale x min adj
     self._disable_input_adj_changed_cb = False
     self._init_adjustments()
     self.set_title(C_(
         "brush settings editor: subwindow title",
         "Brush Settings Editor",
     ))
     self._setting = None
     self._builder = Gtk.Builder()
     self._builder.set_translation_domain("mypaint")
     self._build_ui()
     self.connect_after("show", self._post_show_cb)
     editor = self._builder.get_object("brush_editor")
     self.add(editor)
     self._brush.observers.append(self.brush_modified_cb)
     self._live_update_idle_cb_id = None
     self._updating_metadata_ui = False