예제 #1
0
	def editGroupClicked(self, menu, winTitle, group):
		from scal3.ui_gtk.event.group.editor import GroupEditorDialog
		group = GroupEditorDialog(
			group,
			parent=self.get_toplevel(),
		).run()
		if group is not None:
			group.afterModify()
			group.save()## FIXME
			ui.changedGroups.append(group.id)
			ud.windowList.onConfigChange()
			self.queue_draw()
예제 #2
0
	def editGroupByPath(self, path):
		from scal3.ui_gtk.event.group.editor import GroupEditorDialog
		group, = self.getObjsByPath(path)
		if group.name == 'trash':
			self.editTrash()
		else:
			group = GroupEditorDialog(group, parent=self).run()
			if group is None:
				return
			groupIter = self.trees.get_iter(path)
			for i, value in enumerate(self.getGroupRow(group)):
				self.trees.set_value(groupIter, i, value)
			self.onGroupModify(group)
예제 #3
0
	def insertNewGroup(self, groupIndex):
		from scal3.ui_gtk.event.group.editor import GroupEditorDialog
		group = GroupEditorDialog(parent=self).run()
		if group is None:
			return
		ui.eventGroups.insert(groupIndex, group)
		ui.eventGroups.save()
		beforeGroupIter = self.trees.get_iter((groupIndex,))
		self.groupIterById[group.id] = self.trees.insert_before(
			#self.trees.get_iter_root(),## parent
			self.trees.iter_parent(beforeGroupIter),
			beforeGroupIter,## sibling
			self.getGroupRow(group),
		)
		self.onGroupModify(group)
		self.loadedGroupIds.add(group.id)
예제 #4
0
 def editGroupClicked(self, menu, winTitle, group):
     from scal3.ui_gtk.event.group.editor import GroupEditorDialog
     group = GroupEditorDialog(
         group,
         parent=self.get_toplevel(),
     ).run()
     if group is not None:
         group.afterModify()
         group.save()  ## FIXME
         ui.changedGroups.append(group.id)
         ud.windowList.onConfigChange()
         self.queue_draw()
예제 #5
0
	def editGroupByPath(self, path):
		from scal3.ui_gtk.event.group.editor import GroupEditorDialog
		checkEventsReadOnly()  # FIXME
		group, = self.getObjsByPath(path)
		if group.name == "trash":
			self.editTrash()
		elif group.isReadOnly():
			showError(_(
				"Event group \"%s\" is synchronizing and read-only"
			) % group.title, parent=self)
		else:
			group = GroupEditorDialog(group, parent=self).run()
			if group is None:
				return
			groupIter = self.trees.get_iter(path)
			for i, value in enumerate(self.getGroupRow(group)):
				self.trees.set_value(groupIter, i, value)
			self.onGroupModify(group)