[gnome-maps/wip/mlundblad/replace-notifications] contextMenu: Use simple dialogs instead of notifications
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/replace-notifications] contextMenu: Use simple dialogs instead of notifications
- Date: Thu, 10 May 2018 08:45:49 +0000 (UTC)
commit 03d298e81c788170e77a3e20a61cf62b68c23ae1
Author: Marcus Lundblad <ml update uu se>
Date: Thu May 10 10:43:34 2018 +0200
contextMenu: Use simple dialogs instead of notifications
src/contextMenu.js | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 297f0f6..fadafea 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -126,7 +126,16 @@ var ContextMenu = GObject.registerClass({
this._mapView.showPlace(place, false);
} else {
let msg = _("Nothing found here!");
- Application.notificationManager.showMessage(msg);
+ let messageDialog =
+ new Gtk.MessageDialog({ transient_for: this._mainWindow,
+ destroy_with_parent: true,
+ message_type: Gtk.MessageType.INFO,
+ buttons: Gtk.ButtonsType.OK,
+ modal: true,
+ text: msg });
+
+ messageDialog.run();
+ messageDialog.destroy();
}
});
}
@@ -181,8 +190,16 @@ var ContextMenu = GObject.registerClass({
dialog.connect('response', (dialog, response) => {
dialog.destroy();
if (response === OSMEditDialog.Response.UPLOADED) {
- Application.notificationManager.showMessage(
- _("Location was added to the map, note that it may take a while before it shows on the
map and in search results."));
+ let messageDialog =
+ new Gtk.MessageDialog({ transient_for: this._mainWindow,
+ destroy_with_parent: true,
+ message_type: Gtk.MessageType.INFO,
+ buttons: Gtk.ButtonsType.OK,
+ modal: true,
+ text: _("Location was added to the map, note that it may take a
while before it shows on the map and in search results.") });
+
+ messageDialog.run();
+ messageDialog.destroy();
}
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]