Drop gdk_set_program_class

Together with the corresponding getter.
This is x11-specific functionality.
This commit is contained in:
Matthias Clasen 2017-11-16 23:22:08 -05:00
parent d73898437f
commit 6bf215bc15
3 changed files with 1 additions and 60 deletions

View File

@ -5,13 +5,6 @@
<TITLE>General</TITLE>
<FILE>general</FILE>
<SUBSECTION>
gdk_get_program_class
gdk_set_program_class
<SUBSECTION>
gdk_flush
<SUBSECTION>
GdkGrabStatus
@ -92,6 +85,7 @@ gdk_display_device_is_grabbed
gdk_display_beep
gdk_display_sync
gdk_display_flush
gdk_flush
gdk_display_close
gdk_display_is_closed
gdk_display_get_event

View File

@ -200,13 +200,6 @@ gdk_pre_parse (void)
gdk_ensure_resources ();
/* We set the fallback program class here, rather than lazily in
* gdk_get_program_class, since we don't want -name to override it.
*/
gdk_progclass = g_strdup (g_get_prgname ());
if (gdk_progclass && gdk_progclass[0])
gdk_progclass[0] = g_ascii_toupper (gdk_progclass[0]);
#ifdef G_ENABLE_DEBUG
{
gchar *debug_string = getenv("GDK_DEBUG");
@ -710,44 +703,3 @@ gdk_threads_add_timeout_seconds (guint interval,
return gdk_threads_add_timeout_seconds_full (G_PRIORITY_DEFAULT,
interval, function, data, NULL);
}
/**
* gdk_get_program_class:
*
* Gets the program class. Unless the program class has explicitly
* been set with gdk_set_program_class() or with the `--class`
* commandline option, the default value is the program name (determined
* with g_get_prgname()) with the first character converted to uppercase.
*
* Returns: the program class.
*/
const char *
gdk_get_program_class (void)
{
if (gdk_progclass)
return gdk_progclass;
return "GTK+ Application";
}
/**
* gdk_set_program_class:
* @program_class: a string.
*
* Sets the program class. The X11 backend uses the program class to set
* the class name part of the `WM_CLASS` property on
* toplevel windows; see the ICCCM.
*
* The program class can still be overridden with the --class command
* line option.
*/
void
gdk_set_program_class (const char *program_class)
{
if (gdk_progclass_overridden)
return;
g_free (gdk_progclass);
gdk_progclass = g_strdup (program_class);
}

View File

@ -40,11 +40,6 @@ G_BEGIN_DECLS
#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
GDK_AVAILABLE_IN_ALL
const gchar * gdk_get_program_class (void);
GDK_AVAILABLE_IN_ALL
void gdk_set_program_class (const gchar *program_class);
/* Push and pop error handlers for X errors
*/
GDK_AVAILABLE_IN_ALL