Skip to content

Commit 9730d02

Browse files
authored
Replace show_all with present where appropriate (#48)
1 parent 76ab3e5 commit 9730d02

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/Application.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class BluetoothApp : Gtk.Application {
5757
bt_sender = new SenderDialog (this);
5858
bt_sender.add_files (files, device);
5959
bt_senders.append (bt_sender);
60-
bt_sender.show_all ();
60+
bt_sender.present ();
6161
bt_sender.destroy.connect (() => {
6262
bt_senders.foreach ((sender) => {
6363
if (sender.device == bt_sender.device) {
@@ -199,12 +199,12 @@ public class BluetoothApp : Gtk.Application {
199199
private void dialog_active (string session_path) {
200200
bt_receivers.foreach ((receiver) => {
201201
if (receiver.transfer.session == session_path) {
202-
receiver.show_all ();
202+
receiver.present ();
203203
}
204204
});
205205
bt_senders.foreach ((sender) => {
206206
if (sender.transfer.session == session_path) {
207-
sender.show_all ();
207+
sender.present ();
208208
}
209209
});
210210
}

src/Dialog/ReceiverDialog.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public class ReceiverDialog : Granite.Dialog {
101101
message_grid.attach (rate_label, 1, 3);
102102
message_grid.attach (progressbar, 1, 4);
103103
message_grid.attach (progress_label, 1, 5);
104+
message_grid.show_all ();
104105

105106
get_content_area ().add (message_grid);
106107

src/Dialog/ScanDialog.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class ScanDialog : Granite.Dialog {
112112
add_device (device);
113113
}
114114
manager.start_discovery.begin (() => {
115-
show_all ();
115+
present ();
116116
});
117117
}
118118

src/Dialog/SenderDialog.vala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public class SenderDialog : Granite.Dialog {
106106
message_grid.attach (rate_label, 1, 3);
107107
message_grid.attach (progressbar, 1, 4);
108108
message_grid.attach (progress_label, 1, 5);
109+
message_grid.show_all ();
109110

110111
get_content_area ().add (message_grid);
111112

@@ -268,7 +269,8 @@ public class SenderDialog : Granite.Dialog {
268269

269270
bt_retry.destroy ();
270271
});
271-
bt_retry.show_all ();
272+
bt_retry.present ();
273+
272274
progress_label.label = e.message.split ("org.bluez.obex.Error.Failed:")[1];
273275
GLib.warning (e.message);
274276
}
@@ -334,7 +336,8 @@ public class SenderDialog : Granite.Dialog {
334336

335337
bt_retry.destroy ();
336338
});
337-
bt_retry.show_all ();
339+
bt_retry.present ();
340+
338341
progressbar.fraction = 0.0;
339342
remove_session.begin ();
340343
break;

0 commit comments

Comments
 (0)