forked from AuroraMiddleware/gtk
inspector: Derive recorder from GtkWidget
This commit is contained in:
parent
fa848e94d2
commit
8d0773fad0
@ -19,6 +19,7 @@
|
||||
|
||||
#include "recorder.h"
|
||||
|
||||
#include <gtk/gtkbinlayout.h>
|
||||
#include <gtk/gtkbox.h>
|
||||
#include <gtk/gtkfilechooserdialog.h>
|
||||
#include <gtk/gtklabel.h>
|
||||
@ -72,7 +73,7 @@ enum
|
||||
|
||||
static GParamSpec *props[LAST_PROP] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorRecorder, gtk_inspector_recorder, GTK_TYPE_BIN)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorRecorder, gtk_inspector_recorder, GTK_TYPE_WIDGET)
|
||||
|
||||
static GListModel *
|
||||
create_render_node_list_model (GskRenderNode **nodes,
|
||||
@ -330,7 +331,7 @@ create_widget_for_render_node (gpointer row_item,
|
||||
g_object_set_data_full (G_OBJECT (row), "make-sure-its-not-unreffed", g_object_ref (row_item), g_object_unref);
|
||||
|
||||
arrow = gtk_builtin_icon_new ("expander");
|
||||
gtk_container_add (GTK_CONTAINER (title), arrow);
|
||||
gtk_button_set_child (GTK_BUTTON (title), arrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1282,6 +1283,8 @@ gtk_inspector_recorder_class_init (GtkInspectorRecorderClass *klass)
|
||||
gtk_widget_class_bind_template_callback (widget_class, render_node_list_selection_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, render_node_save);
|
||||
gtk_widget_class_bind_template_callback (widget_class, node_property_activated);
|
||||
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef _GTK_INSPECTOR_RECORDER_H_
|
||||
#define _GTK_INSPECTOR_RECORDER_H_
|
||||
|
||||
#include <gtk/gtkbin.h>
|
||||
#include <gtk/gtkwidget.h>
|
||||
|
||||
#define GTK_TYPE_INSPECTOR_RECORDER (gtk_inspector_recorder_get_type())
|
||||
#define GTK_INSPECTOR_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_RECORDER, GtkInspectorRecorder))
|
||||
@ -32,12 +32,12 @@ typedef struct _GtkInspectorRecorderPrivate GtkInspectorRecorderPrivate;
|
||||
|
||||
typedef struct _GtkInspectorRecorder
|
||||
{
|
||||
GtkBin parent;
|
||||
GtkWidget parent;
|
||||
} GtkInspectorRecorder;
|
||||
|
||||
typedef struct _GtkInspectorRecorderClass
|
||||
{
|
||||
GtkBinClass parent;
|
||||
GtkWidgetClass parent;
|
||||
} GtkInspectorRecorderClass;
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -1,6 +1,6 @@
|
||||
<interface domain="gtk40">
|
||||
<object class="GListStore" id="recordings"/>
|
||||
<template class="GtkInspectorRecorder" parent="GtkBin">
|
||||
<template class="GtkInspectorRecorder" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
|
Loading…
Reference in New Issue
Block a user