Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions src/keypad_shuffle.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod keypad_shuffle;
pub mod lockscreen;
pub mod shell;
pub mod supervised_child;
Expand Down
25 changes: 1 addition & 24 deletions src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ impl Default for Shell {

mod imp {
use super::G_LOG_DOMAIN;
use crate::keypad_shuffle::ShuffleKeypadQuickSetting;
use crate::lockscreen::Lockscreen;
use crate::session_object::SessionObject;
use crate::sessions;
use glib::{clone, spawn_future_local, warn};
use gtk::gio::Settings;
use gtk::gio::{spawn_blocking, IOExtensionPoint, ListStore};
use gtk::glib::GString;
use gtk::gio::{spawn_blocking, ListStore};
use gtk::glib::{Properties, Type};
use gtk::prelude::StaticType;
use gtk::prelude::*;
Expand All @@ -40,7 +38,6 @@ mod imp {
use libphosh::subclass::shell::ShellImpl;
use std::cell::RefCell;
use std::cell::{Cell, OnceCell};
use std::collections::HashSet;
use std::process::Command;
use libphosh::prelude::ShellExt;

Expand All @@ -50,9 +47,6 @@ mod imp {
#[property(get, set)]
fake_greetd: Cell<bool>,

#[property(get, set)]
keypad_shuffle_qs: RefCell<Option<ShuffleKeypadQuickSetting>>,

#[property(get, set)]
pub sessions: RefCell<Option<ListStore>>,

Expand Down Expand Up @@ -89,25 +83,8 @@ mod imp {
// Slightly hacky, we want to be above phosh to override some stuff
gtk::STYLE_PROVIDER_PRIORITY_APPLICATION + 5,
);

self.provider.set(provider);

IOExtensionPoint::implement(
// TODO: export this constant from the bindings and use it here
"phosh-quick-setting-widget",
ShuffleKeypadQuickSetting::static_type(),
"keypad-shuffle",
10,
)
.expect("failed to implement plugin point");

let settings = Settings::new("sm.puri.phosh.plugins");
let mut qs: HashSet<GString> = HashSet::from_iter(settings.strv("quick-settings"));
qs.insert(GString::from("keypad-shuffle"));
settings
.set_strv("quick-settings", qs.iter().collect::<Vec<&GString>>())
.expect("failed to enable keypad-shuffle");

let settings = Settings::new(crate::APP_ID);

let shell = self.to_owned();
Expand Down
3 changes: 0 additions & 3 deletions tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ pub fn test_init(options: Option<TestOptions>) -> Test {
.unwrap();
}

let phosh_settings = Settings::new("sm.puri.phosh.lockscreen");
phosh_settings.set_boolean("shuffle-keypad", false).unwrap();

let if_settings = Settings::new("org.gnome.desktop.interface");
// use a more appropriate (moar froggy) accent color
if_settings.set_string("accent-color", "green").unwrap();
Expand Down
66 changes: 0 additions & 66 deletions tests/keypad_shuffle.rs

This file was deleted.