Last active
December 25, 2015 06:38
-
-
Save wjt/6933124 to your computer and use it in GitHub Desktop.
I'm trying to make a JavaScript subclass of GtkTreeStore, overriding the row_draggable() method on the GtkTreeDragSource interface. This crashes gjs. My hypothesis is that this is because GtkTreeStore already implements GtkTreeDragSource, but I haven't looked into it yet. gjs version 1.36.1-2 from Debian.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% gjs subclass-GtkTreeStore-override-row_draggable.js | |
** (gjs:14866): CRITICAL **: g_object_info_get_class_struct: assertion `GI_IS_OBJECT_INFO (info)' failed | |
zsh: segmentation fault gjs subclass-GtkTreeStore-override-row_draggable.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Lang = imports.lang; | |
const Gtk = imports.gi.Gtk; | |
const Model = new Lang.Class({ | |
Name: 'Model', | |
Extends: Gtk.TreeStore, | |
Implements: [ Gtk.TreeDragSource ] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Lang = imports.lang; | |
const Gtk = imports.gi.Gtk; | |
const Model = new Lang.Class({ | |
Name: 'Model', | |
Extends: Gtk.TreeStore, | |
Implements: [ Gtk.TreeDragSource ], | |
vfunc_row_draggable: function() { | |
return true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment