[gst-debugger] gst-debugger: module refactoring - part 1
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gst-debugger] gst-debugger: module refactoring - part 1
- Date: Mon, 31 Aug 2015 13:20:06 +0000 (UTC)
commit 63cfbbb5cb3b61cff5038b54b95d0614aef9ebcc
Author: Marcin Kolny <marcin kolny gmail com>
Date: Mon Aug 31 15:19:53 2015 +0200
gst-debugger: module refactoring - part 1
Remove duplicated widgets in ui file, add base modules
src/gst-debugger/Makefile.am | 17 +-
src/gst-debugger/main_window.cpp | 41 +-
src/gst-debugger/main_window.h | 24 +-
src/gst-debugger/modules/base_main_module.cpp | 36 +
src/gst-debugger/modules/base_main_module.h | 42 ++
src/gst-debugger/modules/gst_buffer_module.cpp | 77 ---
src/gst-debugger/modules/gst_buffer_module.h | 30 -
src/gst-debugger/modules/gst_event_module.cpp | 52 --
src/gst-debugger/modules/gst_event_module.h | 24 -
src/gst-debugger/modules/gst_query_module.cpp | 46 --
src/gst-debugger/modules/gst_query_module.h | 24 -
src/gst-debugger/modules/main_module.cpp | 65 ++
src/gst-debugger/modules/main_module.h | 47 ++
src/gst-debugger/modules/pad_data_modules.cpp | 206 ++++++
src/gst-debugger/modules/pad_data_modules.h | 93 +++
src/gst-debugger/ui/gst-debugger.glade | 851 +++++-------------------
16 files changed, 692 insertions(+), 983 deletions(-)
---
diff --git a/src/gst-debugger/Makefile.am b/src/gst-debugger/Makefile.am
index cba23a4..e1bc772 100644
--- a/src/gst-debugger/Makefile.am
+++ b/src/gst-debugger/Makefile.am
@@ -43,18 +43,15 @@ gst_debugger_headers = \
models/gst_factory_model.h \
models/gst_pipeline_model.h \
models/remote_data_container.h \
- modules/gst_buffer_module.h \
- modules/gst_event_module.h \
+ modules/base_main_module.h \
modules/gst_log_module.h \
- modules/gst_message_module.h \
modules/gst_properties_module.h \
- modules/gst_qe_module.h \
- modules/gst_query_module.h \
+ modules/main_module.h \
pipeline-drawer/graph_module.h \
pipeline-drawer/gst_bin_to_dot_converter.h
-gst_debugger_ GST_API_VERSION@_SOURCES = \
+gst_debugger_ GST_API_VERSION@_SOURCES = \
gst-debugger-resources.c \
main.cpp \
main_window.cpp \
@@ -77,13 +74,11 @@ gst_debugger_ GST_API_VERSION@_SOURCES = \
gvalue-converter/gvalue_string.cpp \
models/gst_factory_model.cpp \
models/gst_pipeline_model.cpp \
- modules/gst_buffer_module.cpp \
- modules/gst_event_module.cpp \
+ modules/main_module.cpp \
+ modules/base_main_module.cpp \
+ modules/pad_data_modules.cpp \
modules/gst_log_module.cpp \
- modules/gst_message_module.cpp \
modules/gst_properties_module.cpp \
- modules/gst_qe_module.cpp \
- modules/gst_query_module.cpp \
pipeline-drawer/graph_module.cpp \
pipeline-drawer/gst_bin_to_dot_converter.cpp \
$(gst_debugger_headers)
diff --git a/src/gst-debugger/main_window.cpp b/src/gst-debugger/main_window.cpp
index d924310..f5e76ef 100644
--- a/src/gst-debugger/main_window.cpp
+++ b/src/gst-debugger/main_window.cpp
@@ -14,15 +14,13 @@
#include "controller/controller.h"
+#include "modules/pad_data_modules.h"
+
MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: IMainView(cobject),
builder(builder),
dispatcher(std::make_shared<Glib::Dispatcher>()),
- log_module(std::make_shared<GstLogModule>(builder)),
- event_module(std::make_shared<GstEventModule>(builder)),
- query_module(std::make_shared<GstQueryModule>(builder)),
- message_module(std::make_shared<GstMessageModule>(builder)),
- buffer_module(std::make_shared<GstBufferModule>(builder)),
+ main_module(std::make_shared<MainModule>(builder)),
properties_module(std::make_shared<GstPropertiesModule>(builder))
{
graph_module = std::make_shared<GraphModule>(builder);
@@ -71,6 +69,28 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
graph_module->free_graph();
return false;
});
+
+ load_base_main_modules(builder);
+}
+
+void MainWindow::load_base_main_modules(const Glib::RefPtr<Gtk::Builder>& builder)
+{
+ //main_modules["logMessages"].module = std::make_shared<GstLogModule>();
+ main_modules["queries"].module = std::make_shared<QueryModule>();
+ //main_modules["busMessages"].module = std::make_shared<GstMessageModule>();
+ main_modules["buffers"].module = std::make_shared<BufferModule>();
+ main_modules["events"].module = std::make_shared<EventModule>();
+
+ for (auto m : main_modules)
+ {
+ builder->get_widget(m.first + "ToolButton", m.second.switch_button);
+ m.second.switch_button->signal_toggled().connect([this, m] {
+ if (m.second.switch_button->get_active())
+ {
+ main_module->update_module(m.second.module);
+ }
+ });
+ }
}
void MainWindow::set_controller(const std::shared_ptr<Controller> &controller)
@@ -79,14 +99,15 @@ void MainWindow::set_controller(const std::shared_ptr<Controller> &controller)
controller->on_connection_status_changed(sigc::mem_fun(*this,
&MainWindow::connection_status_changed));
- log_module->set_controller(controller);
- event_module->set_controller(controller);
- query_module->set_controller(controller);
- message_module->set_controller(controller);
- buffer_module->set_controller(controller);
+ main_module->set_controller(controller);
graph_module->set_controller(controller);
properties_module->set_controller(controller);
+ for (auto m : main_modules)
+ {
+ m.second.module->set_controller(controller);
+ }
+
enums_dialog->set_controller(controller);
enums_dialog->set_transient_for(*this);
diff --git a/src/gst-debugger/main_window.h b/src/gst-debugger/main_window.h
index a55c610..95aba85 100644
--- a/src/gst-debugger/main_window.h
+++ b/src/gst-debugger/main_window.h
@@ -12,11 +12,7 @@
#include "dialogs/connection_properties_dialog.h"
#include "dialogs/enums_dialog.h"
#include "dialogs/factories_dialog.h"
-#include "modules/gst_log_module.h"
-#include "modules/gst_event_module.h"
-#include "modules/gst_query_module.h"
-#include "modules/gst_message_module.h"
-#include "modules/gst_buffer_module.h"
+#include "modules/main_module.h"
#include "modules/gst_properties_module.h"
#include "pipeline-drawer/graph_module.h"
@@ -25,12 +21,22 @@
#include "controller/iview.h"
#include "models/gst_enum_model.h"
+#include <map>
+
class MainWindow : public IMainView
{
+ struct MainModuleInfo
+ {
+ std::shared_ptr<BaseMainModule> module;
+ Gtk::RadioToolButton *switch_button;
+ };
+
void connectionPropertiesMenuItem_activate_cb();
void connectMenuItem_activate_cb();
void connection_status_changed(bool connected);
+ void load_base_main_modules(const Glib::RefPtr<Gtk::Builder>& builder);
+
Glib::RefPtr<Gtk::Builder> builder;
Gtk::MenuItem *connection_properties;
Gtk::MenuItem *remote_enum_types;
@@ -46,14 +52,12 @@ class MainWindow : public IMainView
Gtk::Statusbar *main_statusbar;
std::shared_ptr<Glib::Dispatcher> dispatcher;
- std::shared_ptr<GstLogModule> log_module;
- std::shared_ptr<GstEventModule> event_module;
- std::shared_ptr<GstQueryModule> query_module;
- std::shared_ptr<GstMessageModule> message_module;
- std::shared_ptr<GstBufferModule> buffer_module;
+ std::shared_ptr<MainModule> main_module;
std::shared_ptr<GraphModule> graph_module;
std::shared_ptr<GstPropertiesModule> properties_module;
+ std::map<std::string, MainModuleInfo> main_modules;
+
GstreamerInfo info;
public:
diff --git a/src/gst-debugger/modules/base_main_module.cpp b/src/gst-debugger/modules/base_main_module.cpp
new file mode 100644
index 0000000..7faaab8
--- /dev/null
+++ b/src/gst-debugger/modules/base_main_module.cpp
@@ -0,0 +1,36 @@
+/*
+ * base_main_module.cpp
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#include "base_main_module.h"
+
+DetailsModelColumns BaseMainModule::detail_columns;
+
+BaseMainModule::BaseMainModule(bool has_type)
+: has_type(has_type)
+{
+ details_model = Gtk::ListStore::create(detail_columns);
+}
+
+void BaseMainModule::configure_main_list_view(Gtk::TreeView *view)
+{
+ view->remove_all_columns();
+ view->set_model(model);
+}
+
+void BaseMainModule::load_details(Gtk::TreeView *view, const Gtk::TreeModel::Path &path)
+{
+ details_model->clear();
+ view->set_model(details_model);
+}
+
+void BaseMainModule::configure_details_view(Gtk::TreeView *view)
+{
+ view->remove_all_columns();
+ view->append_column("Name", detail_columns.name);
+ view->append_column("Value", detail_columns.value);
+}
+
diff --git a/src/gst-debugger/modules/base_main_module.h b/src/gst-debugger/modules/base_main_module.h
new file mode 100644
index 0000000..2480054
--- /dev/null
+++ b/src/gst-debugger/modules/base_main_module.h
@@ -0,0 +1,42 @@
+/*
+ * base_main_module.h
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#ifndef SRC_GST_DEBUGGER_MODULES_BASE_MAIN_MODULE_H_
+#define SRC_GST_DEBUGGER_MODULES_BASE_MAIN_MODULE_H_
+
+#include "controller/iview.h"
+#include "common_model_columns.h"
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/treeview.h>
+#include <gtkmm/treemodel.h>
+
+class BaseMainModule : public IBaseView
+{
+ bool has_type;
+
+protected:
+ static DetailsModelColumns detail_columns;
+
+ Glib::RefPtr<Gtk::ListStore> model;
+ Glib::RefPtr<Gtk::ListStore> details_model;
+ Glib::RefPtr<Gtk::ListStore> hooks_model;
+
+public:
+ BaseMainModule(bool has_type);
+ virtual ~BaseMainModule() {}
+
+ virtual void configure_main_list_view(Gtk::TreeView *view) = 0;
+ virtual void load_details(Gtk::TreeView *view, const Gtk::TreeModel::Path &path) = 0;
+ virtual void details_activated(const Gtk::TreeModel::Path &path) {}
+
+ static void configure_details_view(Gtk::TreeView *view);
+
+ Glib::RefPtr<Gtk::ListStore> get_model() const { return model; }
+};
+
+#endif /* SRC_GST_DEBUGGER_MODULES_BASE_MAIN_MODULE_H_ */
diff --git a/src/gst-debugger/modules/main_module.cpp b/src/gst-debugger/modules/main_module.cpp
new file mode 100644
index 0000000..5fbaea5
--- /dev/null
+++ b/src/gst-debugger/modules/main_module.cpp
@@ -0,0 +1,65 @@
+/*
+ * main_module.cpp
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#include "main_module.h"
+
+#include "controller/controller.h"
+#include "controller/element_path_processor.h"
+
+MainModule::MainModule(const Glib::RefPtr<Gtk::Builder> &builder)
+{
+ builder->get_widget("mainListTreeView", list_tree_view);
+ list_tree_view->signal_row_activated().connect(sigc::mem_fun(*this,
&MainModule::mainListTreeView_row_activated_cb));
+
+ builder->get_widget("mainDetailsTreeView", details_tree_view);
+ details_tree_view->signal_row_activated().connect(sigc::mem_fun(*this,
&MainModule::mainDetailsTreeView_row_activated_cb));
+ BaseMainModule::configure_details_view(details_tree_view);
+
+ builder->get_widget("existingHooksTreeView", existing_hooks_tree_view);
+ builder->get_widget("hookPadPathLabel", pad_path_label);
+
+ builder->get_widget("addNewHookButton", add_hook_button);
+ builder->get_widget("removeSelectedHook", remove_selected_hook_button);
+
+ builder->get_widget("hookTypesComboBox", types_combobox);
+ builder->get_widget("hookTypeBox", hook_type_box);
+ builder->get_widget("hookAnyPathCheckButton", any_path_check_button);
+ builder->get_widget("hookAnyTypeCheckButton", any_type_check_button);
+
+ create_dispatcher("selected-object", sigc::mem_fun(*this, &MainModule::selected_object_changed),
nullptr);
+
+}
+
+void MainModule::set_controller(const std::shared_ptr<Controller> &controller)
+{
+ IBaseView::set_controller(controller);
+
+ controller->on_selected_object_changed.connect([this]{gui_emit("selected-object");});
+}
+
+void MainModule::selected_object_changed()
+{
+ std::shared_ptr<PadModel> selected_pad =
std::dynamic_pointer_cast<PadModel>(controller->get_selected_object());
+ pad_path_label->set_text(selected_pad ? ElementPathProcessor::get_object_path(selected_pad) :
"(none)");
+}
+
+void MainModule::update_module(const std::shared_ptr<BaseMainModule> &module)
+{
+ module->configure_main_list_view(list_tree_view);
+ current_module = module;
+}
+
+void MainModule::mainListTreeView_row_activated_cb(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn
*column)
+{
+ current_module->load_details(details_tree_view, path);
+}
+
+void MainModule::mainDetailsTreeView_row_activated_cb(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn
*column)
+{
+ current_module->details_activated(path);
+}
+
diff --git a/src/gst-debugger/modules/main_module.h b/src/gst-debugger/modules/main_module.h
new file mode 100644
index 0000000..34ed4a3
--- /dev/null
+++ b/src/gst-debugger/modules/main_module.h
@@ -0,0 +1,47 @@
+/*
+ * main_module.h
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#ifndef SRC_GST_DEBUGGER_MODULES_MAIN_MODULE_H_
+#define SRC_GST_DEBUGGER_MODULES_MAIN_MODULE_H_
+
+#include "controller/iview.h"
+
+#include "base_main_module.h"
+
+#include <gtkmm.h>
+
+class MainModule : public IBaseView
+{
+ Gtk::TreeView *list_tree_view;
+ Gtk::TreeView *details_tree_view;
+ Gtk::Button *add_hook_button;
+ Gtk::Button *remove_selected_hook_button;
+ Gtk::ComboBox *types_combobox;
+ Gtk::CheckButton *any_path_check_button;
+ Gtk::CheckButton *any_type_check_button;
+ Gtk::TreeView *existing_hooks_tree_view;
+ Gtk::Label *pad_path_label;
+ Gtk::Box *hook_type_box;
+
+ TypesModelColumns types_columns;
+
+ std::shared_ptr<BaseMainModule> current_module;
+
+ void selected_object_changed();
+
+ void mainListTreeView_row_activated_cb(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
+ void mainDetailsTreeView_row_activated_cb(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn
*column);
+
+public:
+ MainModule(const Glib::RefPtr<Gtk::Builder>& builder);
+
+ void set_controller(const std::shared_ptr<Controller> &controller) override;
+
+ void update_module(const std::shared_ptr<BaseMainModule> &module);
+};
+
+#endif /* SRC_GST_DEBUGGER_MODULES_MAIN_MODULE_H_ */
diff --git a/src/gst-debugger/modules/pad_data_modules.cpp b/src/gst-debugger/modules/pad_data_modules.cpp
new file mode 100644
index 0000000..a8ad8de
--- /dev/null
+++ b/src/gst-debugger/modules/pad_data_modules.cpp
@@ -0,0 +1,206 @@
+/*
+ * pad_data_modules.cpp
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#include "pad_data_modules.h"
+
+#include "dialogs/buffer_data_dialog.h"
+
+#include "controller/controller.h"
+
+#include "common/deserializer.h"
+
+template<typename T>
+static void free_data(T *data) { delete data; }
+
+template<typename T>
+PadDataModule<T>::PadDataModule(GstreamerInfo_InfoType info_type)
+: BaseMainModule(info_type != GstreamerInfo_InfoType_BUFFER),
+ info_type(info_type)
+{
+ model = Gtk::ListStore::create(columns);
+ create_dispatcher("qebm", sigc::mem_fun(*this, &PadDataModule::qebm_received_),
(GDestroyNotify)free_data<GstreamerQEBM>);
+}
+
+template<typename T>
+void PadDataModule<T>::set_controller(const std::shared_ptr<Controller> &controller)
+{
+ IBaseView::set_controller(controller);
+
+ controller->on_qebm_received.connect([this](const GstreamerQEBM& qebm, GstreamerInfo_InfoType type){
+ if (type == info_type)
+ {
+ gui_push("qebm", new GstreamerQEBM(qebm));
+ gui_emit("qebm");
+ }
+ });
+}
+
+template<typename T>
+void PadDataModule<T>::qebm_received_()
+{
+ auto qebm = gui_pop<GstreamerQEBM*>("qebm");
+ Gtk::TreeModel::Row row = *(model->append());
+ row[columns.pad_path] = qebm->pad_path();
+ row[columns.object] = deserialize(qebm->payload());
+ row[columns.header] = "Event"; // todo
+ delete qebm;
+}
+
+template<typename T>
+void PadDataModule<T>::configure_main_list_view(Gtk::TreeView *view)
+{
+ BaseMainModule::configure_main_list_view(view);
+ view->append_column("PadData", columns.header); // todo
+}
+
+template<typename T>
+void PadDataModule<T>::load_details(Gtk::TreeView *view, const Gtk::TreeModel::Path &path)
+{
+ BaseMainModule::load_details(view, path);
+
+ Gtk::TreeModel::iterator iter = model->get_iter(path);
+ if (!iter)
+ {
+ return;
+ }
+
+ Gtk::TreeModel::Row row = *iter;
+ display_details(Glib::wrap(row[columns.object], true), (Glib::ustring)row[columns.pad_path]);
+}
+
+template<typename T>
+void PadDataModule<T>::append_details_row(const std::string &name, const std::string &value)
+{
+ Gtk::TreeModel::Row row = *(details_model->append());
+ row[detail_columns.name] = name;
+ row[detail_columns.value] = value;
+}
+
+template<typename T>
+void PadDataModule<T>::append_details_from_structure(Gst::Structure& structure)
+{
+ if (!structure.gobj())
+ return;
+
+ structure.foreach([structure, this](const Glib::ustring &name, const Glib::ValueBase &value) -> bool {
+ GValue* tmp_val = new GValue;
+ *tmp_val = G_VALUE_INIT;
+ g_value_init(tmp_val, value.gobj()->g_type);
+ g_value_copy(value.gobj(), tmp_val);
+ auto gvalue = GValueBase::build_gvalue(tmp_val);
+ if (gvalue == nullptr)
+ append_details_row(name, std::string("<unsupported type ") +
g_type_name(G_VALUE_TYPE(value.gobj())) + ">");
+ else
+ {
+ append_details_row(name, gvalue->to_string());
+ delete gvalue;
+ }
+ return true;
+ });
+}
+
+template<typename T>
+PadWatch_WatchType PadDataModule<T>::get_watch_type() const
+{
+ switch (info_type)
+ {
+ case GstreamerInfo_InfoType_BUFFER:
+ return PadWatch_WatchType_BUFFER;
+ case GstreamerInfo_InfoType_EVENT:
+ return PadWatch_WatchType_EVENT;
+ case GstreamerInfo_InfoType_QUERY:
+ return PadWatch_WatchType_QUERY;
+ default:
+ return (PadWatch_WatchType)-1;
+ }
+}
+
+GstEvent* EventModule::deserialize(const std::string &payload)
+{
+ return gst_event_deserialize(payload.c_str(), payload.length());
+}
+
+
+void EventModule::display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
+{
+ Glib::RefPtr<Gst::Event> event = event.cast_static(obj);
+
+ append_details_row("pad path", pad_path);
+ append_details_row("event type", Gst::Enums::get_name(event->get_event_type()));
+ {
+ gchar buffer[20];
+ snprintf(buffer, 20, "%" GST_TIME_FORMAT, GST_TIME_ARGS(event->get_timestamp()));
+ append_details_row("event timestamp", buffer);
+ }
+ append_details_row("event sequence number", std::to_string(event->get_seqnum()));
+
+ auto structure = event->get_structure();
+ append_details_from_structure(structure);
+}
+
+GstQuery* QueryModule::deserialize(const std::string &payload)
+{
+ return gst_query_deserialize(payload.c_str(), payload.length());
+}
+
+void QueryModule::display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
+{
+ Glib::RefPtr<Gst::Query> query = query.cast_static(obj);
+
+ append_details_row("pad path", pad_path);
+ append_details_row("query type", Gst::Enums::get_name(query->get_query_type()));
+
+ auto structure = query->get_structure();
+ append_details_from_structure(structure);
+}
+
+GstBuffer* BufferModule::deserialize(const std::string &payload)
+{
+ return gst_buffer_deserialize(payload.c_str(), payload.length());
+}
+
+void BufferModule::display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
+{
+ buffer = buffer.cast_static(obj);
+
+ append_details_row("pad path", pad_path);
+ append_details_row("pts", std::to_string(buffer->get_pts()));
+ append_details_row("dts", std::to_string(buffer->get_dts()));
+ append_details_row("duration", std::to_string(buffer->get_duration()));
+ append_details_row("offset", std::to_string(buffer->get_offset()));
+ append_details_row("offset_end", std::to_string(buffer->get_offset_end()));
+ append_details_row("size", std::to_string(buffer->get_size()));
+ append_details_row("flags", std::to_string(buffer->get_flags()));
+
+ append_details_row("data", buffer_data_to_string(StringDataFormat::HEX, buffer, 1024, 16));
+}
+
+void BufferModule::details_activated(const Gtk::TreeModel::Path &path)
+{
+ Gtk::TreeModel::iterator iter = details_model->get_iter(path);
+ if (!iter)
+ {
+ return;
+ }
+
+ Gtk::TreeModel::Row row = *iter;
+ if (row[detail_columns.name] == "data")
+ {
+ data_dialog->set_buffer(buffer);
+ data_dialog->show();
+ }
+}
+
+BufferModule::BufferModule()
+: PadDataModule<GstBuffer>(GstreamerInfo_InfoType_BUFFER)
+{
+ data_dialog = load_dialog<BufferDataDialog>("bufferDataDialog");
+}
+
+template class PadDataModule<GstEvent>;
+template class PadDataModule<GstBuffer>;
+template class PadDataModule<GstQuery>;
diff --git a/src/gst-debugger/modules/pad_data_modules.h b/src/gst-debugger/modules/pad_data_modules.h
new file mode 100644
index 0000000..aee5b9e
--- /dev/null
+++ b/src/gst-debugger/modules/pad_data_modules.h
@@ -0,0 +1,93 @@
+/*
+ * pad_data_modules.h
+ *
+ * Created on: Aug 31, 2015
+ * Author: loganek
+ */
+
+#ifndef SRC_GST_DEBUGGER_MODULES_PAD_DATA_MODULES_H_
+#define SRC_GST_DEBUGGER_MODULES_PAD_DATA_MODULES_H_
+
+#include "base_main_module.h"
+
+#include "common/gstdebugger.pb.h"
+
+template<typename T>
+class PadDataListModelColumns : public Gtk::TreeModel::ColumnRecord
+{
+public:
+ PadDataListModelColumns() {
+ add(header); add(object); add(pad_path);
+ }
+
+ Gtk::TreeModelColumn<Glib::ustring> header;
+ Gtk::TreeModelColumn<T*> object;
+ Gtk::TreeModelColumn<Glib::ustring> pad_path;
+};
+
+template<typename T>
+class PadDataModule : public BaseMainModule
+{
+ PadDataListModelColumns<T> columns;
+ GstreamerInfo_InfoType info_type;
+
+ virtual T* deserialize(const std::string &payload) = 0;
+
+ void confirmation_received_();
+ void qebm_received_();
+
+protected:
+ PadWatch_WatchType get_watch_type() const;
+
+ void append_details_from_structure(Gst::Structure& structure);
+ void append_details_row(const std::string &name, const std::string &value);
+ virtual void display_details(const Glib::RefPtr<Gst::MiniObject> &obj, const Glib::ustring &pad_path)
= 0;
+
+public:
+ PadDataModule(GstreamerInfo_InfoType info_type);
+
+ virtual ~PadDataModule() {}
+
+ void set_controller(const std::shared_ptr<Controller> &controller) override;
+ void configure_main_list_view(Gtk::TreeView *view) override;
+ void load_details(Gtk::TreeView *view, const Gtk::TreeModel::Path &path) override;
+};
+
+class EventModule : public PadDataModule<GstEvent>
+{
+ GstEvent *deserialize(const std::string &payload) override;
+
+ void display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
override;
+
+public:
+ EventModule() : PadDataModule<GstEvent>(GstreamerInfo_InfoType_EVENT) {}
+
+};
+
+class QueryModule : public PadDataModule<GstQuery>
+{
+ GstQuery *deserialize(const std::string &payload) override;
+
+ void display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
override;
+
+public:
+ QueryModule() : PadDataModule<GstQuery>(GstreamerInfo_InfoType_QUERY) {}
+};
+
+class BufferDataDialog;
+
+class BufferModule : public PadDataModule<GstBuffer>
+{
+ BufferDataDialog *data_dialog;
+ Glib::RefPtr<Gst::Buffer> buffer;
+
+ GstBuffer *deserialize(const std::string &payload) override;
+
+ void display_details(const Glib::RefPtr<Gst::MiniObject>& obj, const Glib::ustring &pad_path)
override;
+ void details_activated(const Gtk::TreeModel::Path &path) override;
+
+public:
+ BufferModule();
+};
+
+#endif /* SRC_GST_DEBUGGER_MODULES_PAD_DATA_MODULES_H_ */
diff --git a/src/gst-debugger/ui/gst-debugger.glade b/src/gst-debugger/ui/gst-debugger.glade
index f99972b..6a50be2 100644
--- a/src/gst-debugger/ui/gst-debugger.glade
+++ b/src/gst-debugger/ui/gst-debugger.glade
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
+<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="mainWindow">
@@ -129,6 +129,86 @@
</packing>
</child>
<child>
+ <object class="GtkToolbar" id="toolbar1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkRadioToolButton" id="logMessagesToolButton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Log messages</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioToolButton" id="queriesToolButton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Queries</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="group">logMessagesToolButton</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioToolButton" id="busMessagesToolButton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Bus messages</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="group">logMessagesToolButton</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioToolButton" id="buffersToolButton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Buffers</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="group">logMessagesToolButton</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioToolButton" id="eventsToolButton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Events</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="group">logMessagesToolButton</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -138,190 +218,27 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="logMessagesTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="watchLogCheckButton">
- <property name="label" translatable="yes">Watch log messages</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Debug categories:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="debugCategoriesComboBoxText">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Log threshold:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="logThresholdEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="width_chars">5</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="overwriteCurrentThresholdCheckButton">
- <property name="label" translatable="yes">Overwrite current threshold</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="setThresholdButton">
- <property name="label" translatable="yes">Set threshold</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">6</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="clearMessageLogsButton">
- <property name="label" translatable="yes">Clear logs</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">7</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="saveMessageLogsButton">
- <property name="label" translatable="yes">Save logs to file</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">8</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Log messages</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkPaned" id="paned2">
+ <object class="GtkPaned" id="paned7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="orientation">vertical</property>
<property name="position">88</property>
<property name="position_set">True</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <object class="GtkScrolledWindow" id="scrolledwindow14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
- <object class="GtkTreeView" id="EventListTreeView">
+ <object class="GtkTreeView" id="mainListTreeView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection2"/>
+ <object class="GtkTreeSelection" id="treeview-selection20"/>
</child>
</object>
</child>
@@ -332,17 +249,17 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
+ <object class="GtkScrolledWindow" id="scrolledwindow15">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
- <object class="GtkTreeView" id="detailsEventTreeView">
+ <object class="GtkTreeView" id="mainDetailsTreeView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_top">1</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection3"/>
+ <object class="GtkTreeSelection" id="treeview-selection21"/>
</child>
</object>
</child>
@@ -360,16 +277,16 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkBox" id="box22">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkBox" id="box9">
+ <object class="GtkBox" id="hookTypeBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label5">
+ <object class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Event type:</property>
@@ -381,11 +298,12 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="anyEventCheckButton">
+ <object class="GtkCheckButton" id="hookAnyTypeCheckButton">
<property name="label" translatable="yes">any event</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -403,7 +321,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="typesEventComboBox">
+ <object class="GtkComboBox" id="hookTypesComboBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -414,11 +332,11 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box8">
+ <object class="GtkBox" id="box24">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label22">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Path:</property>
@@ -430,11 +348,12 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="anyEventPathCheckButton">
+ <object class="GtkCheckButton" id="hookAnyPathCheckButton">
<property name="label" translatable="yes">any path</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -452,7 +371,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="padPathEventLabel">
+ <object class="GtkLabel" id="hookPadPathLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -465,10 +384,9 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="startWatchingEventButton">
- <property name="label" translatable="yes">Add watch</property>
+ <object class="GtkButton" id="addNewHookButton">
+ <property name="label" translatable="yes">Add hook</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
@@ -479,7 +397,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label9">
+ <object class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Existing hooks:</property>
@@ -491,16 +409,16 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
+ <object class="GtkScrolledWindow" id="scrolledwindow16">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
- <object class="GtkTreeView" id="existingEventHooksTreeView">
+ <object class="GtkTreeView" id="existingHooksTreeView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection4"/>
+ <object class="GtkTreeSelection" id="treeview-selection22"/>
</child>
</object>
</child>
@@ -512,7 +430,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="removeSelectedEventHook">
+ <object class="GtkButton" id="removeSelectedHook">
<property name="label" translatable="yes">Remove selected</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -532,71 +450,34 @@
</packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Events</property>
+ <property name="label" translatable="yes">page 1</property>
</object>
<packing>
- <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box10">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkPaned" id="paned3">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="orientation">vertical</property>
- <property name="position">130</property>
- <property name="position_set">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="QueryListTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection6"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">True</property>
- </packing>
- </child>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow6">
+ <object class="GtkTreeView" id="logMessagesTreeView">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="detailsQueryTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection7"/>
- </child>
- </object>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection"/>
</child>
</object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
</child>
</object>
<packing>
@@ -606,41 +487,18 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box11">
+ <object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkBox" id="box13">
+ <object class="GtkCheckButton" id="watchLogCheckButton">
+ <property name="label" translatable="yes">Watch log messages</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Query type:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="anyQueryCheckButton">
- <property name="label" translatable="yes">any query</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0.5</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -649,9 +507,10 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="typesQueryComboBox">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Debug categories:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -660,49 +519,21 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box12">
+ <object class="GtkComboBoxText" id="debugCategoriesComboBoxText">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Path:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="anyQueryPathCheckButton">
- <property name="label" translatable="yes">any path</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="padPathQueryLabel">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">(none)</property>
+ <property name="label" translatable="yes">Log threshold:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -711,245 +542,25 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="startWatchingQueryButton">
- <property name="label" translatable="yes">Add watch</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Existing hooks:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkTreeView" id="existingQueryHooksTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection8"/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">6</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="removeSelectedQueryHook">
- <property name="label" translatable="yes">Remove selected</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">7</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Queries</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box15">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkPaned" id="paned4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="orientation">vertical</property>
- <property name="position">130</property>
- <property name="position_set">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow7">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="BusMessageListTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection9"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow8">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="detailsBusMessageTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection10"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box16">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Message types:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="anyBusMessageCheckButton">
- <property name="label" translatable="yes">any message</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="typesBusMessageComboBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="startWatchingBusMessageButton">
- <property name="label" translatable="yes">Add watch</property>
+ <object class="GtkEntry" id="logThresholdEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Existing hooks:</property>
+ <property name="width_chars">5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow9">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="existingBusMessageHooksTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection11"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="removeSelectedBusMessageHook">
- <property name="label" translatable="yes">Remove selected</property>
+ <object class="GtkCheckButton" id="overwriteCurrentThresholdCheckButton">
+ <property name="label" translatable="yes">Overwrite current threshold</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0.5</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -957,193 +568,35 @@
<property name="position">5</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Bus messages</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box17">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkPaned" id="paned5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="orientation">vertical</property>
- <property name="position">130</property>
- <property name="position_set">True</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow10">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="BufferListTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection14"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow11">
+ <object class="GtkButton" id="setThresholdButton">
+ <property name="label" translatable="yes">Set threshold</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="detailsBufferTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection15"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box18">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box14">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Path:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="anyBufferPathCheckButton">
- <property name="label" translatable="yes">any path</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="padPathBufferLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">(none)</property>
+ <property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="startWatchingBufferButton">
- <property name="label" translatable="yes">Add watch</property>
+ <object class="GtkButton" id="clearMessageLogsButton">
+ <property name="label" translatable="yes">Clear logs</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Existing hooks:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow12">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="existingBufferHooksTreeView">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection16"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="removeSelectedBufferHook">
- <property name="label" translatable="yes">Remove selected</property>
+ <object class="GtkButton" id="saveMessageLogsButton">
+ <property name="label" translatable="yes">Save logs to file</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -1151,7 +604,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">8</property>
</packing>
</child>
</object>
@@ -1163,17 +616,17 @@
</child>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">1</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label17">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Buffers</property>
+ <property name="label" translatable="yes">Log messages</property>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -1290,7 +743,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -1307,7 +760,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -1381,7 +834,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]