mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Name our classes
In order to not end up with random names prefixed with Gjs_, give each class a proper name, so its easier to inspect and allows usage with UI files
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
const { GObject, Gtk } = imports.gi;
|
||||
const Misc = imports.src.misc;
|
||||
|
||||
var CustomButton = GObject.registerClass(
|
||||
var CustomButton = GObject.registerClass({
|
||||
GTypeName: 'ClapperCustomButton',
|
||||
},
|
||||
class ClapperCustomButton extends Gtk.Button
|
||||
{
|
||||
_init(opts)
|
||||
@@ -30,7 +32,9 @@ class ClapperCustomButton extends Gtk.Button
|
||||
}
|
||||
});
|
||||
|
||||
var IconToggleButton = GObject.registerClass(
|
||||
var IconToggleButton = GObject.registerClass({
|
||||
GTypeName: 'ClapperIconToggleButton',
|
||||
},
|
||||
class ClapperIconToggleButton extends CustomButton
|
||||
{
|
||||
_init(primaryIcon, secondaryIcon)
|
||||
|
Reference in New Issue
Block a user