Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Toolbars.py
diff options
context:
space:
mode:
Diffstat (limited to 'Toolbars.py')
-rw-r--r--Toolbars.py57
1 files changed, 46 insertions, 11 deletions
diff --git a/Toolbars.py b/Toolbars.py
index 7d92ade..b1df153 100644
--- a/Toolbars.py
+++ b/Toolbars.py
@@ -4,6 +4,7 @@
# Gabriel, hice esto porque es un revoltijo abook.py :P
try:
import gtk
+ import sys
from gettext import gettext as _
from sugar import profile
from sugar import mime
@@ -29,29 +30,65 @@ try:
from ayuda import HelpButton as Ayudas
except ImportError:
print 'NO SE ESTA EN SUGAR.. SALIENDO'
-
+ sys.exit()
Fonts = Combo()
Fonts.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
Title_Tam = Combo()
Title_Tam.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
-Colore = ColorToolButton()
-Color_t = ColorToolButton()
+ColorLetra = ColorToolButton()
+ColorTitle = ColorToolButton()
+ColorFondo = ColorToolButton()
+Col = gtk.gdk.Color('#ffffff')
+ColorFondo.set_color(Col)
restart_button = ToolButton("home")
reading_button = ToolButton("read")
load_button = ToolButton("open-from-journal")
credits = ToolButton("credits")
+tutorial = ToolButton("tutorial")
+tutorial.set_tooltip(_("Tutorial book"))
new_button = ToolButton("new")
book_button = ToolButton("edit-p")
page_button = ToolButton("edit-c")
check_button = ToolButton("broken")
+def Color_Toolbar(toolbar):
+ color_button = ToolbarButton(icon_name='color-preview')
+ color_toolbar = gtk.Toolbar()
+ ColorContentLabel = gtk.Label(_('Color for content')) # Duda ¿Es content o context?
+ ColorFondoLabel = gtk.Label(_('Color for page'))
+ ColorTitleLabel = gtk.Label(_('Color for title'))
+ # Contenido del libro
+ Item = gtk.ToolItem()
+ Item.add(ColorContentLabel)
+ Item.show()
+
+ color_toolbar.insert(Item, -1)
+ color_toolbar.insert(ColorLetra, -1)
+ color_toolbar.insert(gtk.SeparatorToolItem(), -1)
+
+ # Fondo #
+ Item = gtk.ToolItem()
+ Item.add(ColorFondoLabel)
+ Item.show()
+
+ color_toolbar.insert(Item, -1)
+ color_toolbar.insert(ColorFondo, -1)
+ color_toolbar.insert(gtk.SeparatorToolItem(), -1)
+
+ Item = gtk.ToolItem()
+ Item.add(ColorTitleLabel)
+ Item.show()
+ color_toolbar.insert(Item, -1)
+ color_toolbar.insert(ColorTitle, -1)
+
+ color_button.props.page = color_toolbar
+ color_toolbar.show_all()
+ toolbar.toolbar.insert(color_button, -1)
def Text_Toolbar(toolbar):
text_button = ToolbarButton(icon_name="format-text-size")
text_toolbar = gtk.Toolbar()
- A = gtk.Label(_('<--Color Content:'))
- B = gtk.Label(_('<--Color Title:'))
- text_toolbar.insert(Colore, -1)
-
+ A = gtk.Label(_('Content:'))
+ B = gtk.Label(_('Title:'))
Item = gtk.ToolItem()
Item.add(A)
Item.show()
@@ -67,7 +104,6 @@ def Text_Toolbar(toolbar):
Item = gtk.ToolItem()
Item.add(B)
Item.show()
- text_toolbar.insert(Color_t, -1)
text_toolbar.insert(Item, -1)
Item = gtk.ToolItem()
Item.add(Title_Tam)
@@ -75,9 +111,6 @@ def Text_Toolbar(toolbar):
Title_Tam.show()
text_toolbar.insert(Item, -1)
-
- Colore.show()
- Color_t.show()
text_toolbar.show_all()
text_button.props.page = text_toolbar
toolbar.toolbar.insert(text_button, -1)
@@ -109,6 +142,8 @@ def Read_Toolbar(toolbar):
credits.set_tooltip(_("Credits"))
read_toolbar.insert(credits, -1)
+ read_toolbar.insert(tutorial, -1)
+ tutorial.show()
credits.show()
toolbar.toolbar.insert(read_button, -1)
def Write_Toolbar(toolbar):