Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
dc2cae382c
@ -64,6 +64,31 @@ class ActivityToolbar(gtk.Toolbar):
|
|||||||
def _activity_shared_cb(self, activity):
|
def _activity_shared_cb(self, activity):
|
||||||
self._share_button.set_sensitive(False)
|
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):
|
class ActivityToolbox(Toolbox):
|
||||||
def __init__(self, activity):
|
def __init__(self, activity):
|
||||||
Toolbox.__init__(self)
|
Toolbox.__init__(self)
|
||||||
|
@ -2,6 +2,7 @@ sugardir = $(pythondir)/sugar/graphics
|
|||||||
sugar_PYTHON = \
|
sugar_PYTHON = \
|
||||||
__init__.py \
|
__init__.py \
|
||||||
animator.py \
|
animator.py \
|
||||||
|
icon.py \
|
||||||
iconbutton.py \
|
iconbutton.py \
|
||||||
canvasicon.py \
|
canvasicon.py \
|
||||||
color.py \
|
color.py \
|
||||||
@ -11,6 +12,7 @@ sugar_PYTHON = \
|
|||||||
menu.py \
|
menu.py \
|
||||||
menushell.py \
|
menushell.py \
|
||||||
roundbox.py \
|
roundbox.py \
|
||||||
|
panel.py \
|
||||||
popup.py \
|
popup.py \
|
||||||
popupcontext.py \
|
popupcontext.py \
|
||||||
snowflakebox.py \
|
snowflakebox.py \
|
||||||
|
23
sugar/graphics/panel.py
Normal file
23
sugar/graphics/panel.py
Normal 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)
|
28
sugar/graphics/toggletoolbutton.py
Normal file
28
sugar/graphics/toggletoolbutton.py
Normal 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()
|
@ -26,6 +26,7 @@ class Toolbox(gtk.VBox):
|
|||||||
gtk.VBox.__init__(self)
|
gtk.VBox.__init__(self)
|
||||||
|
|
||||||
self._notebook = gtk.Notebook()
|
self._notebook = gtk.Notebook()
|
||||||
|
self._notebook.set_name('sugar-toolbox-notebook')
|
||||||
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
|
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
|
||||||
self._notebook.set_show_border(False)
|
self._notebook.set_show_border(False)
|
||||||
self.pack_start(self._notebook)
|
self.pack_start(self._notebook)
|
||||||
|
Loading…
Reference in New Issue
Block a user