shell: add a autocleanup function to CcPanel
CcPanel uses the old boilerplate code from GLib, which does not set an autocleanup function. The lack of a cleanup function implies that panels cannot use G_DECLARE_{FINAL,DERIVABLE}_TYPE, making the code stick to the old boilerplate. This patch adds a cleanup function to CcPanel. It doesn't move CcPanel to G_DECLARE_DERIVABLE_TYPE() because it'd break the CcPanel's subclasses. https://bugzilla.gnome.org/show_bug.cgi?id=769063
This commit is contained in:
parent
42a360eed6
commit
61d7abe795
1 changed files with 2 additions and 0 deletions
|
@ -50,6 +50,8 @@ typedef struct CcPanelPrivate CcPanelPrivate;
|
||||||
typedef struct _CcPanel CcPanel;
|
typedef struct _CcPanel CcPanel;
|
||||||
typedef struct _CcPanelClass CcPanelClass;
|
typedef struct _CcPanelClass CcPanelClass;
|
||||||
|
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CcPanel, g_object_unref)
|
||||||
|
|
||||||
/* cc-shell.h requires CcPanel, so make sure it is defined first */
|
/* cc-shell.h requires CcPanel, so make sure it is defined first */
|
||||||
#include "cc-shell.h"
|
#include "cc-shell.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue