shell: replace GMenu loading code with an hardcoded list of panels
Now that we don't allow or load external panels, using libgnome-menu is just overengineering. We can get the same results with less code by keeping a static list of function pointers. This reduces the number of places one needs to patch to add a new panel. Also, this way we avoid registering all types at startup, and if we want we can switch to load panel desktop files in a separate thread. https://bugzilla.gnome.org/show_bug.cgi?id=690165
This commit is contained in:
parent
0e7192e676
commit
0139f68416
8 changed files with 266 additions and 246 deletions
|
@ -43,13 +43,8 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* use: CC_PANEL_REGISTER (PluginName, plugin_name)
|
||||
*/
|
||||
#define CC_PANEL_REGISTER(PluginName, plugin_name) \
|
||||
G_DEFINE_TYPE_WITH_CODE (PluginName, plugin_name, CC_TYPE_PANEL, \
|
||||
GIOExtensionPoint *ep; \
|
||||
ep = g_io_extension_point_register ("CcPanel"); \
|
||||
g_io_extension_point_set_required_type (ep, CC_TYPE_PANEL); \
|
||||
g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, \
|
||||
g_define_type_id, PANEL_ID, 0))
|
||||
#define CC_PANEL_REGISTER(PluginName, plugin_name) \
|
||||
G_DEFINE_TYPE (PluginName, plugin_name, CC_TYPE_PANEL)
|
||||
|
||||
typedef struct CcPanelPrivate CcPanelPrivate;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue