summaryrefslogtreecommitdiff
path: root/src/nautilus-places-view.c
diff options
context:
space:
mode:
authorChristopher Davis <christopherdavis@gnome.org>2022-07-07 00:18:38 -0400
committerAntónio Fernandes <antoniof@gnome.org>2022-08-06 19:35:00 +0100
commit544caa0311b999eb412045488acd6b9bf5f6dc56 (patch)
treef597cf74087402dd8123ccc0088e5d7add9bef9c /src/nautilus-places-view.c
parenta80aacdf2c44fd9c28a292ee599b9e74418faa10 (diff)
downloadnautilus-544caa0311b999eb412045488acd6b9bf5f6dc56.tar.gz
places-view: Use AdwMessageDialog
Diffstat (limited to 'src/nautilus-places-view.c')
-rw-r--r--src/nautilus-places-view.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/nautilus-places-view.c b/src/nautilus-places-view.c
index 8b32ce686..de37d4fde 100644
--- a/src/nautilus-places-view.c
+++ b/src/nautilus-places-view.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <libadwaita-1/adwaita.h>
+
#include "nautilus-mime-actions.h"
#include "nautilus-places-view.h"
@@ -127,16 +129,11 @@ show_error_message_cb (NautilusGtkPlacesView *view,
window = gtk_widget_get_root (GTK_WIDGET (view));
- dialog = gtk_message_dialog_new (GTK_WINDOW (window),
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- "%s", primary);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- "%s", secondary);
+ dialog = adw_message_dialog_new (GTK_WINDOW (window), primary, secondary);
+ adw_message_dialog_add_response (ADW_MESSAGE_DIALOG (dialog),
+ "close", _("_Close"));
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
- gtk_widget_show (dialog);
+ gtk_window_present (GTK_WINDOW (dialog));
}
static void