mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
define some namespaces locally
This commit is contained in:
parent
91cd9cbae9
commit
c6f5de634d
1 changed files with 14 additions and 15 deletions
|
|
@ -3,10 +3,6 @@ use super::{
|
||||||
WidgetAction,
|
WidgetAction,
|
||||||
};
|
};
|
||||||
use crate::Profile;
|
use crate::Profile;
|
||||||
use adw::{
|
|
||||||
prelude::{AdwDialogExt, AlertDialogExt, AlertDialogExtManual},
|
|
||||||
AlertDialog, ResponseAppearance,
|
|
||||||
};
|
|
||||||
use gtk::{
|
use gtk::{
|
||||||
glib::Uri,
|
glib::Uri,
|
||||||
prelude::{ButtonExt, WidgetExt},
|
prelude::{ButtonExt, WidgetExt},
|
||||||
|
|
@ -14,17 +10,6 @@ use gtk::{
|
||||||
};
|
};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
// Defaults
|
|
||||||
|
|
||||||
const LABEL: &str = "Disconnect";
|
|
||||||
const TOOLTIP_TEXT: &str = "Stop use selected identity everywhere";
|
|
||||||
const MARGIN: i32 = 8;
|
|
||||||
|
|
||||||
const HEADING: &str = "Disconnect";
|
|
||||||
const BODY: &str = "Stop use selected identity for all scopes?";
|
|
||||||
const RESPONSE_CANCEL: (&str, &str) = ("cancel", "Cancel");
|
|
||||||
const RESPONSE_CONFIRM: (&str, &str) = ("confirm", "Confirm");
|
|
||||||
|
|
||||||
pub trait Exit {
|
pub trait Exit {
|
||||||
fn exit(
|
fn exit(
|
||||||
widget_action: &Rc<WidgetAction>,
|
widget_action: &Rc<WidgetAction>,
|
||||||
|
|
@ -44,6 +29,20 @@ impl Exit for Button {
|
||||||
list: &Rc<List>,
|
list: &Rc<List>,
|
||||||
request: &Uri,
|
request: &Uri,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
use adw::{
|
||||||
|
prelude::{AdwDialogExt, AlertDialogExt, AlertDialogExtManual},
|
||||||
|
AlertDialog, ResponseAppearance,
|
||||||
|
};
|
||||||
|
|
||||||
|
const LABEL: &str = "Disconnect";
|
||||||
|
const TOOLTIP_TEXT: &str = "Stop use selected identity everywhere";
|
||||||
|
const MARGIN: i32 = 8;
|
||||||
|
|
||||||
|
const HEADING: &str = "Disconnect";
|
||||||
|
const BODY: &str = "Stop use selected identity for all scopes?";
|
||||||
|
const RESPONSE_CANCEL: (&str, &str) = ("cancel", "Cancel");
|
||||||
|
const RESPONSE_CONFIRM: (&str, &str) = ("confirm", "Confirm");
|
||||||
|
|
||||||
// Init main widget
|
// Init main widget
|
||||||
let button = Button::builder()
|
let button = Button::builder()
|
||||||
.label(LABEL)
|
.label(LABEL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue