foiegras r56 - trunk/src/foiegras/windows
- From: blsemage svn gnome org
- To: svn-commits-list gnome org
- Subject: foiegras r56 - trunk/src/foiegras/windows
- Date: Tue, 19 Feb 2008 14:57:45 +0000 (GMT)
Author: blsemage
Date: Tue Feb 19 14:57:45 2008
New Revision: 56
URL: http://svn.gnome.org/viewvc/foiegras?rev=56&view=rev
Log:
2008-02-19 Buddhika Laknath <blaknath gmail com>
* Removed auto toggling buttons
Modified:
trunk/src/foiegras/windows/main.py
Modified: trunk/src/foiegras/windows/main.py
==============================================================================
--- trunk/src/foiegras/windows/main.py (original)
+++ trunk/src/foiegras/windows/main.py Tue Feb 19 14:57:45 2008
@@ -141,40 +141,37 @@
]
self._annotation_actions = [
- # block tag actions
- ('CaptionAction', None, _("C_aption"), None, _(""), self.apply_block_tag),
- ('CitationAction', None, _("_Citation"), None, _(""), self.apply_block_tag),
- ('MultimediaObjectAction', None, _("_Multimedia Object"), None, _(""), self.apply_block_tag),
- ('CodeSnippetAction', None, _("C_ode Snippet"), None, _(""), self.apply_block_tag),
- ('ParagraphAction', None, _("_Paragraph"), None, _(""), self.apply_block_tag),
- ('ScreenAction', None, _("_Screen"), None, _(""), self.apply_block_tag),
- ('EditorialCommentAction', None, _("_Editorial Comment"), None, _(""), self.apply_block_tag),
- ('FigureAction', None, _("_Figure"), None, _(""), self.apply_block_tag),
- ('ListAction', None, _("_List"), None, _(""), self.apply_block_tag),
- ('NoteAction', None, _("_Note"), None, _(""), self.apply_block_tag),
- ('SynopseAction', None, _("Sy_nopse"), None, _(""), self.apply_block_tag),
- ('TableAction', None, _("_Table"), None, _(""), self.apply_block_tag),
-
- # inline tag actions
- ('ApplicationNameAction', gtk.STOCK_EXECUTE, _("_Application Name"), None, _(""), self.apply_inline_tag),
- ('CommandAction', None, _("_Command"), None, _(""), self.apply_inline_tag),
- ('ComputerOutputAction', None, _("Computer _Output"), None, _(""), self.apply_inline_tag),
- ('DateAction', None, _("_Date"), None, _(""), self.apply_inline_tag),
+ ('CaptionAction', None, _("Caption"), None, _(""), self.apply_block_tag),
+ ('CitationAction', None, _("Citation"), None, _(""), self.apply_block_tag),
+ ('MultimediaObjectAction', None, _("Multimedia Object"), None, _(""), self.apply_block_tag),
+ ('CodeSnippetAction', None, _("Code Snippet"), None, _(""), self.apply_block_tag),
+ ('ParagraphAction', None, _("Paragraph"), None, _(""), self.apply_block_tag),
+ ('ScreenAction', None, _("Screen"), None, _(""), self.apply_block_tag),
+ ('EditorialCommentAction', None, _("Editorial Comment"), None, _(""), self.apply_block_tag),
+ ('FigureAction', None, _("Figure"), None, _(""), self.apply_block_tag),
+ ('ListAction', None, _("List"), None, _(""), self.apply_block_tag),
+ ('NoteAction', None, _("Note"), None, _(""), self.apply_block_tag),
+ ('SynopseAction', None, _("Synopse"), None, _(""), self.apply_block_tag),
+ ('TableAction', None, _("Table"), None, _(""), self.apply_block_tag),
+ ('ApplicationNameAction', gtk.STOCK_EXECUTE, _("Application Name"), None, _(""), self.apply_inline_tag),
+ ('CommandAction', None, _("Command"), None, _(""), self.apply_inline_tag),
+ ('ComputerOutputAction', None, _("Computer Output"), None, _(""), self.apply_inline_tag),
+ ('DateAction', None, _("Date"), None, _(""), self.apply_inline_tag),
('EmphasisAction', None, _("_Emphasis"), None, _(""), self.apply_inline_tag),
- ('FileNameAction', None, _("_File Name"), None, _(""), self.apply_inline_tag),
- ('GUILabelAction', None, _("_GUI Label"), None, _(""), self.apply_inline_tag),
- ('HyperlinkAction', None, _("_Hyperlink"), None, _(""), self.apply_inline_tag),
- ('InlineCodeAction', None, _("I_nline Code"), None, _(""), self.apply_inline_tag),
- ('KeyStrokeAction', None, _("_Key Stroke"), None, _(""), self.apply_inline_tag),
- ('QuoteAction', None, _("_Quote"), None, _(""), self.apply_inline_tag),
- ('SystemItemAction', None, _("_System Item"), None, _(""), self.apply_inline_tag),
- ('UserInputAction', None, _("User _Input"), None, _(""), self.apply_inline_tag),
- ('VariableTextAction', None, _("_Variable Text"), None, _(""), self.apply_inline_tag),
+ ('FileNameAction', None, _("File Name"), None, _(""), self.apply_inline_tag),
+ ('GUILabelAction', None, _("GUI Label"), None, _(""), self.apply_inline_tag),
+ ('HyperlinkAction', None, _("Hyperlink"), None, _(""), self.apply_inline_tag),
+ ('InlineCodeAction', None, _("Inline Code"), None, _(""), self.apply_inline_tag),
+ ('KeyStrokeAction', None, _("Key Stroke"), None, _(""), self.apply_inline_tag),
+ ('QuoteAction', None, _("Quote"), None, _(""), self.apply_inline_tag),
+ ('SystemItemAction', None, _("System Item"), None, _(""), self.apply_inline_tag),
+ ('UserInputAction', None, _("User Input"), None, _(""), self.apply_inline_tag),
+ ('VariableTextAction', None, _("Variable Text"), None, _(""), self.apply_inline_tag),
]
self._actiongroup = gtk.ActionGroup('menubar')
self._actiongroup.add_actions(actions)
- self._actiongroup.add_toggle_actions(self._annotation_actions)
+ self._actiongroup.add_actions(self._annotation_actions)
self._actiongroup.add_action(OpenRecentToolAction("OpenToolAction", _("Open"), _(""), gtk.STOCK_OPEN))
self.uimanager.insert_action_group(self._actiongroup, 0)
@@ -297,15 +294,15 @@
"""
tags = buf.get_tags_at_selected_range()
- self._auto_toggled = True
+ #self._auto_toggled = True
for action_tuple in self._annotation_actions:
name = action_tuple[0]
tag = ACTION_TO_TAG[name]
- self._actiongroup.get_action(name).set_active(tag in tags)
+ #self._actiongroup.get_action(name).set_active(tag in tags)
- self._auto_toggled = False
+ #self._auto_toggled = False
def _open_toolbar(self, widget):
@@ -677,9 +674,10 @@
"""
Applies a block tag to the current selection.
"""
- if not self._auto_toggled:
- tag = ACTION_TO_TAG[action.get_name()]
- self._document._buffer.apply_block_tag(tag)
+ tag = ACTION_TO_TAG[action.get_name()]
+
+ self._document._buffer.apply_block_tag(tag)
+
def apply_inline_tag(self, action):
@@ -689,11 +687,9 @@
if not self._auto_toggled:
tag = ACTION_TO_TAG[action.get_name()]
- if action.get_active():
- self._document._buffer.apply_inline_tag(tag)
- else:
- self._document._buffer.remove_inline_tag(tag)
+ #if action.get_active():
+ self._document._buffer.apply_inline_tag(tag)
+ #else:
+ #self._document._buffer.remove_inline_tag(tag)
self._document.get_view().grab_focus()
-
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]