shell: Drop questionable vfuncs

Both ShellAppSystem and ShellTrayManager are used as singletons, which
significantly reduces the usefulness of inheritance - it's unlikely for
extensions to inherit from them anyway (AND use any of the vfuncs), so
drop them to allow defining the types as final in an upcoming commit.
This commit is contained in:
Florian Müllner 2015-10-15 22:13:18 +02:00
parent e25502aeb2
commit 58f3b7c748
4 changed files with 4 additions and 14 deletions

View File

@ -64,8 +64,8 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
g_signal_new ("installed-changed",
SHELL_TYPE_APP_SYSTEM,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ShellAppSystemClass, installed_changed),
NULL, NULL, NULL,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}

View File

@ -29,9 +29,6 @@ struct _ShellAppSystem
struct _ShellAppSystemClass
{
GObjectClass parent_class;
void (*installed_changed)(ShellAppSystem *appsys, gpointer user_data);
void (*favorites_changed)(ShellAppSystem *appsys, gpointer user_data);
};
GType shell_app_system_get_type (void) G_GNUC_CONST;

View File

@ -152,7 +152,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
g_signal_new ("tray-icon-added",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_added),
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
@ -160,7 +160,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
g_signal_new ("tray-icon-removed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_removed),
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);

View File

@ -29,13 +29,6 @@ struct _ShellTrayManager
struct _ShellTrayManagerClass
{
GObjectClass parent_class;
void (* tray_icon_added) (ShellTrayManager *manager,
ClutterActor *icon,
const char *lowercase_wm_class);
void (* tray_icon_removed) (ShellTrayManager *manager,
ClutterActor *icon);
};
GType shell_tray_manager_get_type (void);