Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar

This commit is contained in:
Dan Williams 2007-04-30 13:46:54 -04:00
commit dc2cae382c
5 changed files with 79 additions and 0 deletions

View File

@ -64,6 +64,31 @@ class ActivityToolbar(gtk.Toolbar):
def _activity_shared_cb(self, activity):
self._share_button.set_sensitive(False)
class EditToolbar(gtk.Toolbar):
def __init__(self):
gtk.Toolbar.__init__(self)
self.undo = ToolButton('edit-undo')
self.insert(self.undo, -1)
self.undo.show()
self.redo = ToolButton('edit-redo')
self.insert(self.redo, -1)
self.redo.show()
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
separator.show()
self.copy = ToolButton('edit-copy')
self.insert(self.copy, -1)
self.copy.show()
self.paste = ToolButton('edit-paste')
self.insert(self.paste, -1)
self.paste.show()
class ActivityToolbox(Toolbox):
def __init__(self, activity):
Toolbox.__init__(self)

View File

@ -2,6 +2,7 @@ sugardir = $(pythondir)/sugar/graphics
sugar_PYTHON = \
__init__.py \
animator.py \
icon.py \
iconbutton.py \
canvasicon.py \
color.py \
@ -11,6 +12,7 @@ sugar_PYTHON = \
menu.py \
menushell.py \
roundbox.py \
panel.py \
popup.py \
popupcontext.py \
snowflakebox.py \

23
sugar/graphics/panel.py Normal file
View File

@ -0,0 +1,23 @@
# Copyright (C) 2007, Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import gtk
class Panel(gtk.VBox):
__gtype_name__ = 'SugarPanel'
def __init__(self):
gtk.VBox.__init__(self)

View File

@ -0,0 +1,28 @@
# Copyright (C) 2007, Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import gtk
from sugar.graphics.icon import Icon
class ToggleToolButton(gtk.ToggleToolButton):
def __init__(self, icon_resource=None):
gtk.ToggleToolButton.__init__(self)
icon = Icon(icon_resource)
self.set_icon_widget(icon)
icon.show()

View File

@ -26,6 +26,7 @@ class Toolbox(gtk.VBox):
gtk.VBox.__init__(self)
self._notebook = gtk.Notebook()
self._notebook.set_name('sugar-toolbox-notebook')
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
self._notebook.set_show_border(False)
self.pack_start(self._notebook)