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
Weblate
gajim
Commits
75eb686f
Commit
75eb686f
authored
14 years ago
by
Alexander Cherniuk
Browse files
Options
Downloads
Patches
Plain Diff
Correct usage of GConf. There is still code needs to be fixed
parent
e78e4318
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
+5
-4
5 additions, 4 deletions
src/command_system/tools.py
src/gtkgui_helpers.py
+5
-7
5 additions, 7 deletions
src/gtkgui_helpers.py
with
10 additions
and
11 deletions
src/command_system/tools.py
+
5
−
4
View file @
75eb686f
...
...
@@ -25,6 +25,7 @@
# 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
):
...
...
@@ -37,7 +38,7 @@ def remove(sequence, target):
def
gconf
(
path
):
try
:
from
gconf
import
client_get_default
except
ImportError
:
return
client
=
client_get_default
()
return
client
.
get_string
(
path
)
\ No newline at end of file
client
=
client_get_default
()
return
client
.
get_string
(
path
)
except
ImportError
,
GError
:
pass
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/gtkgui_helpers.py
+
5
−
7
View file @
75eb686f
...
...
@@ -173,13 +173,11 @@ def get_default_font():
Xfce and last KDE it returns None on failure or else a string
'
Font Size
'
"""
try
:
import
gconf
# in try because daemon may not be there
client
=
gconf
.
client_get_default
()
return
client
.
get_string
(
'
/desktop/gnome/interface/font_name
'
).
decode
(
'
utf-8
'
)
except
Exception
:
from
gconf
import
client_get_default
client
=
client_get_default
()
value
=
client
.
get_string
(
"
/desktop/gnome/interface/font_name
"
)
return
value
.
decode
(
"
utf8
"
)
except
ImportError
,
glib
.
GError
:
pass
# try to get Xfce default font
...
...
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