From 6085ebccbf4d542c2e3529bcce6b6cd2cb555dc4 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 28 Mar 2009 07:52:07 +0000 Subject: adding fullscreen mode --- diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index 8d33af7..47d4042 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -633,7 +633,21 @@ class ProjectToolbar(gtk.Toolbar): self.sampb.props.sensitive = True self.sampb.connect('clicked', self.do_samples) self.insert(self.sampb, -1) - self.sampb.show() + self.sampb.show( +) + separator = gtk.SeparatorToolItem() + separator.set_draw(True) + self.insert(separator, -1) + separator.show() + + # full screen + self.fullscreenb = ToolButton( "view-fullscreen" ) + self.fullscreenb.set_tooltip(_('fullscreen')) + self.fullscreenb.props.sensitive = True + self.fullscreenb.props.accelerator = 'Enter' + self.fullscreenb.connect('clicked', self.do_fullscreen) + self.insert(self.fullscreenb, -1) + self.fullscreenb.show() def do_palette(self, button): if self.activity.tw.palette == True: @@ -713,4 +727,5 @@ class ProjectToolbar(gtk.Toolbar): # run the activity tawindow.runbutton(self.activity.tw, 0) - + def do_fullscreen(self, button): + self.activity.fullscreen() diff --git a/images/emptyheap.svg b/images/emptyheap.svg index 3ca8e01..8ad93ef 100644 --- a/images/emptyheap.svg +++ b/images/emptyheap.svg @@ -10,24 +10,24 @@ + style="fill:#ffd000;fill-opacity:1;fill-rule:evenodd;stroke:#e0a000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + transform="translate(656,65.625)" + id="g6"> + id="text10" + style="font-size:12px;font-weight:bold;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> X @@ -42,6 +42,7 @@ style="font-size:24px">[] ! diff --git a/images/nocode.svg b/images/nocode.svg index 2c35684..123e6ed 100644 --- a/images/nocode.svg +++ b/images/nocode.svg @@ -11,43 +11,6 @@ - - - - - - - + style="fill:#ffd000;fill-opacity:1;fill-rule:evenodd;stroke:#e0a000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="font-size:12px;font-weight:bold;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> + id="text13" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> ??? + x="6" + id="text20" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> ! - + - - - + + + + - - + X - - - - X + + + + - - - - - + + - ??? - - - ??? + + + - - - - + - ! - - + id="tspan2424" + style="font-size:24px">! + + diff --git a/images/nomedia.svg b/images/nomedia.svg index 6eb6bb2..b199b57 100644 --- a/images/nomedia.svg +++ b/images/nomedia.svg @@ -41,20 +41,20 @@ gradientTransform="matrix(0.7083638,0,0,1.0012565,346.13381,24.632067)" /> + style="fill:#ffd000;fill-opacity:1;fill-rule:evenodd;stroke:#e0a000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="font-size:12px;font-weight:bold;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> + id="text2445" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> ??? ! diff --git a/images/nostack.svg b/images/nostack.svg index 0ccd510..838d061 100644 --- a/images/nostack.svg +++ b/images/nostack.svg @@ -1,56 +1,76 @@ - + - - - + + + + - - + X - - - X + + + - ??? - - - ??? + + + - - - - + - ! - - - + id="tspan2488" + style="font-size:24px">! + + + diff --git a/images/status.svg b/images/status.svg index d4f1474..cb72835 100644 --- a/images/status.svg +++ b/images/status.svg @@ -1,47 +1,63 @@ - - - - + + + + - - + X - - - - X + + + + - - - - + - ! - - + id="tspan24" + style="font-size:24px">! + + diff --git a/images/syntaxerror.svg b/images/syntaxerror.svg index 792e725..0963986 100644 --- a/images/syntaxerror.svg +++ b/images/syntaxerror.svg @@ -32,20 +32,20 @@ + style="fill:#ffd000;fill-opacity:1;fill-rule:evenodd;stroke:#e0a000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="font-size:12px;font-weight:bold;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"> ??? ! diff --git a/tasetup.py b/tasetup.py index f7b10d7..7d13039 100644 --- a/tasetup.py +++ b/tasetup.py @@ -257,10 +257,10 @@ def setup_misc(tw): tw.status_shapes['syntaxerror'] = load_image(tw.path, '', 'syntaxerror') # for some reason, the status bar is displayed off screen on the XO if os.path.exists('/sys/power/olpc-pm'): - tw.status_spr = sprNew(tw,0,(tw.height-83), \ + tw.status_spr = sprNew(tw,0,(tw.height-183), \ tw.status_shapes['status'],True) else: - tw.status_spr = sprNew(tw,0,(tw.height-73), \ + tw.status_spr = sprNew(tw,0,(tw.height-173), \ tw.status_shapes['status'],True) tw.status_spr.type = 'status' setlayer(tw.status_spr,400) diff --git a/tawindow.py b/tawindow.py index da77f08..c3a49ed 100644 --- a/tawindow.py +++ b/tawindow.py @@ -54,7 +54,7 @@ def twNew(win, path, lang, tboxh, parent=None): tw.save_file_name = None win.set_flags(gtk.CAN_FOCUS) tw.width = gtk.gdk.screen_width() - tw.height = gtk.gdk.screen_height() - tboxh + tw.height = gtk.gdk.screen_height() # - tboxh win.set_size_request(tw.width, tw.height) if parent is None: win.show_all() else: parent.show_all() -- cgit v0.9.1