[gtk+] inspector: Drop unused python shell code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] inspector: Drop unused python shell code
- Date: Sat, 11 Oct 2014 05:00:11 +0000 (UTC)
commit bee90aa8c85ae0fcc7b3f3e40f2ed50ccf2615fd
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 10 20:33:08 2014 -0400
inspector: Drop unused python shell code
This is getting in the way; if somebody comes by who wants
to add scripting support back, we can resurrect this.
gtk/inspector/Makefile.am | 4 -
gtk/inspector/init.c | 7 -
gtk/inspector/python-hooks.c | 237 ------------------------
gtk/inspector/python-hooks.h | 38 ----
gtk/inspector/python-shell.c | 409 ------------------------------------------
gtk/inspector/python-shell.h | 68 -------
gtk/inspector/window.c | 45 -----
gtk/inspector/window.h | 3 -
gtk/inspector/window.ui | 45 +----
gtk/inspector/window.ui.h | 1 -
10 files changed, 8 insertions(+), 849 deletions(-)
---
diff --git a/gtk/inspector/Makefile.am b/gtk/inspector/Makefile.am
index 0069e6e..9ba9702 100644
--- a/gtk/inspector/Makefile.am
+++ b/gtk/inspector/Makefile.am
@@ -44,10 +44,6 @@ libgtkinspector_la_SOURCES = \
prop-list.c \
style-prop-list.h \
style-prop-list.c \
- python-hooks.h \
- python-hooks.c \
- python-shell.h \
- python-shell.c \
resource-list.h \
resource-list.c \
resources.h \
diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c
index 8d3ef35..4a6a5c5 100644
--- a/gtk/inspector/init.c
+++ b/gtk/inspector/init.c
@@ -34,8 +34,6 @@
#include "misc-info.h"
#include "object-hierarchy.h"
#include "prop-list.h"
-#include "python-hooks.h"
-#include "python-shell.h"
#include "resource-list.h"
#include "resources.h"
#include "signals-list.h"
@@ -48,10 +46,6 @@
void
gtk_inspector_init (void)
{
-#ifdef ENABLE_PYTHON
- gtk_inspector_python_init ();
-#endif
-
gtk_inspector_register_resource ();
g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
@@ -64,7 +58,6 @@ gtk_inspector_init (void)
g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY);
g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
- g_type_ensure (GTK_TYPE_INSPECTOR_PYTHON_SHELL);
g_type_ensure (GTK_TYPE_INSPECTOR_RESOURCE_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_SIGNALS_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_STYLE_PROP_LIST);
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index aca9676..4d7a05b 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -33,8 +33,6 @@
#include "css-editor.h"
#include "object-hierarchy.h"
#include "widget-tree.h"
-#include "python-hooks.h"
-#include "python-shell.h"
#include "size-groups.h"
#include "style-prop-list.h"
#include "data-list.h"
@@ -49,18 +47,6 @@
G_DEFINE_TYPE (GtkInspectorWindow, gtk_inspector_window, GTK_TYPE_WINDOW)
-static gboolean
-on_widget_tree_button_press (GtkInspectorWidgetTree *wt,
- GdkEventButton *event,
- GtkInspectorWindow *iw)
-{
- if (event->button == 3)
- gtk_menu_popup (GTK_MENU (iw->widget_popup), NULL, NULL,
- NULL, NULL, event->button, event->time);
-
- return FALSE;
-}
-
static void
on_widget_tree_selection_changed (GtkInspectorWidgetTree *wt,
GtkInspectorWindow *iw)
@@ -109,39 +95,11 @@ on_widget_tree_selection_changed (GtkInspectorWidgetTree *wt,
}
static void
-on_send_widget_to_shell_activate (GtkWidget *menuitem,
- GtkInspectorWindow *iw)
-{
- gchar *str;
- GObject *object;
-
- object = gtk_inspector_widget_tree_get_selected_object (GTK_INSPECTOR_WIDGET_TREE (iw->widget_tree));
-
- if (!object)
- return;
-
- str = g_strdup_printf ("gtk_inspector.gobj(%p)", object);
- gtk_inspector_python_shell_append_text (GTK_INSPECTOR_PYTHON_SHELL (iw->python_shell),
- str,
- NULL);
-
- g_free (str);
- gtk_inspector_python_shell_focus (GTK_INSPECTOR_PYTHON_SHELL (iw->python_shell));
-}
-
-static void
gtk_inspector_window_init (GtkInspectorWindow *iw)
{
gtk_widget_init_template (GTK_WIDGET (iw));
gtk_window_group_add_window (gtk_window_group_new (), GTK_WINDOW (iw));
-
- if (gtk_inspector_python_is_enabled ())
- {
- gtk_widget_show (iw->python_shell);
- g_signal_connect (G_OBJECT (iw->widget_tree), "button-press-event",
- G_CALLBACK (on_widget_tree_button_press), iw);
- }
}
static void
@@ -173,8 +131,6 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, style_prop_list);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_editor);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, python_shell);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_popup);
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);
@@ -184,7 +140,6 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
gtk_widget_class_bind_template_callback (widget_class, gtk_inspector_on_inspect);
gtk_widget_class_bind_template_callback (widget_class, on_widget_tree_selection_changed);
- gtk_widget_class_bind_template_callback (widget_class, on_send_widget_to_shell_activate);
}
GtkWidget *
diff --git a/gtk/inspector/window.h b/gtk/inspector/window.h
index ce6fe16..b719f16 100644
--- a/gtk/inspector/window.h
+++ b/gtk/inspector/window.h
@@ -47,7 +47,6 @@ typedef struct
GtkWidget *child_prop_list;
GtkWidget *signals_list;
GtkWidget *style_prop_list;
- GtkWidget *python_shell;
GtkWidget *classes_list;
GtkWidget *widget_css_editor;
GtkWidget *object_hierarchy;
@@ -58,8 +57,6 @@ typedef struct
GtkWidget *misc_info;
GtkWidget *gestures;
- GtkWidget *widget_popup;
-
GtkWidget *selected_widget;
GtkWidget *flash_widget;
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 50b611d..4c307c3 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -5,16 +5,6 @@
<property name="icon-name">find-location-symbolic</property>
<property name="icon-size">4</property>
</object>
- <object class="GtkMenu" id="widget_popup">
- <property name="visible">True</property>
- <child>
- <object class="GtkMenuItem">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Send Widget to Shell</property>
- <signal name="activate" handler="on_send_widget_to_shell_activate"/>
- </object>
- </child>
- </object>
<template class="GtkInspectorWindow" parent="GtkWindow">
<property name="default-height">500</property>
<property name="default-width">1000</property>
@@ -62,37 +52,18 @@
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
- <object class="GtkPaned">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="hscrollbar-policy">automatic</property>
+ <property name="vscrollbar-policy">always</property>
+ <property name="shadow-type">in</property>
+ <property name="width-request">250</property>
+ <property name="expand">True</property>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkInspectorWidgetTree" id="widget_tree">
<property name="visible">True</property>
- <property name="hscrollbar-policy">automatic</property>
- <property name="vscrollbar-policy">always</property>
- <property name="shadow-type">in</property>
- <property name="width-request">250</property>
- <property name="expand">True</property>
- <child>
- <object class="GtkInspectorWidgetTree" id="widget_tree">
- <property name="visible">True</property>
- <signal name="widget-changed" handler="on_widget_tree_selection_changed"/>
- </object>
- </child>
+ <signal name="widget-changed" handler="on_widget_tree_selection_changed"/>
</object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkInspectorPythonShell" id="python_shell">
- <property name="visible">False</property>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
- </packing>
</child>
</object>
<packing>
diff --git a/gtk/inspector/window.ui.h b/gtk/inspector/window.ui.h
index 8d8a113..88188ac 100644
--- a/gtk/inspector/window.ui.h
+++ b/gtk/inspector/window.ui.h
@@ -1,4 +1,3 @@
-N_("Send Widget to Shell");
N_("Select an Object");
N_("Miscellaneous");
N_("Properties");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]