Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
gajim
gajim-plugins
Commits
c62b6ae7
Commit
c62b6ae7
authored
13 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
roster_tweaks. coding style
parent
def15fa5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roster_tweaks/roster_tweaks.py
+15
-20
15 additions, 20 deletions
roster_tweaks/roster_tweaks.py
with
15 additions
and
20 deletions
roster_tweaks/roster_tweaks.py
+
15
−
20
View file @
c62b6ae7
...
...
@@ -28,16 +28,17 @@ class RosterTweaksPlugin(GajimPlugin):
'
use_ctr_m
'
:
(
False
,
''
),
'
menu_visible
'
:
(
True
,
''
),
'
quick_status
'
:
(
False
,
''
)}
self
.
roster
=
gajim
.
interface
.
roster
@log_calls
(
'
RosterTweaksPlugin
'
)
def
activate
(
self
):
self
.
pep_dict
=
{}
gajim
.
interface
.
roster
.
status_combobox
.
set_property
(
'
visible
'
,
not
self
.
config
[
'
hide_status_combo
'
])
gajim
.
interface
.
roster
.
status_combobox
.
set_no_show_all
(
True
)
self
.
roster
.
status_combobox
.
set_property
(
'
visible
'
,
not
self
.
config
[
'
hide_status_combo
'
])
self
.
roster
.
status_combobox
.
set_no_show_all
(
True
)
self
.
enable_ctrl_m
()
vbox
=
gajim
.
interface
.
roster
.
xml
.
get_object
(
'
roster_vbox2
'
)
vbox
=
self
.
roster
.
xml
.
get_object
(
'
roster_vbox2
'
)
self
.
GTK_BUILDER_FILE_PATH
=
self
.
local_file_path
(
'
config_dialog.ui
'
)
self
.
xml
=
gtk
.
Builder
()
...
...
@@ -60,26 +61,22 @@ class RosterTweaksPlugin(GajimPlugin):
def
enable_ctrl_m
(
self
):
if
self
.
config
[
'
use_ctr_m
'
]:
window
=
gajim
.
interface
.
roster
.
window
window
=
self
.
roster
.
window
self
.
accel_group
=
gtk
.
accel_groups_from_object
(
window
)[
0
]
self
.
accel_group
.
connect_group
(
gtk
.
keysyms
.
m
,
gtk
.
gdk
.
CONTROL_MASK
,
gtk
.
ACCEL_MASK
,
self
.
on_ctrl_m
)
menubar
=
gajim
.
interface
.
roster
.
xml
.
get_object
(
'
menubar
'
)
menubar
=
gajim
.
interface
.
roster
.
xml
.
get_object
(
'
menubar
'
)
if
self
.
config
[
'
menu_visible
'
]:
menubar
.
set_size_request
(
1
,
1
)
else
:
menubar
.
set_size_request
(
-
1
,
-
1
)
self
.
on_ctrl_m
(
None
,
None
,
None
,
None
)
@log_calls
(
'
RosterTweaksPlugin
'
)
def
deactivate
(
self
):
gajim
.
interface
.
roster
.
status_combobox
.
show
()
self
.
roster
.
status_combobox
.
show
()
self
.
status_widget
.
destroy
()
self
.
activity_button
.
destroy
()
self
.
mood_button
.
destroy
()
self
.
roster
.
xml
.
get_object
(
'
menubar
'
).
set_size_request
(
-
1
,
-
1
)
def
on_ctrl_m
(
self
,
accel_group
,
acceleratable
,
keyval
,
modifier
):
menubar
=
gajim
.
interface
.
roster
.
xml
.
get_object
(
'
menubar
'
)
menubar
=
self
.
roster
.
xml
.
get_object
(
'
menubar
'
)
if
not
self
.
config
[
'
menu_visible
'
]:
menubar
.
set_size_request
(
1
,
1
)
else
:
...
...
@@ -97,8 +94,7 @@ class RosterTweaksPlugin(GajimPlugin):
continue
current_show
=
gajim
.
SHOW_LIST
[
gajim
.
connections
[
account
].
connected
]
gajim
.
interface
.
roster
.
send_status
(
account
,
current_show
,
message
)
self
.
roster
.
send_status
(
account
,
current_show
,
message
)
self
.
font_desc
.
set_weight
(
pango
.
WEIGHT_BOLD
)
widget
.
modify_font
(
self
.
font_desc
)
self
.
font_desc
.
set_weight
(
pango
.
WEIGHT_NORMAL
)
...
...
@@ -128,7 +124,7 @@ class RosterTweaksPlugin(GajimPlugin):
accounts
=
gajim
.
connections
.
keys
()
for
account
in
accounts
:
if
gajim
.
account_is_connected
(
account
):
gajim
.
interface
.
roster
.
send_pep
(
account
,
self
.
pep_dict
)
self
.
roster
.
send_pep
(
account
,
self
.
pep_dict
)
def
draw_activity
(
self
):
"""
...
...
@@ -185,8 +181,8 @@ class RosterTweaksPluginConfigDialog(GajimPluginConfigDialog):
def
on_hide_combo_toggled
(
self
,
button
):
self
.
plugin
.
config
[
'
hide_status_combo
'
]
=
button
.
get_active
()
gajim
.
interface
.
roster
.
status_combobox
.
set_property
(
'
visible
'
,
not
self
.
plugin
.
config
[
'
hide_status_combo
'
])
self
.
roster
.
status_combobox
.
set_property
(
'
visible
'
,
not
\
self
.
plugin
.
config
[
'
hide_status_combo
'
])
def
on_quick_status_toggled
(
self
,
button
):
self
.
plugin
.
config
[
'
quick_status
'
]
=
button
.
get_active
()
...
...
@@ -203,5 +199,4 @@ class RosterTweaksPluginConfigDialog(GajimPluginConfigDialog):
self
.
plugin
.
accel_group
.
disconnect_key
(
gtk
.
keysyms
.
m
,
gtk
.
gdk
.
CONTROL_MASK
)
self
.
plugin
.
config
[
'
menu_visible
'
]
=
True
gajim
.
interface
.
roster
.
xml
.
get_object
(
'
menubar
'
).
set_size_request
(
-
1
,
-
1
)
self
.
roster
.
xml
.
get_object
(
'
menubar
'
).
set_size_request
(
-
1
,
-
1
)
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