Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-09-07 21:13:20 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-09-07 21:13:20 (GMT)
commit8f215ab6e5387f684b780a9e17e757e7f4d12fb6 (patch)
tree3449dfbc43e70abeeff3efeb7895c011d6cd7124
parent6812d6ffd1234d21269a5b483d0fe361737b7a45 (diff)
Version 6v6
-rw-r--r--activity/activity.info2
-rw-r--r--desktop/sweetener/stock.py5
-rwxr-xr-xgraph-plotter2
-rwxr-xr-xgraph-plotter.py8
-rw-r--r--info.py17
-rw-r--r--install26
-rw-r--r--sugar/sweetener/stock.py2
7 files changed, 48 insertions, 14 deletions
diff --git a/activity/activity.info b/activity/activity.info
index b7f34af..98ed9ec 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = Graph Plotter
-activity_version = 5
+activity_version = 6
show_launcher = 1
bundle_id = org.sugarlabs.GraphPlotter
exec = sugar-activity activity.Activity -s
diff --git a/desktop/sweetener/stock.py b/desktop/sweetener/stock.py
index 6947510..4f3b213 100644
--- a/desktop/sweetener/stock.py
+++ b/desktop/sweetener/stock.py
@@ -28,7 +28,7 @@ icon_factory = gtk.IconFactory()
def register(name, label, accelerator, icon_name):
if accelerator == None:
keyval = 0
- mask = gtk.gdk.ModifierType(0)
+ mask = 0
else:
keyval, mask = gtk.accelerator_parse(accelerator)
gtk.stock_add([(name, label, mask, keyval, '')])
@@ -60,8 +60,7 @@ overwrite_stock(gtk.STOCK_ZOOM_100, '<Ctrl>0')
# Key accelerator will be F11 on desktops and <Alt>return on Sugar.
overwrite_stock(gtk.STOCK_FULLSCREEN, 'F11')
overwrite_stock(gtk.STOCK_ADD, '<Ctrl>A')
-# Key accelerator will be Delete on desktops and <Ctrl>E on Sugar
-overwrite_stock(gtk.STOCK_REMOVE, 'Delete')
+overwrite_stock(gtk.STOCK_REMOVE, '<Shift>Delete')
overwrite_stock(gtk.STOCK_SELECT_COLOR, '<Ctrl>L')
diff --git a/graph-plotter b/graph-plotter
index 8c78ffe..4050b30 100755
--- a/graph-plotter
+++ b/graph-plotter
@@ -18,8 +18,6 @@
# MA 02110-1301, USA.
#
-# Don't modify this Script, it's auto-generated.
-
import sys
import os
self_path = os.path.abspath(__file__)
diff --git a/graph-plotter.py b/graph-plotter.py
index a7ee382..ad60b83 100755
--- a/graph-plotter.py
+++ b/graph-plotter.py
@@ -21,8 +21,6 @@
import os
import logging
logging.basicConfig(level=logging.DEBUG)
-from gettext import gettext as _
-
import glib
import info
logger = logging.getLogger(info.lower_name)
@@ -35,12 +33,14 @@ import gtk
from toolbars import Options
from canvas import Canvas
-this_dir = os.path.split(__file__)[:-1]
+this_dir = os.path.split('__file__')[:-1]
if len(this_dir) == 1 and this_dir[0] == '':
this_dir = os.path.abspath('./')
else:
this_dir = os.path.join(this_dir)
-logger.debug(this_dir)
+os.chdir(this_dir)
+
+from gettext import gettext as _
if 'programabspath' in os.environ['DATADIR']:
datadir = os.environ['DATADIR'].replace('programabspath',
diff --git a/info.py b/info.py
index 83ee636..bc25e32 100644
--- a/info.py
+++ b/info.py
@@ -18,7 +18,19 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
-from gettext import gettext as _
+service_name = 'org.sugarlabs.GraphPlotter'
+
+import os
+this_dir = os.path.abspath('./')
+
+import gettext
+# init gettext
+locale_path = os.path.join(this_dir, 'locale')
+gettext.bindtextdomain(service_name, locale_path)
+gettext.textdomain(service_name)
+_ = gettext.gettext
+
+
DOCUMENT = 0
CONFIG = 1
io_mode = DOCUMENT
@@ -26,9 +38,8 @@ io_mode = DOCUMENT
name = _('Graph Plotter')
generic_name = _('Mathematical Function Plotter')
lower_name = 'graph-plotter'
-service_name = 'org.sugarlabs.GraphPlotter'
copyright = 'Copyright © 2012 Daniel Francis'
-version = '5'
+version = '6'
description = _("Graph Plotter is an easy function plotter\
made for replace the expensive calculators.")
authors = ['Daniel Francis <francis@sugarlabs.org>']
diff --git a/install b/install
new file mode 100644
index 0000000..c4dc370
--- /dev/null
+++ b/install
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Daniel Francis <francis@sugarlabs.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+
+import os
+
+self_path = os.path.abspath(__file__)
+current_list_dir = os.path.split(self_path)[:-1][0]
+os.chdir(current_list_dir)
+os.system('make local') \ No newline at end of file
diff --git a/sugar/sweetener/stock.py b/sugar/sweetener/stock.py
index 85ec80a..fe45bd8 100644
--- a/sugar/sweetener/stock.py
+++ b/sugar/sweetener/stock.py
@@ -30,7 +30,7 @@ icons = {gtk.STOCK_ADD: 'list-add'}
def register(name, label, accelerator, icon_name):
if accelerator == None:
keyval = 0
- mask = gtk.gdk.ModifierType(0)
+ mask = 0
else:
keyval, mask = gtk.accelerator_parse(accelerator)
gtk.stock_add([(name, label, mask, keyval, '')])