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
Weblate
gajim
Commits
f8ab01b4
Commit
f8ab01b4
authored
14 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
check birthday date format when editing profile window. Fixes #5692
parent
ed28b14b
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/gui/profile_window.ui
+1
-0
1 addition, 0 deletions
data/gui/profile_window.ui
src/profile_window.py
+14
-0
14 additions, 0 deletions
src/profile_window.py
with
15 additions
and
0 deletions
data/gui/profile_window.ui
+
1
−
0
View file @
f8ab01b4
...
...
@@ -432,6 +432,7 @@
<object
class=
"GtkEntry"
id=
"BDAY_entry"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<signal
name=
"focus_out_event"
handler=
"on_BDAY_entry_focus_out_event"
/>
</object>
<packing>
<property
name=
"left_attach"
>
3
</property>
...
...
This diff is collapsed.
Click to expand it.
src/profile_window.py
+
14
−
0
View file @
f8ab01b4
...
...
@@ -203,6 +203,20 @@ class ProfileWindow:
elif
event
.
button
==
1
:
# left click
self
.
on_set_avatar_button_clicked
(
widget
)
def
on_BDAY_entry_focus_out_event
(
self
,
widget
,
event
):
txt
=
widget
.
get_text
()
if
not
txt
:
return
try
:
time
.
strptime
(
txt
,
'
%Y-%m-%d
'
)
except
ValueError
:
if
not
widget
.
is_focus
():
pritext
=
_
(
'
Wrong date format
'
)
dialogs
.
ErrorDialog
(
pritext
,
_
(
'
Format of the date must be
'
'
YYYY-MM-DD
'
))
gobject
.
idle_add
(
lambda
:
widget
.
grab_focus
())
return
True
def
set_value
(
self
,
entry_name
,
value
):
try
:
self
.
xml
.
get_object
(
entry_name
).
set_text
(
value
)
...
...
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