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
8e56bbf4
Commit
8e56bbf4
authored
12 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
load icons from ftp server
parent
e773f9d0
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
plugin_installer/manifest.ini
+1
-1
1 addition, 1 deletion
plugin_installer/manifest.ini
plugin_installer/plugin_installer.py
+13
-7
13 additions, 7 deletions
plugin_installer/plugin_installer.py
with
14 additions
and
8 deletions
plugin_installer/manifest.ini
+
1
−
1
View file @
8e56bbf4
[info]
name:
Plugin
Installer
short_name:
plugin_installer
version:
0.10.
1
version:
0.10.
2
description:
Install
and
upgrade
plugins
from
ftp
authors:
Denis
Fomin
<fominde@gmail.com>
Yann
Leboulanger
<asterix@lagaule.org>
...
...
This diff is collapsed.
Click to expand it.
plugin_installer/plugin_installer.py
+
13
−
7
View file @
8e56bbf4
...
...
@@ -463,11 +463,13 @@ class Ftp(threading.Thread):
if
not
self
.
remote_dirs
:
gobject
.
idle_add
(
self
.
progressbar
.
set_text
,
_
(
'
Scan files on the server
'
))
self
.
ftp
.
retrbinary
(
'
RETR manifests.zip
'
,
self
.
handleDownload
)
self
.
ftp
.
retrbinary
(
'
RETR manifests
_images
.zip
'
,
self
.
handleDownload
)
zip_file
=
zipfile
.
ZipFile
(
self
.
buffer_
)
manifest_list
=
zip_file
.
namelist
()
progress_step
=
1.0
/
len
(
manifest_list
)
for
filename
in
manifest_list
:
if
not
filename
.
endswith
(
'
manifest.ini
'
):
continue
dir_
=
filename
.
split
(
'
/
'
)[
0
]
fract
=
self
.
progressbar
.
get_fraction
()
+
progress_step
gobject
.
idle_add
(
self
.
progressbar
.
set_fraction
,
fract
)
...
...
@@ -487,15 +489,19 @@ class Ftp(threading.Thread):
gobject
.
idle_add
(
self
.
plugin
.
inslall_upgrade_button
.
set_property
,
'
sensitive
'
,
True
)
def_icon
=
self
.
def_icon
png_filename
=
dir_
+
'
/
'
+
dir_
+
'
.png
'
if
png_filename
in
manifest_list
:
data
=
zip_file
.
open
(
png_filename
).
read
()
pbl
=
gtk
.
gdk
.
PixbufLoader
()
pbl
.
set_size
(
16
,
16
)
pbl
.
write
(
data
)
pbl
.
close
()
def_icon
=
pbl
.
get_pixbuf
()
else
:
def_icon
=
self
.
def_icon
if
local_version
:
base_dir
,
user_dir
=
gajim
.
PLUGINS_DIRS
local_dir
=
os
.
path
.
join
(
user_dir
,
dir_
)
icon_name
=
dir_
+
'
.png
'
filename
=
os
.
path
.
join
(
local_dir
,
icon_name
)
if
os
.
path
.
isfile
(
filename
):
def_icon
=
gtk
.
gdk
.
pixbuf_new_from_file_at_size
(
filename
,
16
,
16
)
gobject
.
idle_add
(
self
.
model_append
,
[
def_icon
,
dir_
,
self
.
config
.
get
(
'
info
'
,
'
name
'
),
local_version
,
...
...
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