mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
Revert "GDesktopAppInfo: add an accessor for StartupWMClass"
This reverts commit 3ccc4cf91d
.
This commit is contained in:
parent
3ccc4cf91d
commit
d0b429af48
@ -1463,7 +1463,6 @@ g_desktop_app_info_get_show_in
|
|||||||
g_desktop_app_info_get_generic_name
|
g_desktop_app_info_get_generic_name
|
||||||
g_desktop_app_info_get_categories
|
g_desktop_app_info_get_categories
|
||||||
g_desktop_app_info_get_keywords
|
g_desktop_app_info_get_keywords
|
||||||
g_desktop_app_info_get_startup_wm_class
|
|
||||||
g_desktop_app_info_set_desktop_env
|
g_desktop_app_info_set_desktop_env
|
||||||
GDesktopAppLaunchCallback
|
GDesktopAppLaunchCallback
|
||||||
g_desktop_app_info_launch_uris_as_manager
|
g_desktop_app_info_launch_uris_as_manager
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
#define GENERIC_NAME_KEY "GenericName"
|
#define GENERIC_NAME_KEY "GenericName"
|
||||||
#define FULL_NAME_KEY "X-GNOME-FullName"
|
#define FULL_NAME_KEY "X-GNOME-FullName"
|
||||||
#define KEYWORDS_KEY "Keywords"
|
#define KEYWORDS_KEY "Keywords"
|
||||||
#define STARTUP_WM_CLASS_KEY "StartupWMClass"
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -107,13 +106,13 @@ struct _GDesktopAppInfo
|
|||||||
char *binary;
|
char *binary;
|
||||||
char *path;
|
char *path;
|
||||||
char *categories;
|
char *categories;
|
||||||
char *startup_wm_class;
|
|
||||||
|
|
||||||
guint nodisplay : 1;
|
guint nodisplay : 1;
|
||||||
guint hidden : 1;
|
guint hidden : 1;
|
||||||
guint terminal : 1;
|
guint terminal : 1;
|
||||||
guint startup_notify : 1;
|
guint startup_notify : 1;
|
||||||
guint no_fuse : 1;
|
guint no_fuse : 1;
|
||||||
|
/* FIXME: what about StartupWMClass ? */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -186,7 +185,6 @@ g_desktop_app_info_finalize (GObject *object)
|
|||||||
g_free (info->binary);
|
g_free (info->binary);
|
||||||
g_free (info->path);
|
g_free (info->path);
|
||||||
g_free (info->categories);
|
g_free (info->categories);
|
||||||
g_free (info->startup_wm_class);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (g_desktop_app_info_parent_class)->finalize (object);
|
G_OBJECT_CLASS (g_desktop_app_info_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -332,7 +330,6 @@ g_desktop_app_info_load_from_keyfile (GDesktopAppInfo *info,
|
|||||||
info->no_fuse = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-GIO-NoFuse", NULL) != FALSE;
|
info->no_fuse = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-GIO-NoFuse", NULL) != FALSE;
|
||||||
info->hidden = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL) != FALSE;
|
info->hidden = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL) != FALSE;
|
||||||
info->categories = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_CATEGORIES, NULL);
|
info->categories = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_CATEGORIES, NULL);
|
||||||
info->startup_wm_class = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, STARTUP_WM_CLASS_KEY, NULL);
|
|
||||||
|
|
||||||
info->icon = NULL;
|
info->icon = NULL;
|
||||||
if (info->icon_name)
|
if (info->icon_name)
|
||||||
@ -3397,21 +3394,3 @@ g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *loo
|
|||||||
}
|
}
|
||||||
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
/**
|
|
||||||
* g_desktop_app_info_get_startup_wm_class:
|
|
||||||
* @app_info: a #GDesktopAppInfo that supports startup notify
|
|
||||||
*
|
|
||||||
* Retrieves the StartupWMClass field from @app_info. This represents the
|
|
||||||
* WM_CLASS property of the main window of the application, if launched through
|
|
||||||
* @app_info.
|
|
||||||
* Returns: (transfer none): the startup WM class, or NULL if none is set
|
|
||||||
* in the desktop file.
|
|
||||||
*/
|
|
||||||
const char *
|
|
||||||
g_desktop_app_info_get_startup_wm_class (GDesktopAppInfo *app_info)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (G_IS_DESKTOP_APP_INFO (app_info), NULL);
|
|
||||||
|
|
||||||
return app_info->startup_wm_class;
|
|
||||||
}
|
|
||||||
|
@ -56,7 +56,6 @@ const char * const *g_desktop_app_info_get_keywords (GDesktopAppInfo *info);
|
|||||||
gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
|
gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
|
||||||
gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
|
gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
|
||||||
const gchar *desktop_env);
|
const gchar *desktop_env);
|
||||||
const char * g_desktop_app_info_get_startup_wm_class (GDesktopAppInfo *info);
|
|
||||||
|
|
||||||
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
|
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
|
||||||
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
||||||
|
@ -106,7 +106,6 @@ g_desktop_app_info_get_is_hidden
|
|||||||
g_desktop_app_info_get_keywords
|
g_desktop_app_info_get_keywords
|
||||||
g_desktop_app_info_get_nodisplay
|
g_desktop_app_info_get_nodisplay
|
||||||
g_desktop_app_info_get_show_in
|
g_desktop_app_info_get_show_in
|
||||||
g_desktop_app_info_get_startup_wm_class
|
|
||||||
g_desktop_app_info_get_type
|
g_desktop_app_info_get_type
|
||||||
g_desktop_app_info_launch_uris_as_manager
|
g_desktop_app_info_launch_uris_as_manager
|
||||||
g_desktop_app_info_lookup_get_type
|
g_desktop_app_info_lookup_get_type
|
||||||
|
@ -8,5 +8,3 @@ Comment=GAppInfo example
|
|||||||
Comment[de]=GAppInfo Beispiel
|
Comment[de]=GAppInfo Beispiel
|
||||||
Exec=./appinfo-test --option
|
Exec=./appinfo-test --option
|
||||||
Icon=testicon
|
Icon=testicon
|
||||||
StartupNotify=true
|
|
||||||
StartupWMClass=appinfo-class
|
|
||||||
|
@ -273,20 +273,6 @@ test_environment (void)
|
|||||||
g_object_unref (ctx);
|
g_object_unref (ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
test_startup_wm_class (void)
|
|
||||||
{
|
|
||||||
GDesktopAppInfo *appinfo;
|
|
||||||
const char *wm_class;
|
|
||||||
|
|
||||||
appinfo = g_desktop_app_info_new_from_filename (SRCDIR "/appinfo-test.desktop");
|
|
||||||
wm_class = g_desktop_app_info_get_startup_wm_class (appinfo);
|
|
||||||
|
|
||||||
g_assert_cmpstr (wm_class, ==, "appinfo-class");
|
|
||||||
|
|
||||||
g_object_unref (appinfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -302,7 +288,6 @@ main (int argc, char *argv[])
|
|||||||
g_test_add_func ("/appinfo/tryexec", test_tryexec);
|
g_test_add_func ("/appinfo/tryexec", test_tryexec);
|
||||||
g_test_add_func ("/appinfo/associations", test_associations);
|
g_test_add_func ("/appinfo/associations", test_associations);
|
||||||
g_test_add_func ("/appinfo/environment", test_environment);
|
g_test_add_func ("/appinfo/environment", test_environment);
|
||||||
g_test_add_func ("/appinfo/startup-wm-class", test_startup_wm_class);
|
|
||||||
|
|
||||||
return g_test_run ();
|
return g_test_run ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user