GNOME Bugzilla – Bug 781976
inspector: add popup menu to copy the css path
Last modified: 2018-05-02 18:25:49 UTC
Being able to copy the path is a useful starting point to use in the css tab
Created attachment 350765 [details] [review] patch
Did you mean the tree on the CSS Selector page? If so, my Bug 771950 is a dupe of this.
I guess it is... try my patch and see if it helps :) IIRC it is very rough, but better than nothing...
Review of attachment 350765 [details] [review]: It certainly works! Thanks for this. I haven't found myself wanting this in a while so hope I actually end up needing it in the future, now :) I wonder if it would be nice also to have a way to copy with newlines and indentation as seen in the tree. However, that might be too much work for a little debugging helper... I'd point out one functional point and 2 whitespace issues: ::: gtk/inspector/selector.c @@ +67,3 @@ + + menu_item = gtk_menu_item_new_with_label (_("Copy")); + g_signal_connect(menu_item, "activate", G_CALLBACK (on_popup_menu_action_copy), oh); Add a space before the ( @@ +98,3 @@ + GtkInspectorSelector *oh) +{ + if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_SECONDARY) It's probably simpler and better practice to check if (gdk_event_triggers_context_menu (event)) @@ +130,3 @@ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + object_class->dispose = gtk_inspector_selector_dispose; Use 2 spaces, not a tab
*** Bug 771950 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/811.