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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
TSRh
gajim
Commits
0a482f17
Commit
0a482f17
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
[FishFace] Now Gajim has comments support for advanced settings
parent
3d5901dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/advanced.py
+14
-0
14 additions, 0 deletions
src/advanced.py
src/common/config.py
+8
-1
8 additions, 1 deletion
src/common/config.py
src/gtkgui.glade
+1087
-0
1087 additions, 0 deletions
src/gtkgui.glade
with
1109 additions
and
1 deletion
src/advanced.py
+
14
−
0
View file @
0a482f17
...
@@ -41,6 +41,7 @@ def __init__(self, plugin):
...
@@ -41,6 +41,7 @@ def __init__(self, plugin):
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
advanced_configuration_window
'
,
None
)
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
advanced_configuration_window
'
,
None
)
self
.
window
=
self
.
xml
.
get_widget
(
'
advanced_configuration_window
'
)
self
.
window
=
self
.
xml
.
get_widget
(
'
advanced_configuration_window
'
)
self
.
entry
=
self
.
xml
.
get_widget
(
'
advanced_entry
'
)
self
.
entry
=
self
.
xml
.
get_widget
(
'
advanced_entry
'
)
self
.
desc_label
=
self
.
xml
.
get_widget
(
'
advanced_desc_label
'
)
treeview
=
self
.
xml
.
get_widget
(
'
advanced_treeview
'
)
treeview
=
self
.
xml
.
get_widget
(
'
advanced_treeview
'
)
self
.
model
=
gtk
.
TreeStore
(
str
,
str
,
str
)
self
.
model
=
gtk
.
TreeStore
(
str
,
str
,
str
)
...
@@ -73,6 +74,9 @@ def __init__(self, plugin):
...
@@ -73,6 +74,9 @@ def __init__(self, plugin):
treeview
.
set_model
(
self
.
modelfilter
)
treeview
.
set_model
(
self
.
modelfilter
)
# connect signal for selection change
treeview
.
get_selection
().
connect
(
'
changed
'
,
self
.
on_advanced_treeview_selection_changed
)
self
.
xml
.
signal_autoconnect
(
self
)
self
.
xml
.
signal_autoconnect
(
self
)
self
.
window
.
show_all
()
self
.
window
.
show_all
()
self
.
plugin
.
windows
[
'
advanced_config
'
]
=
self
self
.
plugin
.
windows
[
'
advanced_config
'
]
=
self
...
@@ -84,6 +88,16 @@ def cb_value_column_data(self, col, cell, model, iter):
...
@@ -84,6 +88,16 @@ def cb_value_column_data(self, col, cell, model, iter):
else
:
else
:
cell
.
set_property
(
'
editable
'
,
1
)
cell
.
set_property
(
'
editable
'
,
1
)
def
on_advanced_treeview_selection_changed
(
self
,
treeselection
):
iter
=
treeselection
.
get_selected
()
# Get text from first column in this row
opt
=
iter
[
0
][
iter
[
1
]][
0
]
desc
=
gajim
.
config
.
get_desc
(
opt
)
if
desc
:
self
.
desc_label
.
set_text
(
_
(
desc
))
else
:
self
.
desc_label
.
set_text
(
_
(
'
(None)
'
))
def
on_advanced_treeview_row_activated
(
self
,
treeview
,
path
,
column
):
def
on_advanced_treeview_row_activated
(
self
,
treeview
,
path
,
column
):
modelpath
=
self
.
modelfilter
.
convert_path_to_child_path
(
path
)
modelpath
=
self
.
modelfilter
.
convert_path_to_child_path
(
path
)
modelrow
=
self
.
model
[
modelpath
]
modelrow
=
self
.
model
[
modelpath
]
...
...
This diff is collapsed.
Click to expand it.
src/common/config.py
+
8
−
1
View file @
0a482f17
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
OPT_TYPE
=
0
OPT_TYPE
=
0
OPT_VAL
=
1
OPT_VAL
=
1
OPT_DESC
=
2
opt_int
=
[
'
integer
'
,
0
]
opt_int
=
[
'
integer
'
,
0
]
opt_str
=
[
'
string
'
,
0
]
opt_str
=
[
'
string
'
,
0
]
...
@@ -47,7 +48,7 @@ class Config:
...
@@ -47,7 +48,7 @@ class Config:
'
ignore_unknown_contacts
'
:
[
opt_bool
,
False
],
'
ignore_unknown_contacts
'
:
[
opt_bool
,
False
],
'
showoffline
'
:
[
opt_bool
,
False
],
'
showoffline
'
:
[
opt_bool
,
False
],
'
autoaway
'
:
[
opt_bool
,
True
],
'
autoaway
'
:
[
opt_bool
,
True
],
'
autoawaytime
'
:
[
opt_int
,
5
],
'
autoawaytime
'
:
[
opt_int
,
5
,
'
Time after which you are displayed as being away.
'
],
'
autoaway_message
'
:
[
opt_str
,
_
(
'
Away as a result of being idle
'
)
],
'
autoaway_message
'
:
[
opt_str
,
_
(
'
Away as a result of being idle
'
)
],
'
autoxa
'
:
[
opt_bool
,
True
],
'
autoxa
'
:
[
opt_bool
,
True
],
'
autoxatime
'
:
[
opt_int
,
15
],
'
autoxatime
'
:
[
opt_int
,
15
],
...
@@ -388,6 +389,12 @@ def get(self, optname = None):
...
@@ -388,6 +389,12 @@ def get(self, optname = None):
if
not
self
.
__options
.
has_key
(
optname
):
if
not
self
.
__options
.
has_key
(
optname
):
return
None
return
None
return
self
.
__options
[
optname
][
OPT_VAL
]
return
self
.
__options
[
optname
][
OPT_VAL
]
def
get_desc
(
self
,
optname
):
if
not
self
.
__options
.
has_key
(
optname
):
return
None
if
len
(
self
.
__options
[
optname
])
>
OPT_DESC
:
return
self
.
__options
[
optname
][
OPT_DESC
]
def
add_per
(
self
,
typename
,
name
):
# per_group_of_option
def
add_per
(
self
,
typename
,
name
):
# per_group_of_option
if
not
self
.
__options_per_key
.
has_key
(
typename
):
if
not
self
.
__options_per_key
.
has_key
(
typename
):
...
...
This diff is collapsed.
Click to expand it.
src/gtkgui.glade
+
1087
−
0
View file @
0a482f17
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