File tree Expand file tree Collapse file tree 27 files changed +81
-103
lines changed
confetti_snapshot_animation Expand file tree Collapse file tree 27 files changed +81
-103
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ use gtk::glib;
2
2
use gtk:: prelude:: * ;
3
3
4
4
fn main ( ) -> glib:: ExitCode {
5
- let application =
6
- gtk:: Application :: new ( Some ( "com.github.gtk-rs.examples.basic" ) , Default :: default ( ) ) ;
5
+ let application = gtk:: Application :: builder ( )
6
+ . application_id ( "com.github.gtk-rs.examples.basic" )
7
+ . build ( ) ;
7
8
application. connect_activate ( build_ui) ;
8
9
application. run ( )
9
10
}
Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ use gtk::prelude::*;
3
3
use gtk:: { gdk, gio, glib} ;
4
4
5
5
fn main ( ) -> glib:: ExitCode {
6
- let application = gtk:: Application :: new (
7
- Some ( "com.github.gtk-rs.examples.clipboard" ) ,
8
- Default :: default ( ) ,
9
- ) ;
6
+ let application = gtk:: Application :: builder ( )
7
+ . application_id ( "com.github.gtk-rs.examples.clipboard" )
8
+ . build ( ) ;
10
9
application. connect_activate ( build_ui) ;
11
10
application. run ( )
12
11
}
Original file line number Diff line number Diff line change @@ -14,10 +14,9 @@ struct Row {
14
14
use std:: cell:: Ref ;
15
15
16
16
fn main ( ) -> glib:: ExitCode {
17
- let app = gtk:: Application :: new (
18
- Some ( "com.github.gtk-rs.examples.columnview-example" ) ,
19
- Default :: default ( ) ,
20
- ) ;
17
+ let app = gtk:: Application :: builder ( )
18
+ . application_id ( "com.github.gtk-rs.examples.columnview-example" )
19
+ . build ( ) ;
21
20
app. connect_activate ( build_ui) ;
22
21
app. run ( )
23
22
}
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ use gtk::glib;
6
6
use gtk:: prelude:: * ;
7
7
8
8
fn main ( ) -> glib:: ExitCode {
9
- let application = gtk:: Application :: new (
10
- Some ( "com.github.gtk-rs.examples.composite_template" ) ,
11
- Default :: default ( ) ,
12
- ) ;
9
+ let application = gtk:: Application :: builder ( )
10
+ . application_id ( "com.github.gtk-rs.examples.composite_template" )
11
+ . build ( ) ;
13
12
14
13
application. connect_activate ( |app| {
15
14
let win = ExApplicationWindow :: new ( app) ;
Original file line number Diff line number Diff line change @@ -10,10 +10,9 @@ use gtk::prelude::*;
10
10
use gtk:: { glib, graphene} ;
11
11
12
12
fn main ( ) -> glib:: ExitCode {
13
- let application = gtk:: Application :: new (
14
- Some ( "com.github.gtk-rs.examples.confetti_snapshot_animation" ) ,
15
- Default :: default ( ) ,
16
- ) ;
13
+ let application = gtk:: Application :: builder ( )
14
+ . application_id ( "com.github.gtk-rs.examples.confetti_snapshot_animation" )
15
+ . build ( ) ;
17
16
application. connect_activate ( build_ui) ;
18
17
application. run ( )
19
18
}
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ use gtk::glib;
5
5
use gtk:: prelude:: * ;
6
6
7
7
fn main ( ) -> glib:: ExitCode {
8
- let app = gtk:: Application :: new ( Some ( "org.gtk.content-provider" ) , Default :: default ( ) ) ;
8
+ let app = gtk:: Application :: builder ( )
9
+ . application_id ( "org.gtk.content-provider" )
10
+ . build ( ) ;
9
11
app. connect_activate ( on_activate) ;
10
12
app. run ( )
11
13
}
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ use gtk::glib;
5
5
use gtk:: prelude:: * ;
6
6
7
7
fn main ( ) -> glib:: ExitCode {
8
- let application = gtk:: Application :: new (
9
- Some ( "com.github.gtk-rs.examples.buildable" ) ,
10
- Default :: default ( ) ,
11
- ) ;
8
+ let application = gtk:: Application :: builder ( )
9
+ . application_id ( "com.github.gtk-rs.examples.buildable" )
10
+ . build ( ) ;
12
11
13
12
application. connect_activate ( build_ui) ;
14
13
application. run ( )
Original file line number Diff line number Diff line change @@ -9,10 +9,9 @@ use gtk::subclass::prelude::*;
9
9
use gtk:: { gdk, glib} ;
10
10
11
11
fn main ( ) -> glib:: ExitCode {
12
- let application = gtk:: Application :: new (
13
- Some ( "com.github.gtk-rs.examples.editable" ) ,
14
- Default :: default ( ) ,
15
- ) ;
12
+ let application = gtk:: Application :: builder ( )
13
+ . application_id ( "com.github.gtk-rs.examples.editable" )
14
+ . build ( ) ;
16
15
17
16
application. connect_startup ( |_| {
18
17
let provider = gtk:: CssProvider :: new ( ) ;
Original file line number Diff line number Diff line change @@ -27,10 +27,9 @@ const COLORS: [&str; 16] = [
27
27
const TOTAL_COLORS : i32 = COLORS . len ( ) as i32 ;
28
28
29
29
fn main ( ) -> glib:: ExitCode {
30
- let application = gtk:: Application :: new (
31
- Some ( "com.github.gtk-rs.examples.custom_layout" ) ,
32
- Default :: default ( ) ,
33
- ) ;
30
+ let application = gtk:: Application :: builder ( )
31
+ . application_id ( "com.github.gtk-rs.examples.custom_layout" )
32
+ . build ( ) ;
34
33
35
34
application. connect_activate ( |app| {
36
35
let window = gtk:: ApplicationWindow :: builder ( )
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ use gtk::glib;
5
5
use gtk:: prelude:: * ;
6
6
7
7
fn main ( ) -> glib:: ExitCode {
8
- let application = gtk:: Application :: new (
9
- Some ( "com.github.gtk-rs.examples.orientable_subclass" ) ,
10
- Default :: default ( ) ,
11
- ) ;
8
+ let application = gtk:: Application :: builder ( )
9
+ . application_id ( "com.github.gtk-rs.examples.orientable_subclass" )
10
+ . build ( ) ;
12
11
application. connect_activate ( |app| {
13
12
let window = gtk:: ApplicationWindow :: new ( app) ;
14
13
let bx = gtk:: Box :: new ( gtk:: Orientation :: Vertical , 6 ) ;
You can’t perform that action at this time.
0 commit comments