[hamster-applet] as per vuntz, putting gconf schemas back so the defaults could be modified and preferences localized



commit 8a2762dcfb21c54788b61b31e811d58fa2c5779c
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Jan 27 16:34:11 2010 +0000

    as per vuntz, putting gconf schemas back so the defaults could be modified and preferences localized. fixes bug 608252

 data/Makefile.am               |   20 ++++++-
 data/hamster-applet.schemas.in |  119 ++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in                 |   21 ++++---
 3 files changed, 149 insertions(+), 11 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index f73158d..8b41ccb 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -17,6 +17,14 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
 # ******************************************************************************
+# GConf Schemas
+# ******************************************************************************
+# GConf Preference Schemas
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files = hamster-applet.schemas.in
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+# ******************************************************************************
 # Misc data
 # ******************************************************************************
 resourcesdir = $(pkgdatadir)
@@ -45,15 +53,25 @@ hamsterbindir = $(libdir)/hamster-applet
 # ******************************************************************************
 @INTLTOOL_DESKTOP_RULE@
 @INTLTOOL_SERVER_RULE@
+ INTLTOOL_SCHEMAS_RULE@
 
 $(server_in_files): $(server_in_files:.server.in=.server.in.in)
-	$(AM_V_GEN)sed -e "s|\ LIBEXECDIR\@|$(hamsterbindir)|" $< > $@
+	sed -e "s|\ LIBEXECDIR\@|$(hamsterbindir)|" $< > $@
+
+if GCONF_SCHEMAS_INSTALL
+install-data-local: install-schemas
+install-schemas:
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+		$(GCONFTOOL) --makefile-install-rule $(schema_DATA)
+endif
 
 DISTCLEANFILES = \
+	$(schema_DATA) \
 	$(server_DATA) \
 	$(server_in_files)
 
 EXTRA_DIST = \
+	$(schema_in_files) \
 	$(xml_in_files) \
 	Hamster_Applet.server.in.in \
 	hamster-standalone.desktop.in.in \
diff --git a/data/hamster-applet.schemas.in b/data/hamster-applet.schemas.in
new file mode 100644
index 0000000..9789036
--- /dev/null
+++ b/data/hamster-applet.schemas.in
@@ -0,0 +1,119 @@
+<gconfschemafile>
+    <schemalist>
+        <schema>
+            <key>/schemas/apps/hamster-applet/keybinding</key>
+            <applyto>/apps/hamster-applet/keybinding</applyto>
+            <owner>hamster-applet</owner>
+            <type>string</type>
+            <default>&lt;Super&gt;H</default>
+            <locale name="C">
+                <short>Show window</short>
+                <long>Keyboard shortcut for showing the Time Tracker window.</long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/enable_timeout</key>
+            <applyto>/apps/hamster-applet/enable_timeout</applyto>
+            <owner>hamster-applet</owner>
+            <type>bool</type>
+            <default>true</default>
+            <locale name="C">
+                <short>Stop tracking on idle</short>
+                <long>
+                    Stop tracking current activity when computer becomes idle
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/stop_on_shutdown</key>
+            <applyto>/apps/hamster-applet/stop_on_shutdown</applyto>
+            <owner>hamster-applet</owner>
+            <type>bool</type>
+            <default>false</default>
+            <locale name="C">
+                <short>Stop tracking on shutdown</short>
+                <long>
+                    Stop tracking current activity on shutdown
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/notify_interval</key>
+            <applyto>/apps/hamster-applet/notify_interval</applyto>
+            <owner>hamster-applet</owner>
+            <type>int</type>
+            <default>27</default>
+            <locale name="C">
+                <short>Remind of current task every x minutes</short>
+                <long>
+                    Remind of current task every specified amount of minutes.
+                    Set to 0 or greater than 120 to disable reminder.
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/notify_on_idle</key>
+            <applyto>/apps/hamster-applet/notify_on_idle</applyto>
+            <owner>hamster-applet</owner>
+            <type>bool</type>
+            <default>false</default>
+            <locale name="C">
+                <short>Also remind when no activity is set</short>
+                <long>
+                    Also remind every notify_interval minutes if no activity
+                    has been started.
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/day_start_minutes</key>
+            <applyto>/apps/hamster-applet/day_start_minutes</applyto>
+            <owner>hamster-applet</owner>
+            <type>int</type>
+            <default>330</default>
+            <locale name="C">
+                <short>At what time does the day start (defaults to 5:30AM)</short>
+                <long>
+                    Activities will be counted as to belong to yesterday if
+                    the current time is less than the specified day start and
+                    today, if it is over the time.
+                    Activities that span two days, will tip over to the side
+                    where the largest part of the activity is.
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/workspace_tracking</key>
+            <applyto>/apps/hamster-applet/workspace_tracking</applyto>
+            <owner>hamster-applet</owner>
+            <type>list</type>
+            <list_type>string</list_type>
+            <default>[]</default>
+            <locale name="C">
+                <short>Should workspace switch trigger acitivity switch</short>
+                <long>
+                    List of enabled tracking methods. "name" will enable
+                    switching activities by name defined in workspace_mapping.
+                    "memory" will enable switching to last activity when
+                    returning to a previous workspace.
+                </long>
+            </locale>
+        </schema>
+        <schema>
+            <key>/schemas/apps/hamster-applet/workspace_mapping</key>
+            <applyto>/apps/hamster-applet/workspace_mapping</applyto>
+            <owner>hamster-applet</owner>
+            <type>list</type>
+            <list_type>string</list_type>
+            <default>[]</default>
+            <locale name="C">
+                <short>Switch activity on workspace change</short>
+                <long>
+                    If switching by name is enabled, this list sets the activity
+                    names that should be switched to, workspaces represented by
+                    the index of item.
+                </long>
+            </locale>
+        </schema>
+    </schemalist>
+</gconfschemafile>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e952355..c2fa0df 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,25 +1,26 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
+data/hamster-applet.schemas.in
 data/Hamster_Applet.server.in.in
-data/hamster-standalone.desktop.in.in
 data/Hamster_Applet.xml
-[type: gettext/glade]data/preferences.ui
-[type: gettext/glade]data/edit_activity.ui
+data/hamster-standalone.desktop.in.in
 [type: gettext/glade]data/applet.ui
-[type: gettext/glade]data/stats.ui
-[type: gettext/glade]data/overview.ui
-[type: gettext/glade]data/overview_totals.ui
+[type: gettext/glade]data/edit_activity.ui
 [type: gettext/glade]data/hamster.ui
-src/hamster-standalone
+[type: gettext/glade]data/overview_totals.ui
+[type: gettext/glade]data/overview.ui
+[type: gettext/glade]data/preferences.ui
+[type: gettext/glade]data/stats.ui
 src/hamster/about.py
 src/hamster/applet.py
 src/hamster/db.py
 src/hamster/edit_activity.py
-src/hamster/preferences.py
-src/hamster/reports.py
-src/hamster/overview.py
 src/hamster/overview_activities.py
+src/hamster/overview.py
 src/hamster/overview_totals.py
+src/hamster/preferences.py
+src/hamster/reports.py
+src/hamster-standalone
 src/hamster/stats.py
 src/hamster/stuff.py
 src/hamster/widgets/reportchooserdialog.py



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]