[gst-debugger] gst-debugger: minors in gui
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gst-debugger] gst-debugger: minors in gui
- Date: Mon, 5 Oct 2015 10:13:57 +0000 (UTC)
commit 64011452a58547bebf98857c1c73b824f66d5e13
Author: Marcin Kolny <marcin kolny gmail com>
Date: Mon Oct 5 12:12:06 2015 +0200
gst-debugger: minors in gui
src/gst-debugger/modules/buffer_module.cpp | 7 +++----
src/gst-debugger/modules/control_module.h | 9 +++++++++
src/gst-debugger/modules/log_module.cpp | 11 +++--------
src/gst-debugger/modules/message_module.cpp | 3 +--
src/gst-debugger/modules/qe_control_module.h | 7 +++----
5 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/src/gst-debugger/modules/buffer_module.cpp b/src/gst-debugger/modules/buffer_module.cpp
index d302678..e69be62 100644
--- a/src/gst-debugger/modules/buffer_module.cpp
+++ b/src/gst-debugger/modules/buffer_module.cpp
@@ -64,14 +64,13 @@ void BufferModule::data_received(const Gtk::TreeModel::Row& row, GstDebugger::GS
BufferControlModule::BufferControlModule()
: ControlModule()
{
- pad_path_label = Gtk::manage(new Gtk::Label());
- main_box->pack_start(*pad_path_label, false, true);
- main_box->reorder_child(*pad_path_label, 0);
-
data_check_button = Gtk::manage(new Gtk::CheckButton("Send data"));
main_box->pack_start(*data_check_button, false, true);
main_box->reorder_child(*data_check_button, 1);
+ pad_path_label = Gtk::manage(new Gtk::Label());
+ create_description_box("Pad: ", pad_path_label, 0);
+
create_dispatcher("selected-object", [this] {
auto pad_path = controller->get_selected_pad_path();
if (pad_path.empty())
diff --git a/src/gst-debugger/modules/control_module.h b/src/gst-debugger/modules/control_module.h
index f9e0baa..496edcf 100644
--- a/src/gst-debugger/modules/control_module.h
+++ b/src/gst-debugger/modules/control_module.h
@@ -63,6 +63,15 @@ protected:
}
}
+ void create_description_box(const std::string &description, Gtk::Widget *widget, int pos)
+ {
+ auto box = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
+ box->pack_start(*Gtk::manage(new Gtk::Label(description)), false, true);
+ box->pack_start(*widget, true, true);
+ main_box->pack_start(*box, false, true);
+ main_box->reorder_child(*box, pos);
+ }
+
virtual bool hook_is_the_same(const Gtk::TreeModel::Row& row, gconstpointer confirmation) = 0;
virtual void add_hook() {}
virtual void remove_hook(const Gtk::TreeModel::Row& row) {}
diff --git a/src/gst-debugger/modules/log_module.cpp b/src/gst-debugger/modules/log_module.cpp
index 9957e89..f34bf44 100644
--- a/src/gst-debugger/modules/log_module.cpp
+++ b/src/gst-debugger/modules/log_module.cpp
@@ -36,17 +36,12 @@ void LogModule::data_received(const Gtk::TreeModel::Row& row, GstDebugger::GStre
LogControlModule::LogControlModule()
: ControlModule()
{
- auto lbl = Gtk::manage(new Gtk::Label("Debug categories"));
- main_box->pack_start(*lbl, false, true);
- main_box->reorder_child(*lbl, 0);
-
debug_categories_combobox = Gtk::manage(new Gtk::ComboBoxText());
- main_box->pack_start(*debug_categories_combobox, false, true);
- main_box->reorder_child(*debug_categories_combobox, 1);
+
+ create_description_box("Debug category: ", debug_categories_combobox, 0);
log_levels_combobox = Gtk::manage(new Gtk::ComboBoxText());
- main_box->pack_start(*log_levels_combobox, false, true);
- main_box->reorder_child(*log_levels_combobox, 0);
+ create_description_box("Log level: ", log_levels_combobox, 0);
main_box->pack_start(*Gtk::manage(new Gtk::Label("Log threshold:")), false, true);
diff --git a/src/gst-debugger/modules/message_module.cpp b/src/gst-debugger/modules/message_module.cpp
index e118d7e..99f01e6 100644
--- a/src/gst-debugger/modules/message_module.cpp
+++ b/src/gst-debugger/modules/message_module.cpp
@@ -46,8 +46,7 @@ MessageControlModule::MessageControlModule()
types_combobox->set_model(types_model);
types_combobox->pack_start(types_model_columns.type_name);
- main_box->pack_start(*types_combobox, false, true);
- main_box->reorder_child(*types_combobox, 0);
+ create_description_box("Type: ", types_combobox, 0);
hooks_tree_view->append_column("Type", hooks_model_columns.str1);
}
diff --git a/src/gst-debugger/modules/qe_control_module.h b/src/gst-debugger/modules/qe_control_module.h
index 591e1bd..94ccb16 100644
--- a/src/gst-debugger/modules/qe_control_module.h
+++ b/src/gst-debugger/modules/qe_control_module.h
@@ -32,15 +32,14 @@ public:
: enum_name(enum_name)
{
pad_path_label = Gtk::manage(new Gtk::Label());
- main_box->pack_start(*pad_path_label, false, true);
- main_box->reorder_child(*pad_path_label, 0);
+ create_description_box("Pad: ", pad_path_label, 0);
types_combobox = Gtk::manage(new Gtk::ComboBox());
types_model = Gtk::ListStore::create(types_model_columns);
types_combobox->set_model(types_model);
types_combobox->pack_start(types_model_columns.type_name);
- main_box->pack_start(*types_combobox, false, true);
- main_box->reorder_child(*types_combobox, 0);
+
+ create_description_box("Type: ", types_combobox, 0);
hooks_tree_view->append_column("Type", hooks_model_columns.str1);
hooks_tree_view->append_column("Pad", hooks_model_columns.str2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]