Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GooCalendar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tryton
GooCalendar
Commits
3b2b6d7c
Commit
3b2b6d7c
authored
12 years ago
by
twaneu
Browse files
Options
Downloads
Patches
Plain Diff
example.py: add of shorcut ctrl+l to change the current zoom
parent
df3cc1bc
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
GooCalendar/Calendar.py
+0
-1
0 additions, 1 deletion
GooCalendar/Calendar.py
examples/simple.py
+9
-1
9 additions, 1 deletion
examples/simple.py
with
9 additions
and
2 deletions
GooCalendar/Calendar.py
+
0
−
1
View file @
3b2b6d7c
...
...
@@ -617,7 +617,6 @@
self
.
select
(
date
-
datetime
.
timedelta
(
1
))
elif
event
.
keyval
==
gtk
.
gdk
.
keyval_from_name
(
'
Right
'
):
self
.
select
(
date
+
datetime
.
timedelta
(
1
))
return
True
def
on_day_item_button_press_event
(
self
,
day
,
widget2
,
event
):
self
.
emit
(
'
day-clicked
'
,
day
.
date
)
...
...
This diff is collapsed.
Click to expand it.
examples/simple.py
+
9
−
1
View file @
3b2b6d7c
...
...
@@ -10,7 +10,6 @@
def
on_event_clicked
(
calendar
,
event
,
event_store
):
print
"
Event %s was clicked
"
%
event
.
caption
def
on_day_selected
(
calendar
,
day
):
print
"
Day %s was selected
"
%
day
...
...
@@ -14,6 +13,14 @@
def
on_day_selected
(
calendar
,
day
):
print
"
Day %s was selected
"
%
day
def
on_key_pressed
(
widget
,
event
):
if
(
event
.
state
&
gtk
.
gdk
.
CONTROL_MASK
and
event
.
keyval
==
gtk
.
gdk
.
keyval_from_name
(
'
l
'
)):
if
widget
.
zoom
==
'
week
'
:
widget
.
set_zoom
(
'
month
'
)
else
:
widget
.
set_zoom
(
'
week
'
)
window
=
gtk
.
Window
()
event_store
=
GooCalendar
.
EventStore
()
calendar
=
GooCalendar
.
Calendar
(
event_store
)
...
...
@@ -72,4 +79,5 @@
window
.
connect
(
'
delete-event
'
,
gtk
.
main_quit
)
calendar
.
connect
(
'
event-clicked
'
,
on_event_clicked
,
event_store
)
calendar
.
connect
(
'
day-selected
'
,
on_day_selected
)
calendar
.
connect
(
'
key-press-event
'
,
on_key_pressed
)
gtk
.
main
()
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