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
82d4453e
Commit
82d4453e
authored
13 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
juick. Update avatars who are older(days) variable.
updated ru.po
parent
5494da85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
juick/config_dialog.ui
+38
-0
38 additions, 0 deletions
juick/config_dialog.ui
juick/manifest.ini
+1
-1
1 addition, 1 deletion
juick/manifest.ini
juick/plugin.py
+16
-7
16 additions, 7 deletions
juick/plugin.py
plugins_translations/ru.mo
+0
-0
0 additions, 0 deletions
plugins_translations/ru.mo
with
55 additions
and
8 deletions
juick/config_dialog.ui
+
38
−
0
View file @
82d4453e
...
...
@@ -81,6 +81,44 @@
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkHBox"
id=
"hbox4"
>
<property
name=
"visible"
>
True
</property>
<child>
<object
class=
"GtkLabel"
id=
"avatars_old_lebel"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"xalign"
>
0.029999999329447746
</property>
<property
name=
"label"
translatable=
"yes"
>
Update avatars who are older(days)
</property>
<property
name=
"ellipsize"
>
start
</property>
<property
name=
"track_visited_links"
>
False
</property>
</object>
<packing>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkSpinButton"
id=
"avatars_old"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"width_chars"
>
6
</property>
<property
name=
"snap_to_ticks"
>
True
</property>
<property
name=
"numeric"
>
True
</property>
<signal
name=
"value_changed"
handler=
"on_avatars_old_value_changed"
/>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"position"
>
1
</property>
...
...
This diff is collapsed.
Click to expand it.
juick/manifest.ini
+
1
−
1
View file @
82d4453e
[info]
name:
Juick
short_name:
Juick
version:
0.
2
version:
0.
3
description:
Clickable
juick
links
,
juick
nics,
preview
juick
picturs.
The
key
combination
alt
+
up
in
the
textbox
allow
insert
the
number
of
last
message
(comment
or
topic).
authors:
Denis
Fomin
<fominde@gmail.com>,
evgen
<drujebober@gmail.com>
...
...
This diff is collapsed.
Click to expand it.
juick/plugin.py
+
16
−
7
View file @
82d4453e
...
...
@@ -33,6 +33,8 @@ class JuickPlugin(GajimPlugin):
self
.
disconnect_from_chat_control
)}
self
.
config_default_values
=
{
'
SHOW_AVATARS
'
:
(
False
,
''
),
'
AVATAR_SIZE
'
:
(
20
,
'
Avatar size(10-32)
'
),
'
avatars_old
'
:
(
2419200
,
'
Update avatars
'
'
who are older 28 days
'
),
'
SHOW_PREVIEW
'
:
(
False
,
''
),
'
PREVIEW_SIZE
'
:
(
150
,
'
Preview size(10-512)
'
),
'
LINK_COLOR
'
:
(
'
#B8833E
'
,
'
Juick link color
'
),
...
...
@@ -380,11 +382,12 @@ class Base(object):
pic_path
=
pic_path
.
decode
(
locale
.
getpreferredencoding
())
if
os
.
path
.
isfile
(
pic_path
):
pixbuf
=
gtk
.
gdk
.
pixbuf_new_from_file
(
pic_path
)
if
(
time
.
time
()
-
os
.
stat
(
pic_path
).
st_mtime
)
<
2419200
:
max_old
=
self
.
plugin
.
config
[
'
avatars_old
'
]
if
(
time
.
time
()
-
os
.
stat
(
pic_path
).
st_mtime
)
<
max_old
:
return
pixbuf
url
=
'
http://i.juick.com/as/%s.png
'
%
uid
pixbuf
=
self
.
get_pixbuf_from_url
(
url
,
self
.
plugin
.
config
[
'
AVATAR_SIZE
'
])
pixbuf
=
self
.
get_pixbuf_from_url
(
url
,
self
.
plugin
.
config
[
'
AVATAR_SIZE
'
])
if
pixbuf
:
# save to cache
pixbuf
.
save
(
pic_path
,
'
png
'
)
...
...
@@ -554,12 +557,14 @@ class JuickPluginConfigDialog(GajimPluginConfigDialog):
[
'
vbox1
'
])
self
.
checkbutton
=
self
.
xml
.
get_object
(
'
checkbutton
'
)
self
.
avatar_size_spinbutton
=
self
.
xml
.
get_object
(
'
avatar_size
'
)
self
.
avatar_size_spinbutton
.
get_adjustment
().
set_all
(
20
,
10
,
32
,
1
,
10
,
0
)
self
.
avatar_size_spinbutton
.
get_adjustment
().
set_all
(
20
,
10
,
32
,
1
,
10
,
0
)
self
.
avatars_old
=
self
.
xml
.
get_object
(
'
avatars_old
'
)
self
.
avatars_old
.
get_adjustment
().
set_all
(
20
,
1
,
3650
,
1
,
10
,
0
)
self
.
show_pic
=
self
.
xml
.
get_object
(
'
show_pic
'
)
self
.
preview_size_spinbutton
=
self
.
xml
.
get_object
(
'
preview_size
'
)
self
.
preview_size_spinbutton
.
get_adjustment
().
set_all
(
20
,
10
,
512
,
1
,
10
,
0
)
self
.
preview_size_spinbutton
.
get_adjustment
().
set_all
(
20
,
10
,
512
,
1
,
10
,
0
)
self
.
link_colorbutton
=
self
.
xml
.
get_object
(
'
link_colorbutton
'
)
vbox
=
self
.
xml
.
get_object
(
'
vbox1
'
)
self
.
child
.
pack_start
(
vbox
)
...
...
@@ -571,6 +576,7 @@ class JuickPluginConfigDialog(GajimPluginConfigDialog):
self
.
xml
.
get_object
(
'
only_author_avatar
'
).
set_active
(
self
.
plugin
.
config
[
'
ONLY_AUTHOR_AVATAR
'
])
self
.
avatar_size_spinbutton
.
set_value
(
self
.
plugin
.
config
[
'
AVATAR_SIZE
'
])
self
.
avatars_old
.
set_value
(
self
.
plugin
.
config
[
'
avatars_old
'
]
/
86400
)
self
.
show_pic
.
set_active
(
self
.
plugin
.
config
[
'
SHOW_PREVIEW
'
])
self
.
preview_size_spinbutton
.
set_value
(
self
.
plugin
.
config
[
'
PREVIEW_SIZE
'
])
...
...
@@ -595,6 +601,9 @@ class JuickPluginConfigDialog(GajimPluginConfigDialog):
def
avatar_size_value_changed
(
self
,
spinbutton
):
self
.
plugin
.
config
[
'
AVATAR_SIZE
'
]
=
spinbutton
.
get_value
()
def
on_avatars_old_value_changed
(
self
,
spinbutton
):
self
.
plugin
.
config
[
'
avatars_old
'
]
=
spinbutton
.
get_value
()
*
86400
def
on_show_pic_toggled
(
self
,
checkbutton
):
self
.
plugin
.
config
[
'
SHOW_PREVIEW
'
]
=
checkbutton
.
get_active
()
...
...
This diff is collapsed.
Click to expand it.
plugins_translations/ru.mo
+
0
−
0
View file @
82d4453e
No preview for this file type
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