Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to TelepathyGLib, collabwrapper, Gio.Settings #14

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GConf', '2.0')
gi.require_version('Vte', '2.91')
gi.require_version('Wnck', '3.0')

Expand Down
12 changes: 7 additions & 5 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from gi.repository import GdkPixbuf
from gi.repository import Gtk
from gi.repository import GLib
from gi.repository import GConf
from gi.repository import GObject

from sugar3 import env
Expand Down Expand Up @@ -555,8 +554,9 @@ def get_battery_level():


def get_sound_level():
client = GConf.Client.get_default()
return client.get_int('/desktop/sugar/sound/volume')
settings = Gio.Settings('org.sugarlabs.sound')
volume = settings.get_string('volume')
chimosky marked this conversation as resolved.
Show resolved Hide resolved
return volume


def is_clipboard_text_available():
Expand Down Expand Up @@ -982,8 +982,10 @@ def get_launch_count(activity):


def get_colors():
client = GConf.Client.get_default()
return XoColor(client.get_string('/desktop/sugar/user/color'))
settings = Gio.Settings('org.sugarlabs.user')
path = '/desktop/sugar/user/color'
chimosky marked this conversation as resolved.
Show resolved Hide resolved
color = settings.get_string('color')
return XoColor(color)


def get_nick():
Expand Down