shell: only include items identified as settings panels in the list
Simplify the category requirements and do not include items that are not settings panels.
This commit is contained in:
parent
dfd897496b
commit
d50dadc8ac
7 changed files with 10 additions and 66 deletions
|
@ -6,7 +6,7 @@ Icon=preferences-desktop-wallpaper
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;
|
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
|
||||||
OnlyShowIn=GNOME;
|
OnlyShowIn=GNOME;
|
||||||
X-GNOME-Settings-Panel=background
|
X-GNOME-Settings-Panel=background
|
||||||
# Translators: those are keywords for the background control-center panel
|
# Translators: those are keywords for the background control-center panel
|
||||||
|
|
|
@ -6,7 +6,7 @@ Icon=gnome-power-manager
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;
|
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;HardwareSettings
|
||||||
OnlyShowIn=GNOME;
|
OnlyShowIn=GNOME;
|
||||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||||
|
|
|
@ -6,7 +6,7 @@ Icon=preferences-desktop-locale
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;
|
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
|
||||||
OnlyShowIn=GNOME;
|
OnlyShowIn=GNOME;
|
||||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||||
|
|
|
@ -6,7 +6,7 @@ Icon=system-lock-screen
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;
|
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
|
||||||
OnlyShowIn=GNOME;
|
OnlyShowIn=GNOME;
|
||||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||||
|
|
|
@ -6,7 +6,7 @@ Icon=system-users
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=System;Settings;X-GNOME-Settings-Panel;
|
Categories=System;Settings;X-GNOME-Settings-Panel;X-GNOME-SystemSettings
|
||||||
OnlyShowIn=GNOME;
|
OnlyShowIn=GNOME;
|
||||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||||
|
|
|
@ -89,12 +89,8 @@ activate_panel (GnomeControlCenter *shell,
|
||||||
const gchar *icon_name)
|
const gchar *icon_name)
|
||||||
{
|
{
|
||||||
GnomeControlCenterPrivate *priv = shell->priv;
|
GnomeControlCenterPrivate *priv = shell->priv;
|
||||||
GAppInfo *appinfo;
|
|
||||||
GError *err = NULL;
|
|
||||||
GdkAppLaunchContext *ctx;
|
|
||||||
GType panel_type = G_TYPE_INVALID;
|
GType panel_type = G_TYPE_INVALID;
|
||||||
GList *panels, *l;
|
GList *panels, *l;
|
||||||
GKeyFile *key_file;
|
|
||||||
|
|
||||||
/* check if there is an plugin that implements this panel */
|
/* check if there is an plugin that implements this panel */
|
||||||
panels = g_io_extension_point_get_extensions (priv->extension_point);
|
panels = g_io_extension_point_get_extensions (priv->extension_point);
|
||||||
|
@ -164,44 +160,6 @@ activate_panel (GnomeControlCenter *shell,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* if a plugin was not found, then start app directly */
|
|
||||||
|
|
||||||
if (err)
|
|
||||||
{
|
|
||||||
g_warning ("Error starting \"%s\": %s", desktop_file, err->message);
|
|
||||||
|
|
||||||
g_error_free (err);
|
|
||||||
err = NULL;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
key_file = g_key_file_new ();
|
|
||||||
g_key_file_load_from_file (key_file, desktop_file, 0, &err);
|
|
||||||
|
|
||||||
appinfo = (GAppInfo*) g_desktop_app_info_new_from_keyfile (key_file);
|
|
||||||
|
|
||||||
g_key_file_free (key_file);
|
|
||||||
key_file = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
ctx = gdk_app_launch_context_new ();
|
|
||||||
gdk_app_launch_context_set_screen (ctx, gdk_screen_get_default ());
|
|
||||||
gdk_app_launch_context_set_timestamp (ctx, priv->last_time);
|
|
||||||
|
|
||||||
g_app_info_launch (appinfo, NULL, G_APP_LAUNCH_CONTEXT (ctx), &err);
|
|
||||||
|
|
||||||
g_object_unref (appinfo);
|
|
||||||
g_object_unref (ctx);
|
|
||||||
|
|
||||||
if (err)
|
|
||||||
{
|
|
||||||
g_warning ("Error starting \"%s\": %s", desktop_file, err->message);
|
|
||||||
g_error_free (err);
|
|
||||||
err = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -52,11 +52,6 @@
|
||||||
<Category>X-GNOME-PersonalSettings</Category>
|
<Category>X-GNOME-PersonalSettings</Category>
|
||||||
<Category>X-GNOME-Settings-Panel</Category>
|
<Category>X-GNOME-Settings-Panel</Category>
|
||||||
</And>
|
</And>
|
||||||
<And>
|
|
||||||
<Category>Settings</Category>
|
|
||||||
<Category>DesktopSettings</Category>
|
|
||||||
<Category>X-GNOME-Settings-Panel</Category>
|
|
||||||
</And>
|
|
||||||
</Include>
|
</Include>
|
||||||
</Menu> <!-- End Personal -->
|
</Menu> <!-- End Personal -->
|
||||||
|
|
||||||
|
@ -80,20 +75,8 @@
|
||||||
<Include>
|
<Include>
|
||||||
<And>
|
<And>
|
||||||
<Category>Settings</Category>
|
<Category>Settings</Category>
|
||||||
|
<Category>X-GNOME-SystemSettings</Category>
|
||||||
<Category>X-GNOME-Settings-Panel</Category>
|
<Category>X-GNOME-Settings-Panel</Category>
|
||||||
<Or>
|
|
||||||
<Category>X-GNOME-SystemSettings</Category>
|
|
||||||
<And>
|
|
||||||
<Category>System</Category>
|
|
||||||
<Not>
|
|
||||||
<Or>
|
|
||||||
<Category>X-GNOME-PersonalSettings</Category>
|
|
||||||
<Category>DesktopSettings</Category>
|
|
||||||
<Category>HardwareSettings</Category>
|
|
||||||
</Or>
|
|
||||||
</Not>
|
|
||||||
</And>
|
|
||||||
</Or>
|
|
||||||
</And>
|
</And>
|
||||||
</Include>
|
</Include>
|
||||||
</Menu> <!-- End System -->
|
</Menu> <!-- End System -->
|
||||||
|
@ -105,9 +88,12 @@
|
||||||
<Include>
|
<Include>
|
||||||
<And>
|
<And>
|
||||||
<Category>Settings</Category>
|
<Category>Settings</Category>
|
||||||
|
<Category>X-GNOME-Settings-Panel</Category>
|
||||||
<Not>
|
<Not>
|
||||||
<Or>
|
<Or>
|
||||||
<Category>X-GNOME-Settings-Panel</Category>
|
<Category>X-GNOME-PersonalSettings</Category>
|
||||||
|
<Category>X-GNOME-SystemSettings</Category>
|
||||||
|
<Category>HardwareSettings</Category>
|
||||||
<Filename>gnome-control-center.desktop</Filename>
|
<Filename>gnome-control-center.desktop</Filename>
|
||||||
</Or>
|
</Or>
|
||||||
</Not>
|
</Not>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue