Commit 9a0d36b7 authored by Julian Sparber's avatar Julian Sparber

split user menu in two menus and remove the title in the left headerbar

parent 98ab56e1
......@@ -228,12 +228,25 @@
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkModelButton" id="directory_menu">
<property name="visible">True</property>
<object class="GtkModelButton" id="account_settings_menu">
<property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="action_name">app.directory</property>
<property name="text" translatable="yes">Room Directory</property>
<property name="action_name">app.account_settings</property>
<property name="text" translatable="yes">Account Settings</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -242,44 +255,64 @@
</packing>
</child>
<child>
<object class="GtkModelButton" id="new_room_menu">
<object class="GtkModelButton" id="logout_menu">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="action_name">app.new_room</property>
<property name="text" translatable="yes">Create new room</property>
<property name="action_name">app.logout</property>
<property name="text" translatable="yes">Log Out</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="pack_type">end</property>
</packing>
</child>
</object>
<packing>
<property name="submenu">main</property>
<property name="position">1</property>
</packing>
</child>
</object>
<object class="GtkPopoverMenu" id="add_room_popover">
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkSeparator">
<object class="GtkModelButton" id="directory_menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="action_name">app.directory</property>
<property name="text" translatable="yes">Room directory</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkModelButton" id="logout_menu">
<object class="GtkModelButton" id="new_room_menu">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="action_name">app.logout</property>
<property name="text" translatable="yes">Log Out</property>
<property name="action_name">app.new_room</property>
<property name="text" translatable="yes">Create new room</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">1</property>
</packing>
</child>
</object>
......@@ -585,7 +618,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">No room selected
Join a room to start to chat</property>
Join a room to start to chat</property>
<property name="justify">center</property>
</object>
<packing>
......@@ -1190,16 +1223,34 @@
</child>
</object>
</child>
<child type="title">
<object class="GtkLabel" id="fractal-label">
<child>
<object class="GtkMenuButton" id="add_room_menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Fractal</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">add_room_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">list-add-symbolic</property>
</object>
</child>
<accessibility>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="a11y-add_room_menu">
<property name="AtkObject::accessible_name" translatable="yes">User</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="room_search_button">
<property name="visible">True</property>
......@@ -1227,6 +1278,7 @@
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
......
......@@ -193,17 +193,9 @@ impl AppOp {
}
pub fn initial_sync(&self, show: bool) {
let label: gtk::Label = self.gtk_builder
.get_object("fractal-label")
.expect("Can't find fractal-label in ui file.");
if show {
label.get_style_context().unwrap().add_class("syncing");
label.set_tooltip_text("Initial sync, this can take some time");
self.inapp_notify("Initial sync, this can take some time");
} else {
label.get_style_context().unwrap().remove_class("syncing");
label.set_tooltip_text("");
self.hide_inapp_notify();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment