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
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
Evert Mouw
gajim-plugins
Commits
47a72996
Commit
47a72996
authored
11 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
PluginInstallerPlugin. xhtml in plugin description
parent
ecba3290
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
plugin_installer/plugin_installer.py
+19
-8
19 additions, 8 deletions
plugin_installer/plugin_installer.py
with
19 additions
and
8 deletions
plugin_installer/plugin_installer.py
+
19
−
8
View file @
47a72996
...
...
@@ -34,6 +34,7 @@ import zipfile
from
common
import
gajim
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
,
log
from
conversation_textview
import
ConversationTextview
from
dialogs
import
WarningDialog
,
HigDialog
,
YesNoDialog
from
plugins.gui
import
GajimPluginConfigDialog
...
...
@@ -185,7 +186,7 @@ class PluginInstaller(GajimPlugin):
widgets_to_extract
=
(
'
plugin_name_label1
'
,
'
available_treeview
'
,
'
progressbar
'
,
'
inslall_upgrade_button
'
,
'
plugin_authors_label1
'
,
'
plugin_authors_label1
'
,
'
plugin_homepage_linkbutton1
'
,
'
plugin_description_textview1
'
)
'
plugin_homepage_linkbutton1
'
)
for
widget_name
in
widgets_to_extract
:
setattr
(
self
,
widget_name
,
self
.
xml
.
get_object
(
widget_name
))
...
...
@@ -248,6 +249,11 @@ class PluginInstaller(GajimPlugin):
selection
.
set_mode
(
gtk
.
SELECTION_SINGLE
)
self
.
_clear_available_plugin_info
()
self
.
plugin_description_textview
=
ConversationTextview
(
None
)
sw
=
self
.
xml
.
get_object
(
'
scrolledwindow1
'
)
sw
.
add
(
self
.
plugin_description_textview
.
tv
)
self
.
xml
.
connect_signals
(
self
)
self
.
window
.
show_all
()
...
...
@@ -353,6 +359,11 @@ class PluginInstaller(GajimPlugin):
def
available_plugins_treeview_selection_changed
(
self
,
treeview_selection
):
model
,
iter
=
treeview_selection
.
get_selected
()
self
.
xml
.
get_object
(
'
scrolledwindow1
'
).
get_children
()[
0
].
destroy
()
self
.
plugin_description_textview
=
ConversationTextview
(
None
)
sw
=
self
.
xml
.
get_object
(
'
scrolledwindow1
'
)
sw
.
add
(
self
.
plugin_description_textview
.
tv
)
sw
.
show_all
()
if
iter
:
self
.
plugin_name_label1
.
set_text
(
model
.
get_value
(
iter
,
C_NAME
))
self
.
plugin_authors_label1
.
set_text
(
model
.
get_value
(
iter
,
C_AUTHORS
))
...
...
@@ -363,9 +374,13 @@ class PluginInstaller(GajimPlugin):
label
=
self
.
plugin_homepage_linkbutton1
.
get_children
()[
0
]
label
.
set_ellipsize
(
pango
.
ELLIPSIZE_END
)
self
.
plugin_homepage_linkbutton1
.
set_property
(
'
sensitive
'
,
True
)
desc_textbuffer
=
self
.
plugin_description_textview1
.
get_buffer
()
desc_textbuffer
.
set_text
(
_
(
model
.
get_value
(
iter
,
C_DESCRIPTION
)))
self
.
plugin_description_textview1
.
set_property
(
'
sensitive
'
,
True
)
desc
=
_
(
model
.
get_value
(
iter
,
C_DESCRIPTION
))
if
not
desc
.
startswith
(
'
<body
'
):
desc
=
'
<body xmlns=
\'
http://www.w3.org/1999/xhtml
\'
>
'
+
\
desc
+
'
</body>
'
self
.
plugin_description_textview
.
tv
.
display_html
(
desc
,
self
.
plugin_description_textview
)
self
.
plugin_description_textview
.
tv
.
set_property
(
'
sensitive
'
,
True
)
else
:
self
.
_clear_available_plugin_info
()
...
...
@@ -376,10 +391,6 @@ class PluginInstaller(GajimPlugin):
self
.
plugin_homepage_linkbutton1
.
set_label
(
''
)
self
.
plugin_homepage_linkbutton1
.
set_property
(
'
sensitive
'
,
False
)
desc_textbuffer
=
self
.
plugin_description_textview1
.
get_buffer
()
desc_textbuffer
.
set_text
(
''
)
self
.
plugin_description_textview1
.
set_property
(
'
sensitive
'
,
False
)
def
scan_dir_for_plugin
(
self
,
path
):
plugins_found
=
[]
conf
=
ConfigParser
.
ConfigParser
()
...
...
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