From f558940574a0e0febc7b04b463bd61af71e6126e Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 13 Nov 2024 11:08:01 +0200 Subject: [PATCH] draft profile import feature --- src/app/browser/welcome/widget.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/browser/welcome/widget.rs b/src/app/browser/welcome/widget.rs index 572d1668..2e6ce00f 100644 --- a/src/app/browser/welcome/widget.rs +++ b/src/app/browser/welcome/widget.rs @@ -6,9 +6,10 @@ use gtk::prelude::GtkWindowExt; use std::cell::RefCell; const HEADING: &str = "Welcome!"; -const BODY: &str = "Select profile for browser data"; +const BODY: &str = "Select profile for personal data"; const RESPONSE_QUIT: (&str, &str) = ("quit", "Quit"); const RESPONSE_CREATE: (&str, &str) = ("create", "Create new profile"); +const RESPONSE_IMPORT: (&str, &str) = ("import", "Import.."); pub struct Widget { gobject: AlertDialog, @@ -30,7 +31,10 @@ impl Widget { .build(); // Set response variants - gobject.add_responses(&[RESPONSE_QUIT, RESPONSE_CREATE]); + gobject.add_responses(&[RESPONSE_QUIT, RESPONSE_CREATE, RESPONSE_IMPORT]); + + // Deactivate not implemented feature @TODO + gobject.set_response_enabled(RESPONSE_IMPORT.0, false); // Decorate default response preset gobject.set_response_appearance(RESPONSE_CREATE.0, ResponseAppearance::Suggested);