diff --git a/res/main_window.glade b/res/main_window.glade index 12c57cf7..a0702a0e 100644 --- a/res/main_window.glade +++ b/res/main_window.glade @@ -10,23 +10,17 @@ False - 600 - 400 False - True - True + False True - True - 120 - True - True + 200 + False rooms_tree_store False - True 0 @@ -49,30 +43,41 @@ - True False - - True + False - - True + False - vertical + 8 + 8 + True + 4 + 8 + + + False + 48 + face-smile + + + False + True + 0 + + - True False - 8 - 8 - 8 + 4 + 4 + vertical + 4 - - True + False - 48 - face-smile + <Room name> False @@ -81,37 +86,9 @@ - - True + False - 4 - 4 - vertical - 4 - - - True - False - <Room name> - - - False - True - 0 - - - - - True - False - <Description> - - - False - True - 1 - - + <Description> False @@ -119,88 +96,141 @@ 1 + + + False + True + 1 + + + + + True + True + center + none - - True - True - True - center - none - - - True - False - edit-find - - + + False + edit-find - - False - True - end - 2 - + + + False + True + end + 2 + + + + + True + True + center + none - - True - True - True - center - none - - - True - False - preferences-system - - + + False + preferences-system - - False - True - end - 3 - False True - 0 + end + 3 + + + 0 + 0 + + + + + False + center + center + 5 + room_sidebar_stack + + + 2 + 0 + + + + + 480 + 360 + False + True + True + + + 0 + 2 + + + + + 200 + False - - True + False + <Members> - False - True + room_member_list + Members + contact-new + + + + + False + <Files> + + + room_file_list + Files + mail-attachment 1 - + + False + <Notifications> + + + room_notification_list + Notifications + preferences-system-notifications + 2 + - True - True - 0 + 2 + 2 + 2 - - True + False - vertical + 4 + 4 - - True + False - room_sidebar_stack + 32 + face-glasses False @@ -209,59 +239,85 @@ - - True + + True + center + + + True + True + 1 + + + + False + icons - - True + False - <Members> + Upload file + mail-attachment - room_member_list - Members - contact-new + False + True - - True + False - <Files> + Voice call + audio-input-microphone - room_file_list - Files - mail-attachment - 1 + False + True - - True + False - <Notifications> + Audio call + camera-video - room_notification_list - Notifications - preferences-system-notifications - 2 + False + True - True + False True - 1 + 2 - False - True - 1 + 0 + 3 + + + + + False + + + 0 + 1 + 3 + + + + + False + vertical + + + 1 + 0 + 4 @@ -271,8 +327,7 @@ - - True + False @@ -284,33 +339,28 @@ True - True + False - True False True - True True - True + center - True False - True False 4 - True False True @@ -322,7 +372,6 @@ - True False Loading... @@ -339,12 +388,10 @@ - True False 4 - True False address-book-new 3 @@ -357,7 +404,6 @@ - True False <Display Name> @@ -379,8 +425,8 @@ - True False + center main_content_stack @@ -393,12 +439,10 @@ bottom - True False vertical - True False user_menu_stack @@ -410,11 +454,9 @@ - True False - True False <Login> @@ -425,7 +467,6 @@ - True False <Register> diff --git a/src/app.rs b/src/app.rs index 2d62d497..a525aa98 100644 --- a/src/app.rs +++ b/src/app.rs @@ -38,18 +38,10 @@ impl App { let gtk_builder = gtk::Builder::new_from_file("res/main_window.glade"); - let gtk_builder2 = gtk_builder.clone(); + let builder = gtk_builder.clone(); gtk_app.connect_activate(move |app| { - let user_button: gtk::Button = gtk_builder2.get_object("user_button") - .expect("Couldn't find user_button in ui file."); - - let user_menu: gtk::Popover = gtk_builder2.get_object("user_menu") - .expect("Couldn't find user_menu in ui file."); - - user_button.connect_clicked(move |_| user_menu.show()); - // Set up shutdown callback - let window: gtk::Window = gtk_builder2.get_object("main_window") + let window: gtk::Window = builder.get_object("main_window") .expect("Couldn't find main_window in ui file."); let app2 = app.clone(); @@ -58,6 +50,16 @@ impl App { Inhibit(false) }); + // Set up user popover + let user_button: gtk::Button = builder.get_object("user_button") + .expect("Couldn't find user_button in ui file."); + + let user_menu: gtk::Popover = builder.get_object("user_menu") + .expect("Couldn't find user_menu in ui file."); + + user_button.connect_clicked(move |_| user_menu.show()); + + // Associate window with the Application and show it window.set_application(Some(app)); window.show_all(); });