[gnome-dvb-daemon] gnomedvb: Remove userdirs module and use GLib via introspection instead
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dvb-daemon] gnomedvb: Remove userdirs module and use GLib via introspection instead
- Date: Fri, 9 Dec 2011 11:35:01 +0000 (UTC)
commit cddefaa1f649a51a1807a32c55f9b9390941474b
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date: Fri Dec 9 11:12:02 2011 +0100
gnomedvb: Remove userdirs module and use GLib via introspection instead
client/gnomedvb/Makefile.am | 12 -----
client/gnomedvb/__init__.py | 7 +--
client/gnomedvb/userdirs/__init__.py | 2 -
client/gnomedvb/userdirs/__userdirsmodule.c | 72 ---------------------------
4 files changed, 3 insertions(+), 90 deletions(-)
---
diff --git a/client/gnomedvb/Makefile.am b/client/gnomedvb/Makefile.am
index 1e03004..4286f9f 100644
--- a/client/gnomedvb/Makefile.am
+++ b/client/gnomedvb/Makefile.am
@@ -8,18 +8,6 @@ gnomedvb_PYTHON = \
DVBModel.py \
defs.py
-## user dirs ##
-__userdirsdir = $(pythondir)/gnomedvb/userdirs
-__userdirs_LTLIBRARIES = __userdirs.la
-__userdirs_la_LDFLAGS = -module -avoid-version -export-symbols-regex init__userdirs
-__userdirs_la_LIBADD = $(GLIB_LIBS)
-__userdirs_la_CPPFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
-__userdirs_la_SOURCES = \
- userdirs/__userdirsmodule.c
-
-__userdirs_PYTHON = \
- userdirs/__init__.py
-
## ui ##
gnomedvbuidir = $(pythondir)/gnomedvb/ui
gnomedvbui_PYTHON = \
diff --git a/client/gnomedvb/__init__.py b/client/gnomedvb/__init__.py
index 0e29e15..bb41f2c 100644
--- a/client/gnomedvb/__init__.py
+++ b/client/gnomedvb/__init__.py
@@ -19,8 +19,8 @@
from gnomedvb.DBusWrapper import *
import gnomedvb.defs
-import gnomedvb.userdirs
import gettext
+from gi.repository import GLib
from gi.repository import Gtk
import os
from os.path import abspath, join, expanduser
@@ -46,12 +46,11 @@ def get_config_dir():
return join(XDG_CONFIG_HOME, gnomedvb.defs.PACKAGE)
def get_default_recordings_dir():
- videos = gnomedvb.userdirs.get_xdg_user_dir(
- gnomedvb.userdirs.DIRECTORY_VIDEOS)
+ videos = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_VIDEOS)
if videos == None:
videos = join(expanduser('~'), 'Videos')
return join(videos, 'Recordings')
-
+
def seconds_to_time_duration_string(duration):
hours = duration / 3600
minutes = (duration / 60) % 60
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]