Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
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
eta
gajim
Commits
f780a0fe
Commit
f780a0fe
authored
18 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
add a statusbar to profile window. Fixes #1840
parent
351e666f
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
data/glade/profile_window.glade
+14
-1
14 additions, 1 deletion
data/glade/profile_window.glade
src/profile_window.py
+26
-0
26 additions, 0 deletions
src/profile_window.py
with
40 additions
and
1 deletion
data/glade/profile_window.glade
+
14
−
1
View file @
f780a0fe
...
...
@@ -4,7 +4,6 @@
<glade-interface>
<widget
class=
"GtkWindow"
id=
"profile_window"
>
<property
name=
"border_width"
>
12
</property>
<property
name=
"title"
>
Personal Information
</property>
<property
name=
"type"
>
GTK_WINDOW_TOPLEVEL
</property>
<property
name=
"window_position"
>
GTK_WIN_POS_NONE
</property>
...
...
@@ -29,6 +28,7 @@
<child>
<widget
class=
"GtkNotebook"
id=
"information_notebook"
>
<property
name=
"border_width"
>
6
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"show_tabs"
>
True
</property>
<property
name=
"show_border"
>
True
</property>
...
...
@@ -1829,6 +1829,7 @@
<child>
<widget
class=
"GtkHBox"
id=
"hbox2"
>
<property
name=
"border_width"
>
6
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"homogeneous"
>
False
</property>
<property
name=
"spacing"
>
0
</property>
...
...
@@ -2017,6 +2018,18 @@
<property
name=
"fill"
>
True
</property>
</packing>
</child>
<child>
<widget
class=
"GtkStatusbar"
id=
"statusbar"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"has_resize_grip"
>
False
</property>
</widget>
<packing>
<property
name=
"padding"
>
0
</property>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
</packing>
</child>
</widget>
</child>
</widget>
...
...
This diff is collapsed.
Click to expand it.
src/profile_window.py
+
26
−
0
View file @
f780a0fe
...
...
@@ -61,12 +61,16 @@ class ProfileWindow:
self
.
xml
=
gtkgui_helpers
.
get_glade
(
'
profile_window.glade
'
)
self
.
window
=
self
.
xml
.
get_widget
(
'
profile_window
'
)
self
.
progressbar
=
self
.
xml
.
get_widget
(
'
progressbar
'
)
self
.
statusbar
=
self
.
xml
.
get_widget
(
'
statusbar
'
)
self
.
context_id
=
self
.
statusbar
.
get_context_id
(
'
profile
'
)
self
.
account
=
account
self
.
jid
=
gajim
.
get_jid_from_account
(
account
)
self
.
avatar_mime_type
=
None
self
.
avatar_encoded
=
None
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Retrieving profile...
'
))
self
.
update_progressbar_timeout_id
=
gobject
.
timeout_add
(
100
,
self
.
update_progressbar
)
...
...
@@ -211,6 +215,12 @@ class ProfileWindow:
else
:
self
.
set_value
(
i
+
'
_entry
'
,
vcard
[
i
])
if
self
.
update_progressbar_timeout_id
is
not
None
:
if
self
.
message_id
:
self
.
statusbar
.
remove
(
self
.
context_id
,
self
.
message_id
)
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Information received
'
))
gobject
.
timeout_add
(
3000
,
self
.
statusbar
.
remove
,
self
.
context_id
,
self
.
message_id
)
gobject
.
source_remove
(
self
.
update_progressbar_timeout_id
)
# redraw progressbar after avatar is set so that windows is already
# resized. Else progressbar is not correctly redrawn
...
...
@@ -289,16 +299,30 @@ class ProfileWindow:
nick
=
gajim
.
config
.
get_per
(
'
accounts
'
,
self
.
account
,
'
name
'
)
gajim
.
nicks
[
self
.
account
]
=
nick
gajim
.
connections
[
self
.
account
].
send_vcard
(
vcard
)
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Sending profile...
'
))
self
.
update_progressbar_timeout_id
=
gobject
.
timeout_add
(
100
,
self
.
update_progressbar
)
def
vcard_published
(
self
):
if
self
.
message_id
:
self
.
statusbar
.
remove
(
self
.
context_id
,
self
.
message_id
)
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Information published
'
))
gobject
.
timeout_add
(
3000
,
self
.
statusbar
.
remove
,
self
.
context_id
,
self
.
message_id
)
if
self
.
update_progressbar_timeout_id
is
not
None
:
gobject
.
source_remove
(
self
.
update_progressbar_timeout_id
)
self
.
progressbar
.
set_fraction
(
0
)
self
.
update_progressbar_timeout_id
=
None
def
vcard_not_published
(
self
):
if
self
.
message_id
:
self
.
statusbar
.
remove
(
self
.
context_id
,
self
.
message_id
)
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Information NOT published
'
))
gobject
.
timeout_add
(
3000
,
self
.
statusbar
.
remove
.
self
.
context_id
,
self
.
message_id
)
if
self
.
update_progressbar_timeout_id
is
not
None
:
gobject
.
source_remove
(
self
.
update_progressbar_timeout_id
)
self
.
progressbar
.
set_fraction
(
0
)
...
...
@@ -331,5 +355,7 @@ class ProfileWindow:
else
:
dialogs
.
ErrorDialog
(
_
(
'
You are not connected to the server
'
),
_
(
'
Without a connection, you can not get your contact information.
'
))
self
.
message_id
=
self
.
statusbar
.
push
(
self
.
context_id
,
_
(
'
Retrieving profile...
'
))
self
.
update_progressbar_timeout_id
=
gobject
.
timeout_add
(
100
,
self
.
update_progressbar
)
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