mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
44 stars 47 forks source link

add new macro MATE_SETTINGS_PLUGIN_REGISTER_WITH_PRIVATE #282

Closed yetist closed 5 years ago

yetist commented 5 years ago

This macro can used to fix deprecated g_type_class_add_private in some plugins//-plugin.c files.

yetist commented 5 years ago

You can see the use of this macro in the devel branch: https://github.com/mate-desktop/mate-settings-daemon/tree/devel

monsta commented 5 years ago

Looks like all the plugins have a private struct, so maybe just replace old macro with new one?

yetist commented 5 years ago

@monsta

Looks like all the plugins have a private struct, so maybe just replace old macro with new one?

Yes, I think we can simple replace the old macro with new one.

@vkareh

This builds/runs fine for me, but when running the devel branch, it gives me these errors:

OK, I confirm that, thank you.

yetist commented 5 years ago

The last commit only changed the exists macro MATE_SETTINGS_PLUGIN_REGISTER. The devel branch has been updated for verify.

raveit65 commented 5 years ago

@monsta @yetist How should that work with existing code without merging devel-branch at the same time? xsession-errors.log after session start.

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.277: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.458: g_type_class_add_private() called multiple times for the same type

** (mate-settings-daemon:2846): WARNING **: 15:27:20.464: There was a problem when setting QT_AUTO_SCREEN_SCALE_FACTOR=0: GDBus.Error:org.gnome.SessionManager.NotInInitialization: Setenv interface is only available during the Initialization phase

** (mate-settings-daemon:2846): WARNING **: 15:27:20.465: There was a problem when setting QT_SCALE_FACTOR=2: GDBus.Error:org.gnome.SessionManager.NotInInitialization: Setenv interface is only available during the Initialization phase

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.480: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.482: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.482: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.487: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.488: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.495: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.496: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.511: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.514: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.529: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.531: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.532: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.533: g_type_class_add_private() called multiple times for the same type

(mate-settings-daemon:2846): GLib-GObject-WARNING **: 15:27:20.533: g_type_class_add_private() called multiple times for the same type

The old marco name needs to be removed later when all plugins are ready for the new macro name.