Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fossfreedom
Copy link
Contributor

Description

For wayland we need to ensure python based plugins are v2.0

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

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.
Copy link
Member

@EbonJaeger EbonJaeger left a 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 ())
Copy link
Member

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));
Copy link
Member

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);
Copy link
Member

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.

Comment on lines +15 to +17
typedef struct {
GtkPopover parent_instance;
} BudgiePopoverPrivate;
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants