summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-04-02 21:47:02 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-04-02 21:47:02 +0000
commitd7987e73c99b6bfba65abc1fd578bc501ae881fc (patch)
tree2155b0149efb782faf77b5fc54824d22d0b333f6 /gtk
parente13a8102b4114a87374868e887dca4905476e3c3 (diff)
downloadgtk+-d7987e73c99b6bfba65abc1fd578bc501ae881fc.tar.gz
inspector: Drop the css selector page
This was just not useful enough to keep around.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/inspector/init.c2
-rw-r--r--gtk/inspector/meson.build1
-rw-r--r--gtk/inspector/selector.c100
-rw-r--r--gtk/inspector/selector.h59
-rw-r--r--gtk/inspector/selector.ui43
-rw-r--r--gtk/inspector/window.c3
-rw-r--r--gtk/inspector/window.ui9
7 files changed, 0 insertions, 217 deletions
diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c
index 6e413861c0..dd10edb34a 100644
--- a/gtk/inspector/init.c
+++ b/gtk/inspector/init.c
@@ -41,7 +41,6 @@
#include "prop-list.h"
#include "recorder.h"
#include "resource-list.h"
-#include "selector.h"
#include "size-groups.h"
#include "statistics.h"
#include "visual.h"
@@ -77,7 +76,6 @@ gtk_inspector_init (void)
g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_RECORDER);
g_type_ensure (GTK_TYPE_INSPECTOR_RESOURCE_LIST);
- g_type_ensure (GTK_TYPE_INSPECTOR_SELECTOR);
g_type_ensure (GTK_TYPE_INSPECTOR_SIZE_GROUPS);
g_type_ensure (GTK_TYPE_INSPECTOR_STATISTICS);
g_type_ensure (GTK_TYPE_INSPECTOR_VISUAL);
diff --git a/gtk/inspector/meson.build b/gtk/inspector/meson.build
index 2c6b6d0e71..35b24c8de7 100644
--- a/gtk/inspector/meson.build
+++ b/gtk/inspector/meson.build
@@ -28,7 +28,6 @@ inspector_sources = files(
'recording.c',
'renderrecording.c',
'resource-list.c',
- 'selector.c',
'size-groups.c',
'startrecording.c',
'statistics.c',
diff --git a/gtk/inspector/selector.c b/gtk/inspector/selector.c
deleted file mode 100644
index b950ac6b9b..0000000000
--- a/gtk/inspector/selector.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-#include <glib/gi18n-lib.h>
-
-#include "selector.h"
-
-#include "gtktreeselection.h"
-#include "gtktreestore.h"
-#include "gtktreeview.h"
-#include "gtkwidgetpath.h"
-#include "gtklabel.h"
-
-
-enum
-{
- COLUMN_SELECTOR
-};
-
-struct _GtkInspectorSelectorPrivate
-{
- GtkTreeStore *model;
- GtkTreeView *tree;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorSelector, gtk_inspector_selector, GTK_TYPE_BOX)
-
-static void
-gtk_inspector_selector_init (GtkInspectorSelector *oh)
-{
- oh->priv = gtk_inspector_selector_get_instance_private (oh);
- gtk_widget_init_template (GTK_WIDGET (oh));
-}
-
-static void
-gtk_inspector_selector_class_init (GtkInspectorSelectorClass *klass)
-{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/selector.ui");
- gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorSelector, model);
- gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorSelector, tree);
-}
-
-void
-gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
- GObject *object)
-{
- GtkTreeIter iter, parent;
- gint i;
- GtkWidget *widget;
- gchar *path, **words;
-
- gtk_tree_store_clear (oh->priv->model);
-
- if (!GTK_IS_WIDGET (object))
- {
- gtk_widget_hide (GTK_WIDGET (oh));
- return;
- }
-
- widget = GTK_WIDGET (object);
-
- path = gtk_widget_path_to_string (gtk_widget_get_path (widget));
- words = g_strsplit (path, " ", 0);
-
- for (i = 0; words[i]; i++)
- {
- gtk_tree_store_append (oh->priv->model, &iter, i ? &parent : NULL);
- gtk_tree_store_set (oh->priv->model, &iter,
- COLUMN_SELECTOR, words[i],
- -1);
- parent = iter;
- }
-
- g_strfreev (words);
- g_free (path);
-
- gtk_tree_view_expand_all (oh->priv->tree);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (oh->priv->tree), &iter);
-
- gtk_widget_show (GTK_WIDGET (oh));
-}
-
-// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/selector.h b/gtk/inspector/selector.h
deleted file mode 100644
index 60fb4d3b1f..0000000000
--- a/gtk/inspector/selector.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef _GTK_INSPECTOR_SELECTOR_H_
-#define _GTK_INSPECTOR_SELECTOR_H_
-
-#include <gtk/gtkbox.h>
-
-#define GTK_TYPE_INSPECTOR_SELECTOR (gtk_inspector_selector_get_type())
-#define GTK_INSPECTOR_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_SELECTOR, GtkInspectorSelector))
-#define GTK_INSPECTOR_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INSPECTOR_SELECTOR, GtkInspectorSelectorClass))
-#define GTK_INSPECTOR_IS_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INSPECTOR_SELECTOR))
-#define GTK_INSPECTOR_IS_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_INSPECTOR_SELECTOR))
-#define GTK_INSPECTOR_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INSPECTOR_SELECTOR, GtkInspectorSelectorClass))
-
-
-typedef struct _GtkInspectorSelectorPrivate GtkInspectorSelectorPrivate;
-
-typedef struct _GtkInspectorSelector
-{
- GtkBox parent;
- GtkInspectorSelectorPrivate *priv;
-} GtkInspectorSelector;
-
-typedef struct _GtkInspectorSelectorClass
-{
- GtkBoxClass parent;
-} GtkInspectorSelectorClass;
-
-G_BEGIN_DECLS
-
-GType gtk_inspector_selector_get_type (void);
-void gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
- GObject *object);
-
-G_END_DECLS
-
-#endif // _GTK_INSPECTOR_SELECTOR_H_
-
-// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/selector.ui b/gtk/inspector/selector.ui
deleted file mode 100644
index 7344067084..0000000000
--- a/gtk/inspector/selector.ui
+++ /dev/null
@@ -1,43 +0,0 @@
-<interface domain="gtk40">
- <object class="GtkTreeStore" id="model">
- <columns>
- <column type="gchararray"/>
- </columns>
- </object>
- <template class="GtkInspectorSelector" parent="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkScrolledWindow">
- <property name="hscrollbar-policy">never</property>
- <property name="expand">1</property>
- <child>
- <object class="GtkTreeView" id="tree">
- <property name="model">model</property>
- <property name="enable-search">0</property>
- <property name="headers-visible">0</property>
- <property name="show-expanders">0</property>
- <property name="level-indentation">18</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection">
- <property name="mode">none</property>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn">
- <property name="title" translatable="yes">Selector</property>
- <child>
- <object class="GtkCellRendererText">
- <property name="scale">0.8</property>
- </object>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </template>
-</interface>
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index ef73340995..716ca2e1e0 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -34,7 +34,6 @@
#include "css-node-tree.h"
#include "object-hierarchy.h"
#include "object-tree.h"
-#include "selector.h"
#include "size-groups.h"
#include "data-list.h"
#include "actions.h"
@@ -73,7 +72,6 @@ set_selected_object (GtkInspectorWindow *iw,
gtk_inspector_prop_list_set_object (GTK_INSPECTOR_PROP_LIST (iw->child_prop_list), selected);
gtk_inspector_object_hierarchy_set_object (GTK_INSPECTOR_OBJECT_HIERARCHY (iw->object_hierarchy), selected);
- gtk_inspector_selector_set_object (GTK_INSPECTOR_SELECTOR (iw->selector), selected);
gtk_inspector_misc_info_set_object (GTK_INSPECTOR_MISC_INFO (iw->misc_info), selected);
gtk_inspector_css_node_tree_set_object (GTK_INSPECTOR_CSS_NODE_TREE (iw->widget_css_node_tree), selected);
gtk_inspector_size_groups_set_object (GTK_INSPECTOR_SIZE_GROUPS (iw->size_groups), selected);
@@ -322,7 +320,6 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_recorder);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_title);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, selector);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, size_groups);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, data_list);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, actions);
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 1ad9d9fa5e..3a77f55323 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -342,15 +342,6 @@
</child>
<child>
<object class="GtkStackPage">
- <property name="name">selector</property>
- <property name="title" translatable="yes">CSS Selector</property>
- <property name="child">
- <object class="GtkInspectorSelector" id="selector"/>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
<property name="name">css-nodes</property>
<property name="title" translatable="yes">CSS Nodes</property>
<property name="child">