mir: clean up an ugly function
This commit is contained in:
@ -901,178 +901,93 @@ setting_changed (GSettings *settings,
|
||||
g_free (schema_id);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_known_setting (const gchar *name)
|
||||
static const gchar * const KNOWN_SETTINGS[] =
|
||||
{
|
||||
if (!g_strcmp0 (name, "gtk-double-click-time"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-double-click-distance"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-cursor-blink"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-cursor-blink-time"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-cursor-blink-timeout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-split-cursor"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-theme-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-icon-theme-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-fallback-icon-theme"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-key-theme-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-menu-bar-accel"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-dnd-drag-threshold"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-font-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-icon-sizes"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-modules"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-xft-antialias"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-xft-hinting"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-xft-hintstyle"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-xft-rgba"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-xft-dpi"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-cursor-theme-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-cursor-theme-size"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-alternative-button-order"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-alternative-sort-arrows"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-show-input-method-menu"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-show-unicode-menu"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-timeout-initial"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-timeout-repeat"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-timeout-expand"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-color-scheme"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-animations"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-touchscreen-mode"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-tooltip-timeout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-tooltip-browse-timeout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-tooltip-browse-mode-timeout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-keynav-cursor-only"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-keynav-wrap-around"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-error-bell"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "color-hash"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-file-chooser-backend"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-print-backends"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-print-preview-command"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-mnemonics"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-accels"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-recent-files-limit"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-im-module"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-recent-files-max-age"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-fontconfig-timestamp"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-sound-theme-name"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-input-feedback-sounds"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-event-sounds"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-tooltips"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-toolbar-style"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-toolbar-icon-size"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-auto-mnemonics"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-primary-button-warps-slider"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-visible-focus"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-application-prefer-dark-theme"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-button-images"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-entry-select-on-focus"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-entry-password-hint-timeout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-menu-images"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-menu-bar-popup-delay"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-scrolled-window-placement"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-can-change-accels"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-menu-popup-delay"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-menu-popdown-delay"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-label-select-on-focus"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-color-palette"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-im-preedit-style"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-im-status-style"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-shell-shows-app-menu"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-shell-shows-menubar"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-shell-shows-desktop"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-decoration-layout"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-titlebar-double-click"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-titlebar-middle-click"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-titlebar-right-click"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-dialogs-use-header"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-enable-primary-paste"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-recent-files-enabled"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-long-press-time"))
|
||||
return TRUE;
|
||||
if (!g_strcmp0 (name, "gtk-keynav-use-caret"))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
"gtk-double-click-time",
|
||||
"gtk-double-click-distance",
|
||||
"gtk-cursor-blink",
|
||||
"gtk-cursor-blink-time",
|
||||
"gtk-cursor-blink-timeout",
|
||||
"gtk-split-cursor",
|
||||
"gtk-theme-name",
|
||||
"gtk-icon-theme-name",
|
||||
"gtk-fallback-icon-theme",
|
||||
"gtk-key-theme-name",
|
||||
"gtk-menu-bar-accel",
|
||||
"gtk-dnd-drag-threshold",
|
||||
"gtk-font-name",
|
||||
"gtk-icon-sizes",
|
||||
"gtk-modules",
|
||||
"gtk-xft-antialias",
|
||||
"gtk-xft-hinting",
|
||||
"gtk-xft-hintstyle",
|
||||
"gtk-xft-rgba",
|
||||
"gtk-xft-dpi",
|
||||
"gtk-cursor-theme-name",
|
||||
"gtk-cursor-theme-size",
|
||||
"gtk-alternative-button-order",
|
||||
"gtk-alternative-sort-arrows",
|
||||
"gtk-show-input-method-menu",
|
||||
"gtk-show-unicode-menu",
|
||||
"gtk-timeout-initial",
|
||||
"gtk-timeout-repeat",
|
||||
"gtk-timeout-expand",
|
||||
"gtk-color-scheme",
|
||||
"gtk-enable-animations",
|
||||
"gtk-touchscreen-mode",
|
||||
"gtk-tooltip-timeout",
|
||||
"gtk-tooltip-browse-timeout",
|
||||
"gtk-tooltip-browse-mode-timeout",
|
||||
"gtk-keynav-cursor-only",
|
||||
"gtk-keynav-wrap-around",
|
||||
"gtk-error-bell",
|
||||
"color-hash",
|
||||
"gtk-file-chooser-backend",
|
||||
"gtk-print-backends",
|
||||
"gtk-print-preview-command",
|
||||
"gtk-enable-mnemonics",
|
||||
"gtk-enable-accels",
|
||||
"gtk-recent-files-limit",
|
||||
"gtk-im-module",
|
||||
"gtk-recent-files-max-age",
|
||||
"gtk-fontconfig-timestamp",
|
||||
"gtk-sound-theme-name",
|
||||
"gtk-enable-input-feedback-sounds",
|
||||
"gtk-enable-event-sounds",
|
||||
"gtk-enable-tooltips",
|
||||
"gtk-toolbar-style",
|
||||
"gtk-toolbar-icon-size",
|
||||
"gtk-auto-mnemonics",
|
||||
"gtk-primary-button-warps-slider",
|
||||
"gtk-visible-focus",
|
||||
"gtk-application-prefer-dark-theme",
|
||||
"gtk-button-images",
|
||||
"gtk-entry-select-on-focus",
|
||||
"gtk-entry-password-hint-timeout",
|
||||
"gtk-menu-images",
|
||||
"gtk-menu-bar-popup-delay",
|
||||
"gtk-scrolled-window-placement",
|
||||
"gtk-can-change-accels",
|
||||
"gtk-menu-popup-delay",
|
||||
"gtk-menu-popdown-delay",
|
||||
"gtk-label-select-on-focus",
|
||||
"gtk-color-palette",
|
||||
"gtk-im-preedit-style",
|
||||
"gtk-im-status-style",
|
||||
"gtk-shell-shows-app-menu",
|
||||
"gtk-shell-shows-menubar",
|
||||
"gtk-shell-shows-desktop",
|
||||
"gtk-decoration-layout",
|
||||
"gtk-titlebar-double-click",
|
||||
"gtk-titlebar-middle-click",
|
||||
"gtk-titlebar-right-click",
|
||||
"gtk-dialogs-use-header",
|
||||
"gtk-enable-primary-paste",
|
||||
"gtk-recent-files-enabled",
|
||||
"gtk-long-press-time",
|
||||
"gtk-keynav-use-caret",
|
||||
NULL
|
||||
};
|
||||
|
||||
static gboolean
|
||||
gdk_mir_screen_get_setting (GdkScreen *screen,
|
||||
@ -1092,7 +1007,7 @@ gdk_mir_screen_get_setting (GdkScreen *screen,
|
||||
|
||||
if (!variant)
|
||||
{
|
||||
if (!is_known_setting (name))
|
||||
if (!g_strv_contains (KNOWN_SETTINGS, name))
|
||||
g_warning ("unknown setting: %s", name);
|
||||
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user