-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let peas chew on v2.0 for python based plugins #595
base: main
Are you sure you want to change the base?
Conversation
Compiling with release + optimisation flags resulted in various memory corruption issues, noticably visible with python plugins but also the status indicator applet. These changes tidies up the derived type implementation along the guidelines given upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of this code doesn't look like modern GTK code; I'm not sure how long it's been since that tutorial has been updated.
@@ -16,16 +18,15 @@ | |||
|
|||
G_BEGIN_DECLS | |||
|
|||
G_DECLARE_DERIVABLE_TYPE(BudgiePopover, budgie_popover, BUDGIE, POPOVER, GtkPopover) | |||
#define T_TYPE_BUDGIE_POPOVER (budgie_popover_get_type ()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By modern conventions, the type should be BUDGIE_TYPE_POPOVER
.
} | ||
|
||
static void budgie_popover_finalize (GObject* object) { | ||
BudgiePopover *popover = budgie_popover_get_instance_private(T_BUDGIE_POPOVER (object)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here?
GtkStyleContext * style = gtk_widget_get_style_context(popover); | ||
gtk_style_context_add_class(style, "budgie-popover"); | ||
static void budgie_popover_class_init(BudgiePopoverClass* klass) { | ||
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(klass); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look like it's being used.
typedef struct { | ||
GtkPopover parent_instance; | ||
} BudgiePopoverPrivate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems wrong. I would look at this class in the trash applet, which is also a derivable type with private data.
Description
For wayland we need to ensure python based plugins are v2.0
Submitter Checklist
git rebase -i
(if needed)