[gtk+] inspector: Some more cleanup



commit f23c77b14b29c5767eb335c5b1c65e133b60a98a
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 9 19:07:32 2016 -0500

    inspector: Some more cleanup
    
    The last commit left some unused functions behind.

 gtk/inspector/css-node-tree.c  |   81 ----------------------------------------
 gtk/inspector/css-node-tree.ui |    1 -
 2 files changed, 0 insertions(+), 82 deletions(-)
---
diff --git a/gtk/inspector/css-node-tree.c b/gtk/inspector/css-node-tree.c
index 92e142c..dde4089 100644
--- a/gtk/inspector/css-node-tree.c
+++ b/gtk/inspector/css-node-tree.c
@@ -136,87 +136,6 @@ row_activated (GtkTreeView             *tv,
 }
 
 static void
-show_node_popover (GtkInspectorCssNodeTree *cnt,
-                   gdouble                  x,
-                   gdouble                  y)
-{
-  GtkTreeSelection *selection;
-  GdkRectangle rect;
-  GtkWidget *popover;
-  GtkWidget *box;
-  GtkWidget *button;
-  GtkTreeIter iter;
-  GtkTreePath *path;
-  NodePropEditor *npe;
-  GtkCssNode *node;
-
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (cnt->priv->node_tree));
-  if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
-    return;
-
-  path = gtk_tree_model_get_path (cnt->priv->node_model, &iter);
-  gtk_tree_view_get_cell_area (GTK_TREE_VIEW (cnt->priv->node_tree), path, NULL, &rect);
-  gtk_tree_view_convert_bin_window_to_widget_coords (GTK_TREE_VIEW (cnt->priv->node_tree),
-                                                     rect.x, rect.y, &rect.x, &rect.y);
-
-  rect.x = CLAMP (x - 20, 0, gtk_widget_get_allocated_width (cnt->priv->node_tree) - 40);
-  rect.width = 40;
-
-  node = gtk_tree_model_css_node_get_node_from_iter (GTK_TREE_MODEL_CSS_NODE (cnt->priv->node_model), &iter);
-
-  npe = g_new0 (NodePropEditor, 1);
-  npe->node = node;
-  npe->prop_name = "name";
-  npe->rect = rect;
-  npe->cnt = cnt;
-
-  popover = gtk_popover_new (GTK_WIDGET (cnt->priv->node_tree));
-
-  gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rect);
-  box = g_object_new (GTK_TYPE_BOX,
-                      "orientation", GTK_ORIENTATION_VERTICAL,
-                      "visible", TRUE,
-                      "margin", 10,
-                      NULL);
-  gtk_container_add (GTK_CONTAINER (popover), box);
-  button = g_object_new (GTK_TYPE_MODEL_BUTTON,
-                         "visible", TRUE,
-                         "text", _("Change name"),
-                         NULL);
-  g_signal_connect_swapped (button, "clicked", G_CALLBACK (show_node_prop_editor), npe);
-  g_object_set_data_full (G_OBJECT (popover), "prop-name", npe, g_free);
-
-  gtk_container_add (GTK_CONTAINER (box), button);
-
-  npe = g_new0 (NodePropEditor, 1);
-  npe->node = node;
-  npe->prop_name = "classes";
-  npe->rect = rect;
-  npe->cnt = cnt;
-
-  button = g_object_new (GTK_TYPE_MODEL_BUTTON,
-                         "visible", TRUE,
-                         "text", _("Change classes"),
-                         NULL);
-  g_signal_connect_swapped (button, "clicked", G_CALLBACK (show_node_prop_editor), npe);
-  g_object_set_data_full (G_OBJECT (popover), "prop-classes", npe, g_free);
-
-  gtk_container_add (GTK_CONTAINER (box), button);
-
-  button = g_object_new (GTK_TYPE_MODEL_BUTTON,
-                         "visible", TRUE,
-                         "text", _("CSS properties"),
-                         NULL);
-  gtk_container_add (GTK_CONTAINER (box), button);
-
-  gtk_tree_path_free (path);
-
-  gtk_widget_show (popover);
-
-  g_signal_connect (popover, "unmap", G_CALLBACK (gtk_widget_destroy), NULL);
-}
-
-static void
 gtk_inspector_css_node_tree_set_node (GtkInspectorCssNodeTree *cnt,
                                       GtkCssNode              *node);
 
diff --git a/gtk/inspector/css-node-tree.ui b/gtk/inspector/css-node-tree.ui
index 48e227f..3547737 100644
--- a/gtk/inspector/css-node-tree.ui
+++ b/gtk/inspector/css-node-tree.ui
@@ -28,7 +28,6 @@
                 <property name="enable-search">0</property>
                 <property name="enable-grid-lines">vertical</property>
                 <signal name="row-activated" handler="row_activated"/>
-                <signal name="button-press-event" handler="button_pressed"/>
                 <child internal-child="selection">
                   <object class="GtkTreeSelection">
                     <signal name="changed" handler="selection_changed"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]