From c4590f8b2382fb23a733d2cf2f6c645f02e2fc48 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 3 Jan 2023 22:52:41 -0500 Subject: start voice info box --- src/windows/mainwindow.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/windows/mainwindow.cpp') diff --git a/src/windows/mainwindow.cpp b/src/windows/mainwindow.cpp index 20da46b..c80dfda 100644 --- a/src/windows/mainwindow.cpp +++ b/src/windows/mainwindow.cpp @@ -6,6 +6,7 @@ MainWindow::MainWindow() , m_content_box(Gtk::ORIENTATION_HORIZONTAL) , m_chan_content_paned(Gtk::ORIENTATION_HORIZONTAL) , m_content_members_paned(Gtk::ORIENTATION_HORIZONTAL) + , m_left_pane(Gtk::ORIENTATION_VERTICAL) , m_accels(Gtk::AccelGroup::create()) { set_default_size(1200, 800); get_style_context()->add_class("app-window"); @@ -51,12 +52,18 @@ MainWindow::MainWindow() m_content_stack.set_visible_child("chat"); m_content_stack.show(); - m_chan_content_paned.pack1(m_channel_list); + m_voice_info.show(); + + m_left_pane.add(m_channel_list); + m_left_pane.add(m_voice_info); + m_left_pane.show(); + + m_chan_content_paned.pack1(m_left_pane); m_chan_content_paned.pack2(m_content_members_paned); m_chan_content_paned.child_property_shrink(m_content_members_paned) = true; m_chan_content_paned.child_property_resize(m_content_members_paned) = true; - m_chan_content_paned.child_property_shrink(m_channel_list) = true; - m_chan_content_paned.child_property_resize(m_channel_list) = true; + m_chan_content_paned.child_property_shrink(m_left_pane) = true; + m_chan_content_paned.child_property_resize(m_left_pane) = true; m_chan_content_paned.set_position(200); m_chan_content_paned.show(); m_content_box.add(m_chan_content_paned); -- cgit v1.2.3 From e51d5d1980b1ab0c1738836762900f7bd9bc3c3f Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 14 Mar 2023 14:18:54 -0400 Subject: more WITH_VOICE guards --- src/components/voiceinfobox.cpp | 10 +++++++--- src/components/voiceinfobox.hpp | 12 ++++++++---- src/windows/mainwindow.cpp | 4 ++++ src/windows/mainwindow.hpp | 3 +++ 4 files changed, 22 insertions(+), 7 deletions(-) (limited to 'src/windows/mainwindow.cpp') diff --git a/src/components/voiceinfobox.cpp b/src/components/voiceinfobox.cpp index 456c5f0..b870794 100644 --- a/src/components/voiceinfobox.cpp +++ b/src/components/voiceinfobox.cpp @@ -1,6 +1,8 @@ -#include "voiceinfobox.hpp" -#include "abaddon.hpp" -#include "util.hpp" +#ifdef WITH_VOICE + + #include "voiceinfobox.hpp" + #include "abaddon.hpp" + #include "util.hpp" VoiceInfoBox::VoiceInfoBox() : Gtk::Box(Gtk::ORIENTATION_HORIZONTAL) @@ -97,3 +99,5 @@ VoiceInfoBox::VoiceInfoBox() show_all_children(); } + +#endif diff --git a/src/components/voiceinfobox.hpp b/src/components/voiceinfobox.hpp index 0117c0d..74aad27 100644 --- a/src/components/voiceinfobox.hpp +++ b/src/components/voiceinfobox.hpp @@ -1,9 +1,11 @@ #pragma once -#include -#include -#include -#include +#ifdef WITH_VOICE + + #include + #include + #include + #include class VoiceInfoBox : public Gtk::Box { public: @@ -18,3 +20,5 @@ private: Gtk::EventBox m_disconnect_ev; Gtk::Image m_disconnect_img; }; + +#endif diff --git a/src/windows/mainwindow.cpp b/src/windows/mainwindow.cpp index 73b78de..f867db9 100644 --- a/src/windows/mainwindow.cpp +++ b/src/windows/mainwindow.cpp @@ -51,10 +51,14 @@ MainWindow::MainWindow() m_content_stack.set_visible_child("chat"); m_content_stack.show(); +#ifdef WITH_VOICE m_voice_info.show(); +#endif m_left_pane.add(m_channel_list); +#ifdef WITH_VOICE m_left_pane.add(m_voice_info); +#endif m_left_pane.show(); m_chan_content_paned.pack1(m_left_pane); diff --git a/src/windows/mainwindow.hpp b/src/windows/mainwindow.hpp index 5cad82f..e075c10 100644 --- a/src/windows/mainwindow.hpp +++ b/src/windows/mainwindow.hpp @@ -57,7 +57,10 @@ private: ChatWindow m_chat; MemberList m_members; FriendsList m_friends; + +#ifdef WITH_VOICE VoiceInfoBox m_voice_info; +#endif Gtk::Box m_left_pane; -- cgit v1.2.3 From a204388c5c078d19a950b1a8886188567e30ea94 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 23 May 2023 01:09:05 -0400 Subject: hide voice info box on startup --- src/windows/mainwindow.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/windows/mainwindow.cpp') diff --git a/src/windows/mainwindow.cpp b/src/windows/mainwindow.cpp index f867db9..bb09735 100644 --- a/src/windows/mainwindow.cpp +++ b/src/windows/mainwindow.cpp @@ -51,10 +51,6 @@ MainWindow::MainWindow() m_content_stack.set_visible_child("chat"); m_content_stack.show(); -#ifdef WITH_VOICE - m_voice_info.show(); -#endif - m_left_pane.add(m_channel_list); #ifdef WITH_VOICE m_left_pane.add(m_voice_info); -- cgit v1.2.3