Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
b8186352
Commit
b8186352
authored
12 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
use gobject introspection to access gconf
parent
ad2f2ead
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/command_system/tools.py
+6
-7
6 additions, 7 deletions
src/command_system/tools.py
src/gtkgui_helpers.py
+4
-5
4 additions, 5 deletions
src/gtkgui_helpers.py
with
10 additions
and
12 deletions
src/command_system/tools.py
+
6
−
7
View file @
b8186352
...
...
@@ -25,7 +25,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from
types
import
*
#from glib import GError
def
remove
(
sequence
,
target
):
if
isinstance
(
sequence
,
ListType
):
...
...
@@ -36,9 +35,9 @@ def remove(sequence, target):
del
sequence
[
target
]
def
gconf
(
path
):
# try:
# from gconf import client_get_default
# client = client_get_default()
# return client.get_string(path)
# except ImportError, GError:
pass
\ No newline at end of file
try
:
from
gi.repository
import
GConf
client
=
GConf
.
Client
.
get_default
()
return
client
.
get_string
(
path
)
except
ImportError
:
pass
This diff is collapsed.
Click to expand it.
src/gtkgui_helpers.py
+
4
−
5
View file @
b8186352
...
...
@@ -31,7 +31,6 @@ import xml.sax.saxutils
from
gi.repository
import
Gtk
from
gi.repository
import
Gdk
from
gi.repository
import
GdkPixbuf
import
glib
from
gi.repository
import
GObject
from
gi.repository
import
Pango
import
os
...
...
@@ -175,11 +174,11 @@ def get_default_font():
Xfce and last KDE it returns None on failure or else a string
'
Font Size
'
"""
try
:
from
g
conf
import
client_get_default
client
=
c
lient
_
get_default
()
from
g
i.repository
import
GConf
client
=
GConf
.
C
lient
.
get_default
()
value
=
client
.
get_string
(
"
/desktop/gnome/interface/font_name
"
)
return
value
.
decode
(
"
utf8
"
)
except
ImportError
,
glib
.
GError
:
except
ImportError
:
pass
# try to get Xfce default font
...
...
@@ -833,7 +832,7 @@ def on_avatar_save_as_menuitem_activate(widget, jid, default_name=''):
# Save image
try
:
pixbuf
.
save
(
file_path
,
image_format
)
except
glib
.
GError
,
e
:
except
Exception
,
e
:
log
.
debug
(
'
Error saving avatar: %s
'
%
str
(
e
))
if
os
.
path
.
exists
(
file_path
):
os
.
remove
(
file_path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment