Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-07-10 04:07:10 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-07-10 04:07:10 (GMT)
commit2fc1cab92dc8b6dfe3345b4c0adb2bdd527294e0 (patch)
tree4b6feeefff7466832fa1eddbccde7b78a2da934d
parent71e6228ceba7a866d22be34607e14a1b4751fa47 (diff)
Add simple toolbars example
l---------examples/sugar1
-rw-r--r--examples/toolbar.py32
-rw-r--r--m4/.gitignore2
-rw-r--r--src/sugar/__init__.py14
l---------src/sugar/_sugarext.so1
5 files changed, 50 insertions, 0 deletions
diff --git a/examples/sugar b/examples/sugar
new file mode 120000
index 0000000..12f3164
--- /dev/null
+++ b/examples/sugar
@@ -0,0 +1 @@
+../src/sugar/ \ No newline at end of file
diff --git a/examples/toolbar.py b/examples/toolbar.py
new file mode 100644
index 0000000..e4d24df
--- /dev/null
+++ b/examples/toolbar.py
@@ -0,0 +1,32 @@
+import gtk
+from sugar.graphics.toolbar import Toolbar, ToolbarButton
+
+window = gtk.Window()
+
+box = gtk.VBox()
+window.add(box)
+
+toolbar = Toolbar()
+box.pack_start(toolbar, False)
+
+tollbarbutton_1 = ToolbarButton(toolbar, gtk.Button('1'),
+ icon_name='computer-xo',
+ tooltip='foo')
+toolbar.top.insert(tollbarbutton_1, -1)
+
+toolbar.top.insert(gtk.SeparatorToolItem(), -1)
+
+tollbarbutton_2 = ToolbarButton(toolbar, gtk.Button('1'),
+ icon_name='button_cancel',
+ tooltip='foo')
+toolbar.top.insert(tollbarbutton_2, -1)
+
+toolbar.top.insert(gtk.SeparatorToolItem(), -1)
+
+tollbarbutton_3 = ToolbarButton(toolbar, gtk.Button('3'),
+ icon_name='activity-journal',
+ tooltip='foo')
+toolbar.top.insert(tollbarbutton_3, -1)
+
+window.show_all()
+gtk.main()
diff --git a/m4/.gitignore b/m4/.gitignore
index 9f841b0..e08c7c8 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -1 +1,3 @@
intltool.m4
+libtool.m4
+lt*.m4
diff --git a/src/sugar/__init__.py b/src/sugar/__init__.py
new file mode 100644
index 0000000..44acb4d
--- /dev/null
+++ b/src/sugar/__init__.py
@@ -0,0 +1,14 @@
+# 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.
diff --git a/src/sugar/_sugarext.so b/src/sugar/_sugarext.so
new file mode 120000
index 0000000..c11ccc7
--- /dev/null
+++ b/src/sugar/_sugarext.so
@@ -0,0 +1 @@
+.libs/_sugarext.so \ No newline at end of file