Issue adding new panel to gnome-control-panel



To whom can help me.

I'm creating a test panel in ubuntu-gnome 16.04 and I'm stuck on how to add a new panel to the gnome-control-panel v3.20.1. When I try to compile it the process fails with the following error:

/usr/bin/ld: warning: libkrb5.so.26, needed by //usr/lib/x86_64-linux-gnu/libgssapi.so.3, may conflict with libkrb5.so.3
cc-panel-loader.o:(.data+0x98): undefined reference to `cc_test_panel_get_type'
collect2: error: ld returned 1 exit status
Makefile:740: fallo en las instrucciones para el objetivo 'gnome-control-center'


My test panel header is as follow:

$ cat panels/test/cc-test-panel.h

#ifndef _CC_TEST_PANEL_H
#define _CC_TEST_PANEL_H

#include <shell/cc-shell.h>

G_BEGIN_DECLS

#define CC_TYPE_TEST_PANEL cc_test_panel_get_type()
#define CC_TEST_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_TEST_PANEL, CcTestPanel))
#define CC_TEST_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_TEST_PANEL, CcTestPanelClass))
#define CC_IS_TEST_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_TEST_PANEL))
#define CC_IS_TEST_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_TEST_PANEL))
#define CC_TEST_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_TEST_PANEL, CcTestPanelClass))

typedef struct _CcTestPanel CcTestPanel;
typedef struct _CcTestPanelClass CcTestPanelClass;
typedef struct _CcTestPanelPrivate CcTestPanelPrivate;

struct _CcTestPanel {
    CcPanel parent;
    CcTestPanelPrivate *priv;
};

struct _CcTestPanelClass {
    CcPanelClass parent_class;
};

GType cc_test_panel_get_type (void) G_GNUC_CONST;

G_END_DECLS

#endif /* _CC_TEST_PANEL_H */

and my cc-panel-loader.c patch is this:

--- gnome-control-center/gnome-control-center-3.20.1/shell/cc-panel-loader.c    2017-03-01 14:53:18.641426171 +0000
+++ gnome-control-center-origin/gnome-control-center-3.20.1/shell/cc-panel-loader.c    2017-02-27 18:19:16.000000000 +0000
@@ -50,7 +50,6 @@
 extern GType cc_color_panel_get_type (void);
 extern GType cc_date_time_panel_get_type (void);
 extern GType cc_display_panel_get_type (void);
-extern GType cc_test_panel_get_type (void);
 extern GType cc_info_panel_get_type (void);
 extern GType cc_keyboard_panel_get_type (void);
 extern GType cc_mouse_panel_get_type (void);
@@ -95,7 +94,6 @@
   PANEL_TYPE("color",            cc_color_panel_get_type        ),
   PANEL_TYPE("datetime",         cc_date_time_panel_get_type    ),
   PANEL_TYPE("display",          cc_display_panel_get_type      ),
-  PANEL_TYPE("test",         cc_test_panel_get_type     ),
   PANEL_TYPE("info",             cc_info_panel_get_type         ),
   PANEL_TYPE("keyboard",         cc_keyboard_panel_get_type     ),
   PANEL_TYPE("mouse",            cc_mouse_panel_get_type        ),

How can I fix this,
Thanks in advance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]