Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bronko
gajim
Commits
e726b1bb
Commit
e726b1bb
authored
Jan 01, 2020
by
Philipp Hörist
Browse files
PluginWindow: Remove log calls when entering a method
This clutters the logs and is rarely useful
parent
290efab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/plugins/gui.py
View file @
e726b1bb
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
from
gajim.common.helpers
import
open_uri
from
gajim.common.helpers
import
open_uri
from
gajim.common.nec
import
EventHelper
from
gajim.common.nec
import
EventHelper
from
gajim.plugins.helpers
import
log_calls
from
gajim.plugins.helpers
import
GajimPluginActivateException
from
gajim.plugins.helpers
import
GajimPluginActivateException
from
gajim.plugins.plugins_i18n
import
_
from
gajim.plugins.plugins_i18n
import
_
...
@@ -59,7 +58,6 @@ class Column(IntEnum):
...
@@ -59,7 +58,6 @@ class Column(IntEnum):
class
PluginsWindow
(
EventHelper
):
class
PluginsWindow
(
EventHelper
):
@
log_calls
(
'PluginsWindow'
)
def
__init__
(
self
):
def
__init__
(
self
):
EventHelper
.
__init__
(
self
)
EventHelper
.
__init__
(
self
)
...
@@ -139,7 +137,6 @@ def on_key_press_event(self, widget, event):
...
@@ -139,7 +137,6 @@ def on_key_press_event(self, widget, event):
if
event
.
keyval
==
Gdk
.
KEY_Escape
:
if
event
.
keyval
==
Gdk
.
KEY_Escape
:
self
.
window
.
destroy
()
self
.
window
.
destroy
()
@
log_calls
(
'PluginsWindow'
)
def
installed_plugins_treeview_selection_changed
(
self
,
treeview_selection
):
def
installed_plugins_treeview_selection_changed
(
self
,
treeview_selection
):
model
,
iter_
=
treeview_selection
.
get_selected
()
model
,
iter_
=
treeview_selection
.
get_selected
()
if
iter_
:
if
iter_
:
...
@@ -181,7 +178,6 @@ def _clear_installed_plugin_info(self):
...
@@ -181,7 +178,6 @@ def _clear_installed_plugin_info(self):
self
.
uninstall_plugin_button
.
set_property
(
'sensitive'
,
False
)
self
.
uninstall_plugin_button
.
set_property
(
'sensitive'
,
False
)
self
.
configure_plugin_button
.
set_property
(
'sensitive'
,
False
)
self
.
configure_plugin_button
.
set_property
(
'sensitive'
,
False
)
@
log_calls
(
'PluginsWindow'
)
def
fill_installed_plugins_model
(
self
):
def
fill_installed_plugins_model
(
self
):
pm
=
app
.
plugin_manager
pm
=
app
.
plugin_manager
self
.
installed_plugins_model
.
clear
()
self
.
installed_plugins_model
.
clear
()
...
@@ -200,7 +196,6 @@ def get_plugin_icon(self, plugin):
...
@@ -200,7 +196,6 @@ def get_plugin_icon(self, plugin):
icon
=
GdkPixbuf
.
Pixbuf
.
new_from_file_at_size
(
icon_file
,
16
,
16
)
icon
=
GdkPixbuf
.
Pixbuf
.
new_from_file_at_size
(
icon_file
,
16
,
16
)
return
icon
return
icon
@
log_calls
(
'PluginsWindow'
)
def
installed_plugins_toggled_cb
(
self
,
cell
,
path
):
def
installed_plugins_toggled_cb
(
self
,
cell
,
path
):
is_active
=
self
.
installed_plugins_model
[
path
][
Column
.
ACTIVE
]
is_active
=
self
.
installed_plugins_model
[
path
][
Column
.
ACTIVE
]
plugin
=
self
.
installed_plugins_model
[
path
][
Column
.
PLUGIN
]
plugin
=
self
.
installed_plugins_model
[
path
][
Column
.
PLUGIN
]
...
@@ -217,14 +212,12 @@ def installed_plugins_toggled_cb(self, cell, path):
...
@@ -217,14 +212,12 @@ def installed_plugins_toggled_cb(self, cell, path):
self
.
installed_plugins_model
[
path
][
Column
.
ACTIVE
]
=
not
is_active
self
.
installed_plugins_model
[
path
][
Column
.
ACTIVE
]
=
not
is_active
@
log_calls
(
'PluginsWindow'
)
def
on_plugins_window_destroy
(
self
,
widget
):
def
on_plugins_window_destroy
(
self
,
widget
):
'''Close window'''
'''Close window'''
self
.
unregister_events
()
self
.
unregister_events
()
app
.
plugin_manager
.
remove_gui_extension_point
(
'plugin_window'
,
self
)
app
.
plugin_manager
.
remove_gui_extension_point
(
'plugin_window'
,
self
)
del
app
.
interface
.
instances
[
'plugins'
]
del
app
.
interface
.
instances
[
'plugins'
]
@
log_calls
(
'PluginsWindow'
)
def
on_configure_plugin_button_clicked
(
self
,
widget
):
def
on_configure_plugin_button_clicked
(
self
,
widget
):
selection
=
self
.
installed_plugins_treeview
.
get_selection
()
selection
=
self
.
installed_plugins_treeview
.
get_selection
()
model
,
iter_
=
selection
.
get_selected
()
model
,
iter_
=
selection
.
get_selected
()
...
@@ -242,7 +235,6 @@ def on_configure_plugin_button_clicked(self, widget):
...
@@ -242,7 +235,6 @@ def on_configure_plugin_button_clicked(self, widget):
# XXX: maybe throw exception here?
# XXX: maybe throw exception here?
pass
pass
@
log_calls
(
'PluginsWindow'
)
def
on_uninstall_plugin_button_clicked
(
self
,
widget
):
def
on_uninstall_plugin_button_clicked
(
self
,
widget
):
selection
=
self
.
installed_plugins_treeview
.
get_selection
()
selection
=
self
.
installed_plugins_treeview
.
get_selection
()
model
,
iter_
=
selection
.
get_selected
()
model
,
iter_
=
selection
.
get_selected
()
...
@@ -269,7 +261,6 @@ def _on_plugin_added(self, event):
...
@@ -269,7 +261,6 @@ def _on_plugin_added(self, event):
event
.
plugin
.
activatable
,
event
.
plugin
.
activatable
,
icon
])
icon
])
@
log_calls
(
'PluginsWindow'
)
def
on_install_plugin_button_clicked
(
self
,
widget
):
def
on_install_plugin_button_clicked
(
self
,
widget
):
if
app
.
is_flatpak
():
if
app
.
is_flatpak
():
open_uri
(
'https://dev.gajim.org/gajim/gajim/wikis/help/flathub'
)
open_uri
(
'https://dev.gajim.org/gajim/gajim/wikis/help/flathub'
)
...
@@ -318,8 +309,6 @@ def _try_install(zip_filename):
...
@@ -318,8 +309,6 @@ def _try_install(zip_filename):
class
GajimPluginConfigDialog
(
Gtk
.
Dialog
):
class
GajimPluginConfigDialog
(
Gtk
.
Dialog
):
@
log_calls
(
'GajimPluginConfigDialog'
)
def
__init__
(
self
,
plugin
,
**
kwargs
):
def
__init__
(
self
,
plugin
,
**
kwargs
):
Gtk
.
Dialog
.
__init__
(
self
,
title
=
'%s %s'
%
(
plugin
.
name
,
Gtk
.
Dialog
.
__init__
(
self
,
title
=
'%s %s'
%
(
plugin
.
name
,
_
(
'Configuration'
)),
**
kwargs
)
_
(
'Configuration'
)),
**
kwargs
)
...
@@ -338,7 +327,6 @@ def on_close_dialog(self, widget, data):
...
@@ -338,7 +327,6 @@ def on_close_dialog(self, widget, data):
def
on_close_button_clicked
(
self
,
widget
):
def
on_close_button_clicked
(
self
,
widget
):
self
.
hide
()
self
.
hide
()
@
log_calls
(
'GajimPluginConfigDialog'
)
def
run
(
self
,
parent
=
None
):
def
run
(
self
,
parent
=
None
):
self
.
set_transient_for
(
parent
)
self
.
set_transient_for
(
parent
)
self
.
on_run
()
self
.
on_run
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment