mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 11:24:24 +02:00
Add GTK Box import alias, change DBus strings to const
This commit is contained in:
parent
30613754ad
commit
00df5aa79e
2 changed files with 7 additions and 7 deletions
|
@ -12,9 +12,9 @@ use zbus::{
|
|||
|
||||
use crate::{register_fallible_client, spawn_blocking};
|
||||
|
||||
static DBUS_BUS: &str = "org.freedesktop.NetworkManager";
|
||||
static DBUS_PATH: &str = "/org/freedesktop/NetworkManager";
|
||||
static DBUS_INTERFACE: &str = "org.freedesktop.NetworkManager";
|
||||
const DBUS_BUS: &str = "org.freedesktop.NetworkManager";
|
||||
const DBUS_PATH: &str = "/org/freedesktop/NetworkManager";
|
||||
const DBUS_INTERFACE: &str = "org.freedesktop.NetworkManager";
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Client {
|
||||
|
|
|
@ -2,7 +2,7 @@ use color_eyre::Result;
|
|||
use futures_lite::StreamExt;
|
||||
use futures_signals::signal::SignalExt;
|
||||
use gtk::prelude::ContainerExt;
|
||||
use gtk::{Box, Image, Orientation};
|
||||
use gtk::{Box as GtkBox, Image, Orientation};
|
||||
use serde::Deserialize;
|
||||
use tokio::sync::mpsc::Receiver;
|
||||
|
||||
|
@ -26,7 +26,7 @@ const fn default_icon_size() -> i32 {
|
|||
24
|
||||
}
|
||||
|
||||
impl Module<Box> for NetworkManagerModule {
|
||||
impl Module<GtkBox> for NetworkManagerModule {
|
||||
type SendMessage = ClientState;
|
||||
type ReceiveMessage = ();
|
||||
|
||||
|
@ -53,8 +53,8 @@ impl Module<Box> for NetworkManagerModule {
|
|||
self,
|
||||
context: WidgetContext<ClientState, ()>,
|
||||
info: &ModuleInfo,
|
||||
) -> Result<ModuleParts<Box>> {
|
||||
let container = Box::new(Orientation::Horizontal, 0);
|
||||
) -> Result<ModuleParts<GtkBox>> {
|
||||
let container = GtkBox::new(Orientation::Horizontal, 0);
|
||||
let icon = Image::new();
|
||||
icon.add_class("icon");
|
||||
container.add(&icon);
|
||||
|
|
Loading…
Add table
Reference in a new issue