File tree 5 files changed +24
-25
lines changed
5 files changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def open_about_window(_widget):
15
15
developer_name = "Angela Avery" ,
16
16
version = "1.2.3" ,
17
17
comments = _ (
18
- "Typeset is an app that doesn’t exist and is used as an example content for About Window." ,
18
+ "Typeset is an app that doesn’t exist and is used as an example content for About Window." ,
19
19
),
20
20
website = "https://example.org" ,
21
21
issue_url = "https://example.org" ,
@@ -24,21 +24,21 @@ def open_about_window(_widget):
24
24
license_type = Gtk .License .GPL_3_0_ONLY ,
25
25
developers = [
"Angela Avery <[email protected] >" ],
26
26
artists = ["GNOME Design Team" ],
27
- translator_credits = _ ("translator-credits" )
27
+ translator_credits = _ ("translator-credits" ),
28
28
)
29
29
30
30
dialog .add_link (
31
31
_ ("Documentation" ),
32
- "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.4/class.AboutWindow.html"
32
+ "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.4/class.AboutWindow.html" ,
33
33
)
34
34
35
35
dialog .add_legal_section (
36
36
_ ("Fonts" ),
37
37
None ,
38
38
Gtk .License .CUSTOM ,
39
39
_ (
40
- "This application uses font data from <a href='https://example.org'>somewhere</a>."
41
- )
40
+ "This application uses font data from <a href='https://example.org'>somewhere</a>."
41
+ ),
42
42
)
43
43
44
44
dialog .add_acknowledgement_section (_ ("Special thanks to" ), [_ ("My cat" )])
Original file line number Diff line number Diff line change 20
20
21
21
button .connect ("clicked" , lambda * _ : on_clicked ())
22
22
23
+
23
24
def on_selected (_dialog , result ):
24
25
file = _dialog .open_finish (result )
25
26
texture = Gdk .Texture .new_from_file (file )
26
27
avatar_image .set_custom_image (texture )
27
28
29
+
28
30
def on_clicked ():
29
31
file = dialog .open (workbench .window , None , on_selected )
Original file line number Diff line number Diff line change 18
18
def on_clicked (button ):
19
19
print (f"{ button .get_name ()} clicked" )
20
20
21
+
21
22
for id in button_ids :
22
23
button = workbench .builder .get_object (id )
23
24
button .connect ("clicked" , on_clicked )
Original file line number Diff line number Diff line change 5
5
# calendar.get_date() returns a GLib.DateTime object
6
6
# https://docs.gtk.org/glib/struct.DateTime.html
7
7
8
- calendar .connect ("notify::day" ,
9
- lambda * _ : print (calendar .get_date ().format ("%e" ))
10
- )
8
+ calendar .connect ("notify::day" , lambda * _ : print (calendar .get_date ().format ("%e" )))
11
9
12
- calendar .connect ("notify::month" ,
13
- lambda * _ :print (calendar .get_date ().format ("%B" ))
14
- )
10
+ calendar .connect ("notify::month" , lambda * _ : print (calendar .get_date ().format ("%B" )))
15
11
16
- calendar .connect ("notify::year" ,
17
- lambda * _ : print (calendar .get_date ().format ("%Y" ))
18
- )
12
+ calendar .connect ("notify::year" , lambda * _ : print (calendar .get_date ().format ("%Y" )))
19
13
20
- calendar .connect ("day-selected" ,
21
- lambda * _ : print (calendar .get_date ().format_iso8601 ())
22
- )
14
+ calendar .connect ("day-selected" , lambda * _ : print (calendar .get_date ().format_iso8601 ()))
23
15
24
16
calendar .mark_day (15 )
Original file line number Diff line number Diff line change 3
3
checkbox_1 = workbench .builder .get_object ("checkbox_1" )
4
4
checkbox_2 = workbench .builder .get_object ("checkbox_2" )
5
5
6
- checkbox_1 .connect ("toggled" , lambda * _ :
7
- print ("Notifications Enabled"
8
- if checkbox_1 .get_active ()
9
- else "Notifications Disabled" )
6
+ checkbox_1 .connect (
7
+ "toggled" ,
8
+ lambda * _ : print (
9
+ "Notifications Enabled" if checkbox_1 .get_active () else "Notifications Disabled"
10
+ ),
10
11
)
11
12
12
- checkbox_2 .connect ("toggled" , lambda * _ :
13
- print ("Changes will be auto-saved"
14
- if checkbox_2 .get_active ()
15
- else "Changes will not be auto-saved" )
13
+ checkbox_2 .connect (
14
+ "toggled" ,
15
+ lambda * _ : print (
16
+ "Changes will be auto-saved"
17
+ if checkbox_2 .get_active ()
18
+ else "Changes will not be auto-saved"
19
+ ),
16
20
)
You can’t perform that action at this time.
0 commit comments