diff --git a/src/dorkbox/systemTray/ui/gtk/GtkBaseMenuItem.java b/src/dorkbox/systemTray/ui/gtk/GtkBaseMenuItem.java index 72b69c9..90c5f14 100644 --- a/src/dorkbox/systemTray/ui/gtk/GtkBaseMenuItem.java +++ b/src/dorkbox/systemTray/ui/gtk/GtkBaseMenuItem.java @@ -23,7 +23,7 @@ import com.sun.jna.Pointer; import dorkbox.systemTray.peer.EntryPeer; import dorkbox.systemTray.util.ImageResizeUtil; -import dorkbox.util.jna.linux.Gobject; +import dorkbox.util.jna.linux.GObject; import dorkbox.util.jna.linux.GtkEventDispatch; abstract @@ -110,7 +110,7 @@ class GtkBaseMenuItem implements EntryPeer { // To work around this issue, we destroy then recreate the menu every time something is changed. // always on EDT void onDeleteMenu(final Pointer parentNative) { - Gobject.g_object_force_floating(_native); // makes it a floating reference + GObject.g_object_force_floating(_native); // makes it a floating reference Gtk2.gtk_container_remove(parentNative, _native); } @@ -122,7 +122,7 @@ class GtkBaseMenuItem implements EntryPeer { // will also get: gsignal.c:2516: signal 'child-added' is invalid for instance '0x7f1df8244080' of type 'GtkMenu' Gtk2.gtk_menu_shell_append(parentNative, _native); - Gobject.g_object_ref_sink(_native); // undoes "floating" + GObject.g_object_ref_sink(_native); // undoes "floating" Gtk2.gtk_widget_show_all(_native); // necessary to guarantee widget is visible } diff --git a/src/dorkbox/systemTray/ui/gtk/GtkMenuItem.java b/src/dorkbox/systemTray/ui/gtk/GtkMenuItem.java index f68277d..e16ac61 100644 --- a/src/dorkbox/systemTray/ui/gtk/GtkMenuItem.java +++ b/src/dorkbox/systemTray/ui/gtk/GtkMenuItem.java @@ -27,7 +27,7 @@ import dorkbox.systemTray.SystemTray; import dorkbox.systemTray.peer.MenuItemPeer; import dorkbox.systemTray.util.EventDispatch; import dorkbox.util.jna.linux.GCallback; -import dorkbox.util.jna.linux.Gobject; +import dorkbox.util.jna.linux.GObject; import dorkbox.util.jna.linux.GtkEventDispatch; class GtkMenuItem extends GtkBaseMenuItem implements MenuItemPeer, GCallback { @@ -50,7 +50,7 @@ class GtkMenuItem extends GtkBaseMenuItem implements MenuItemPeer, GCallback { super(Gtk2.gtk_image_menu_item_new_with_mnemonic("")); this.parent = parent; - Gobject.g_signal_connect_object(_native, "activate", this, null, 0); + GObject.g_signal_connect_object(_native, "activate", this, null, 0); } diff --git a/src/dorkbox/systemTray/ui/gtk/GtkMenuItemCheckbox.java b/src/dorkbox/systemTray/ui/gtk/GtkMenuItemCheckbox.java index 222bfe2..533e891 100644 --- a/src/dorkbox/systemTray/ui/gtk/GtkMenuItemCheckbox.java +++ b/src/dorkbox/systemTray/ui/gtk/GtkMenuItemCheckbox.java @@ -32,7 +32,7 @@ import dorkbox.systemTray.util.HeavyCheckMark; import dorkbox.systemTray.util.ImageResizeUtil; import dorkbox.util.OSUtil; import dorkbox.util.jna.linux.GCallback; -import dorkbox.util.jna.linux.Gobject; +import dorkbox.util.jna.linux.GObject; import dorkbox.util.jna.linux.GtkEventDispatch; import dorkbox.util.jna.linux.GtkTheme; @@ -96,7 +96,7 @@ class GtkMenuItemCheckbox extends GtkBaseMenuItem implements CheckboxPeer, GCall super(useFakeCheckMark ? Gtk2.gtk_image_menu_item_new_with_mnemonic("") : Gtk2.gtk_check_menu_item_new_with_mnemonic("")); this.parent = parent; - handlerId = Gobject.g_signal_connect_object(_native, "activate", this, null, 0); + handlerId = GObject.g_signal_connect_object(_native, "activate", this, null, 0); if (useFakeCheckMark) { if (checkedFile == null) { @@ -124,9 +124,9 @@ class GtkMenuItemCheckbox extends GtkBaseMenuItem implements CheckboxPeer, GCall setCheckedIconForFakeCheckMarks(); } else { - Gobject.g_signal_handler_block(_native, handlerId); + GObject.g_signal_handler_block(_native, handlerId); Gtk2.gtk_check_menu_item_set_active(_native, false); - Gobject.g_signal_handler_unblock(_native, handlerId); + GObject.g_signal_handler_unblock(_native, handlerId); } } @@ -252,9 +252,9 @@ class GtkMenuItemCheckbox extends GtkBaseMenuItem implements CheckboxPeer, GCall // we assume this is consistent across ALL versions and variants of GTK // https://github.com/GNOME/gtk/blob/master/gtk/gtkcheckmenuitem.c#L317 // this disables the signal handler, then enables it - Gobject.g_signal_handler_block(_native, handlerId); + GObject.g_signal_handler_block(_native, handlerId); Gtk2.gtk_check_menu_item_set_active(_native, isChecked); - Gobject.g_signal_handler_unblock(_native, handlerId); + GObject.g_signal_handler_unblock(_native, handlerId); } } }); diff --git a/src/dorkbox/systemTray/ui/gtk/_AppIndicatorNativeTray.java b/src/dorkbox/systemTray/ui/gtk/_AppIndicatorNativeTray.java index b9efc95..896975f 100644 --- a/src/dorkbox/systemTray/ui/gtk/_AppIndicatorNativeTray.java +++ b/src/dorkbox/systemTray/ui/gtk/_AppIndicatorNativeTray.java @@ -26,7 +26,7 @@ import dorkbox.systemTray.Tray; import dorkbox.systemTray.gnomeShell.Extension; import dorkbox.systemTray.util.ImageResizeUtil; import dorkbox.util.jna.linux.AppIndicator; -import dorkbox.util.jna.linux.Gobject; +import dorkbox.util.jna.linux.GObject; import dorkbox.util.jna.linux.GtkEventDispatch; import dorkbox.util.jna.linux.structs.AppIndicatorInstanceStruct; @@ -210,7 +210,7 @@ class _AppIndicatorNativeTray extends Tray { // STATUS_PASSIVE hides the indicator savedAppIndicator.app_indicator_set_status(AppIndicator.STATUS_PASSIVE); Pointer p = savedAppIndicator.getPointer(); - Gobject.g_object_unref(p); + GObject.g_object_unref(p); GtkEventDispatch.shutdownGui(); } diff --git a/src/dorkbox/systemTray/ui/gtk/_GtkStatusIconNativeTray.java b/src/dorkbox/systemTray/ui/gtk/_GtkStatusIconNativeTray.java index ee4b95f..d4a251d 100644 --- a/src/dorkbox/systemTray/ui/gtk/_GtkStatusIconNativeTray.java +++ b/src/dorkbox/systemTray/ui/gtk/_GtkStatusIconNativeTray.java @@ -28,7 +28,7 @@ import dorkbox.systemTray.Tray; import dorkbox.systemTray.gnomeShell.Extension; import dorkbox.util.JavaFX; import dorkbox.util.jna.linux.GEventCallback; -import dorkbox.util.jna.linux.Gobject; +import dorkbox.util.jna.linux.GObject; import dorkbox.util.jna.linux.GtkEventDispatch; import dorkbox.util.jna.linux.structs.GdkEventButton; @@ -155,7 +155,7 @@ class _GtkStatusIconNativeTray extends Tray { void run() { // this hides the indicator Gtk2.gtk_status_icon_set_visible(trayIcon, false); - Gobject.g_object_unref(trayIcon); + GObject.g_object_unref(trayIcon); // mark for GC trayIcon = null; @@ -189,7 +189,7 @@ class _GtkStatusIconNativeTray extends Tray { } } }; - Gobject.g_signal_connect_object(trayIcon, "button_press_event", gtkCallback, null, 0); + GObject.g_signal_connect_object(trayIcon, "button_press_event", gtkCallback, null, 0); } });