Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-04-30 17:46:54 (GMT)
committer Dan Williams <dcbw@redhat.com>2007-04-30 17:46:54 (GMT)
commitdc2cae382ca21dbad9df21e1ac28353c86a9287a (patch)
tree077b7ae23e9c613bec6668fb0010f4f090556234
parentfda6690e7c8b2f15fd71020e14c6b499cc52dba4 (diff)
parente78c9d21a9070a4bcfd5f3ab7fcabc4542808e75 (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
-rw-r--r--sugar/activity/activity.py25
-rw-r--r--sugar/graphics/Makefile.am2
-rw-r--r--sugar/graphics/panel.py23
-rw-r--r--sugar/graphics/toggletoolbutton.py28
-rw-r--r--sugar/graphics/toolbox.py1
5 files changed, 79 insertions, 0 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index fa5b888..a859810 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -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)
diff --git a/sugar/graphics/Makefile.am b/sugar/graphics/Makefile.am
index 6756aa9..eb4b379 100644
--- a/sugar/graphics/Makefile.am
+++ b/sugar/graphics/Makefile.am
@@ -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 \
diff --git a/sugar/graphics/panel.py b/sugar/graphics/panel.py
new file mode 100644
index 0000000..bf3ed24
--- /dev/null
+++ b/sugar/graphics/panel.py
@@ -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)
diff --git a/sugar/graphics/toggletoolbutton.py b/sugar/graphics/toggletoolbutton.py
new file mode 100644
index 0000000..09ec0ef
--- /dev/null
+++ b/sugar/graphics/toggletoolbutton.py
@@ -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()
diff --git a/sugar/graphics/toolbox.py b/sugar/graphics/toolbox.py
index 441d157..6dd805f 100644
--- a/sugar/graphics/toolbox.py
+++ b/sugar/graphics/toolbox.py
@@ -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)