[gedit-latex] Cleanup LaTeXStructureAction/Default in toolbar
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Cleanup LaTeXStructureAction/Default in toolbar
- Date: Thu, 18 Aug 2011 01:41:44 +0000 (UTC)
commit 56c399bff8c2b76ad6476fcb9f571b8e893b29b5
Author: John Stowers <john stowers gmail com>
Date: Thu Aug 18 13:28:33 2011 +1200
Cleanup LaTeXStructureAction/Default in toolbar
data/ui/ui-toolbar-combined.builder | 2 +-
data/ui/ui-toolbar-normal.builder | 2 +-
latex/base/config.py | 4 ++--
latex/latex/actions.py | 20 ++++++--------------
4 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/data/ui/ui-toolbar-combined.builder b/data/ui/ui-toolbar-combined.builder
index 224f120..d8e0c00 100644
--- a/data/ui/ui-toolbar-combined.builder
+++ b/data/ui/ui-toolbar-combined.builder
@@ -52,7 +52,7 @@
<toolitem action="LaTeXEnumerateAction" />
<toolitem action="LaTeXDescriptionAction" />
<separator />
- <toolitem action="LaTeXStructureAction">
+ <toolitem action="LaTeXStructureActionDefault">
<menu action="LaTeXStructureMenuAction">
<menuitem action="LaTeXPartAction" />
<menuitem action="LaTeXChapterAction" />
diff --git a/data/ui/ui-toolbar-normal.builder b/data/ui/ui-toolbar-normal.builder
index c0c4bc9..e20ce10 100644
--- a/data/ui/ui-toolbar-normal.builder
+++ b/data/ui/ui-toolbar-normal.builder
@@ -51,7 +51,7 @@
<toolitem action="LaTeXEnumerateAction" />
<toolitem action="LaTeXDescriptionAction" />
<separator />
- <toolitem action="LaTeXStructureAction">
+ <toolitem action="LaTeXStructureActionDefault">
<menu action="LaTeXStructureMenuAction">
<menuitem action="LaTeXPartAction" />
<menuitem action="LaTeXChapterAction" />
diff --git a/latex/base/config.py b/latex/base/config.py
index 9563a2d..18ac48b 100644
--- a/latex/base/config.py
+++ b/latex/base/config.py
@@ -27,7 +27,7 @@ base.config
from ..latex.actions import LaTeXMenuAction, LaTeXNewAction, LaTeXChooseMasterAction, \
LaTeXItemizeAction, LaTeXEnumerateAction, LaTeXFontFamilyAction, LaTeXFontFamilyMenuAction, LaTeXBoldAction, \
LaTeXItalicAction, LaTeXEmphasizeAction, LaTeXDescriptionAction, LaTeXStructureMenuAction, LaTeXPartAction, LaTeXChapterAction, \
- LaTeXSectionAction, LaTeXSubsectionAction, LaTeXParagraphAction, LaTeXSubparagraphAction, LaTeXStructureAction, \
+ LaTeXSectionAction, LaTeXSubsectionAction, LaTeXParagraphAction, LaTeXSubparagraphAction, LaTeXStructureActionDefault, \
LaTeXGraphicsAction, LaTeXUseBibliographyAction, LaTeXTableAction, LaTeXListingAction, LaTeXJustifyLeftAction, \
LaTeXJustifyCenterAction, LaTeXJustifyRightAction, LaTeXMathMenuAction, LaTeXMathActionDefault, LaTeXMathAction, LaTeXDisplayMathAction, \
LaTeXEquationAction, LaTeXUnEqnArrayAction, LaTeXEqnArrayAction, LaTeXUnderlineAction, LaTeXSmallCapitalsAction, \
@@ -40,7 +40,7 @@ from ..bibtex.actions import BibTeXMenuAction, BibTeXNewEntryAction
ACTIONS = [LaTeXMenuAction, LaTeXNewAction, LaTeXChooseMasterAction,
LaTeXItemizeAction, LaTeXEnumerateAction, LaTeXFontFamilyAction, LaTeXFontFamilyMenuAction, LaTeXBoldAction,
LaTeXItalicAction, LaTeXEmphasizeAction, LaTeXDescriptionAction, LaTeXStructureMenuAction, LaTeXPartAction, LaTeXChapterAction,
- LaTeXSectionAction, LaTeXSubsectionAction, LaTeXParagraphAction, LaTeXSubparagraphAction, LaTeXStructureAction,
+ LaTeXSectionAction, LaTeXSubsectionAction, LaTeXParagraphAction, LaTeXSubparagraphAction, LaTeXStructureActionDefault,
LaTeXGraphicsAction, LaTeXUseBibliographyAction, LaTeXTableAction, LaTeXListingAction, LaTeXJustifyLeftAction,
LaTeXJustifyCenterAction, LaTeXJustifyRightAction, LaTeXMathMenuAction, LaTeXMathActionDefault, LaTeXMathAction, LaTeXDisplayMathAction,
LaTeXEquationAction, LaTeXUnEqnArrayAction, LaTeXEqnArrayAction, LaTeXUnderlineAction, LaTeXSmallCapitalsAction,
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index da944a3..9db6aac 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -289,24 +289,10 @@ class LaTeXDescriptionAction(LaTeXTemplateAction):
icon_name = "description"
template_source = "\\begin{description}\n\t\\item[$_]\n\\end{description}"
-
-class LaTeXStructureAction(LaTeXIconAction):
- menu_tool_action = True
-
- label = "Structure"
- accelerator = None
- tooltip = "Structure"
- icon_name = "section"
-
- def activate(self, context):
- pass
-
-
class LaTeXStructureMenuAction(LaTeXMenuAction):
label = "Structure"
tooltip = "Structure"
-
class LaTeXPartAction(LaTeXTemplateAction):
label = "Part"
tooltip = "Part"
@@ -328,6 +314,12 @@ class LaTeXSectionAction(LaTeXTemplateAction):
template_source = "\\section{$_}"
+class LaTeXStructureActionDefault(LaTeXSectionAction):
+ menu_tool_action = True
+ label = "Structure"
+ tooltip = "Structure"
+
+
class LaTeXSubsectionAction(LaTeXTemplateAction):
label = "Subsection"
tooltip = "Subsection"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]