diff --git a/fractal-gtk/res/app.css b/fractal-gtk/res/app.css
index 10b77a6c..c79fef38 100644
--- a/fractal-gtk/res/app.css
+++ b/fractal-gtk/res/app.css
@@ -301,8 +301,3 @@ stack.titlebar:not(headerbar) > box > separator {
.small-font {
font-size: small;
}
-
-box.folded-history > hdycolumn > list {
- padding-left: 6px;
- padding-right: 6px;
-}
diff --git a/fractal-gtk/res/ui/main_window.ui b/fractal-gtk/res/ui/main_window.ui
index 9e820594..1332d019 100644
--- a/fractal-gtk/res/ui/main_window.ui
+++ b/fractal-gtk/res/ui/main_window.ui
@@ -2,7 +2,6 @@
-
diff --git a/fractal-gtk/src/app/appop_loop.rs b/fractal-gtk/src/app/appop_loop.rs
index 6d13cf1e..927dbf10 100644
--- a/fractal-gtk/src/app/appop_loop.rs
+++ b/fractal-gtk/src/app/appop_loop.rs
@@ -2,7 +2,6 @@ use app::App;
use appop::MsgPos;
use appop::AppState;
-use appop::LeafletState;
use std::thread;
use std::sync::mpsc::Receiver;
@@ -21,7 +20,6 @@ pub enum InternalCommand {
SetView(AppState),
NotifyClicked(Message),
SelectRoom(Room),
- ShowRoomList,
LoadMore,
LoadMoreNormal,
RemoveInv(String),
@@ -56,15 +54,11 @@ pub fn appop_loop(rx: Receiver) {
APPOP!(set_state, (view));
}
Ok(InternalCommand::NotifyClicked(msg)) => {
- let state = LeafletState::Content;
APPOP!(notification_cliked, (msg));
- APPOP!(set_leaflet_state, (state));
}
Ok(InternalCommand::SelectRoom(r)) => {
let id = r.id;
- let state = LeafletState::Content;
APPOP!(set_active_room_by_id, (id));
- APPOP!(set_leaflet_state, (state));
}
Ok(InternalCommand::LoadMore) => {
APPOP!(load_more_messages);
@@ -90,10 +84,6 @@ pub fn appop_loop(rx: Receiver) {
Ok(InternalCommand::PurchaseSticker(group)) => {
APPOP!(purchase_sticker, (group));
}
- Ok(InternalCommand::ShowRoomList) => {
- let state = LeafletState::Sidebar;
- APPOP!(set_leaflet_state, (state));
- }
Err(_) => {
break;
}
diff --git a/fractal-gtk/src/app/connect/headerbar.rs b/fractal-gtk/src/app/connect/headerbar.rs
index d387f4af..6f292be1 100644
--- a/fractal-gtk/src/app/connect/headerbar.rs
+++ b/fractal-gtk/src/app/connect/headerbar.rs
@@ -4,9 +4,6 @@ use gtk::prelude::*;
use appop::AppState;
use app::App;
-use app::InternalCommand;
-
-use std::sync::Arc;
impl App {
pub fn connect_headerbars(&self) {
@@ -17,17 +14,6 @@ impl App {
btn.connect_clicked(move |_| {
op.lock().unwrap().set_state(AppState::Chat);
});
- let back_btn = self.ui.builder
- .get_object::("room_header_back_button")
- .expect("Can't find room_header_back_button in ui file.");
-
- let weak_op = Arc::downgrade(&self.op);
- back_btn.connect_clicked(move |_| {
- weak_op.upgrade().map(|op| {
- op.lock().unwrap().internal.send(InternalCommand::ShowRoomList)
- .unwrap();
- });
- });
if let Some(set) = gtk::Settings::get_default() {
let left_header: gtk::HeaderBar = self.ui.builder
diff --git a/fractal-gtk/src/app/connect/leaflet.rs b/fractal-gtk/src/app/connect/leaflet.rs
deleted file mode 100644
index b52446f3..00000000
--- a/fractal-gtk/src/app/connect/leaflet.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-use gtk::{self, prelude::*};
-use libhandy::*;
-
-use app::App;
-
-impl App {
- pub fn connect_leaflet(&self) {
- let container = self.ui.builder
- .get_object::("message_column")
- .expect("Can't find message_column in ui file.");
- let chat_state_leaflet: libhandy::Leaflet = self.ui.builder
- .get_object("chat_state")
- .expect("Can't find chat_state in ui file.");
-
- let weak_container = container.downgrade();
- chat_state_leaflet.connect_property_fold_notify(move |leaflet| {
- weak_container.upgrade().map(|container| {
- match leaflet.get_fold() {
- Fold::Folded => container.get_style_context().unwrap().add_class("folded-history"),
- Fold::Unfolded => container.get_style_context().unwrap().remove_class("folded-history"),
- _ => ()
- }
- });
- });
- }
-}
diff --git a/fractal-gtk/src/app/connect/mod.rs b/fractal-gtk/src/app/connect/mod.rs
index 7452e4bb..540bf8e9 100644
--- a/fractal-gtk/src/app/connect/mod.rs
+++ b/fractal-gtk/src/app/connect/mod.rs
@@ -10,7 +10,6 @@ mod directory;
mod headerbar;
mod invite;
mod join_room;
-mod leaflet;
mod leave_room;
mod login;
mod markdown;
@@ -62,8 +61,6 @@ impl App {
self.connect_headerbars();
self.connect_login_view();
- self.connect_leaflet();
-
self.connect_send();
self.connect_attach();
self.connect_markdown();
diff --git a/fractal-gtk/src/app/mod.rs b/fractal-gtk/src/app/mod.rs
index 633179d5..32fbd70a 100644
--- a/fractal-gtk/src/app/mod.rs
+++ b/fractal-gtk/src/app/mod.rs
@@ -65,8 +65,6 @@ impl App {
let gtk_app = gtk::Application::new(Some(&appid[..]), gio::ApplicationFlags::empty())
.expect("Failed to initialize GtkApplication");
- libhandy::Leaflet::get_type(&libhandy::Leaflet::new());
-
gtk_app.set_accels_for_action("app.quit", &["Q"]);
let path = "/org/gnome/Fractal".to_string();
diff --git a/fractal-gtk/src/appop/leaflet.rs b/fractal-gtk/src/appop/leaflet.rs
deleted file mode 100644
index d19ae26b..00000000
--- a/fractal-gtk/src/appop/leaflet.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-use libhandy::*;
-
-use appop::AppOp;
-use appop::RoomPanel;
-
-#[derive(Clone, Debug)]
-pub enum LeafletState {
- Content,
- Sidebar
-}
-
-impl AppOp {
- pub fn set_leaflet_state(&mut self, state: LeafletState) {
- match state {
- LeafletState::Content => {
- self.header_leaflet.set_visible_child_name("room_header_bar");
- self.chat_state.set_visible_child_name("inapp");
- },
- LeafletState::Sidebar => {
- self.room_panel(RoomPanel::NoRoom);
- self.active_room = None;
- self.header_leaflet.set_visible_child_name("left-header");
- self.chat_state.set_visible_child_name("sidebar-box");
- }
- }
- }
-}
diff --git a/fractal-gtk/src/appop/mod.rs b/fractal-gtk/src/appop/mod.rs
index 8d9be479..099a0204 100644
--- a/fractal-gtk/src/appop/mod.rs
+++ b/fractal-gtk/src/appop/mod.rs
@@ -5,8 +5,6 @@ use gio::ApplicationExt;
use gtk;
use gtk::prelude::*;
-use libhandy;
-
use globals;
use backend::BKCommand;
use backend;
@@ -44,7 +42,6 @@ mod invite;
mod about;
mod start_chat;
mod stickers;
-mod leaflet;
pub use self::state::AppState;
use self::message::TmpMsg;
@@ -52,7 +49,6 @@ pub use self::message::MsgPos;
pub use self::message::LastViewed;
pub use self::room::RoomPanel;
use self::member::SearchType;
-pub use self::leaflet::LeafletState;
pub struct AppOp {
pub ui: uibuilder::UI,
@@ -81,8 +77,6 @@ pub struct AppOp {
pub roomlist: widgets::RoomList,
pub message_box: gtk::ListBox,
pub unsent_messages: HashMap,
- pub header_leaflet: libhandy::Leaflet,
- pub chat_state: libhandy::Leaflet,
pub inhibit_escape: bool,
@@ -111,11 +105,6 @@ impl AppOp {
ui: uibuilder::UI,
tx: Sender,
itx: Sender) -> AppOp {
- let header_leaflet = ui.builder.get_object("header_leaflet")
- .expect("could not find header_leaflet in .ui file");
- let chat_state = ui.builder.get_object("chat_state")
- .expect("could not find chat_state in .ui file");
-
AppOp {
ui: ui,
gtk_app: app,
@@ -143,8 +132,6 @@ impl AppOp {
since: None,
member_limit: 50,
unsent_messages: HashMap::new(),
- header_leaflet,
- chat_state,
inhibit_escape: false,
diff --git a/fractal-gtk/src/appop/state.rs b/fractal-gtk/src/appop/state.rs
index ff022cc5..28b29b4e 100644
--- a/fractal-gtk/src/appop/state.rs
+++ b/fractal-gtk/src/appop/state.rs
@@ -3,7 +3,6 @@ use gtk::prelude::*;
use appop::AppOp;
use appop::room::RoomPanel;
-use appop::LeafletState;
#[derive(Debug, Clone, PartialEq)]
@@ -90,8 +89,6 @@ impl AppOp {
self.room_panel(RoomPanel::NoRoom);
self.active_room = None;
self.clear_tmp_msgs();
- self.set_leaflet_state(LeafletState::Sidebar);
-
true
},
_ => { false }