static void cc_ua_panel_init_seeing (CcUaPanel *self) { CcUaPanelPrivate *priv = self->priv; g_settings_bind_with_mapping (priv->interface_settings, KEY_GTK_THEME, WID (priv->builder, "seeing_contrast_switch"), "active", G_SETTINGS_BIND_DEFAULT, get_contrast_mapping, set_contrast_mapping, self, NULL); g_settings_bind_with_mapping (priv->interface_settings, KEY_TEXT_SCALING_FACTOR, WID (priv->builder, "seeing_large_text_switch"), "active", G_SETTINGS_BIND_DEFAULT, get_large_text_mapping, set_large_text_mapping, priv->interface_settings, NULL); g_settings_bind (priv->kb_settings, "togglekeys-enable", WID (priv->builder, "seeing_toggle_keys_switch"), "active", G_SETTINGS_BIND_DEFAULT); priv->shell_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gnome.Shell", G_BUS_NAME_WATCHER_FLAGS_NONE, (GBusNameAppearedCallback) shell_appeared_cb, (GBusNameVanishedCallback) shell_vanished_cb, self, NULL); g_signal_connect (WID (priv->builder, "seeing_zoom_preferences_button"), "clicked", G_CALLBACK (zoom_options_launch_cb), self); g_settings_bind (priv->application_settings, "screen-magnifier-enabled", WID (priv->builder, "seeing_zoom_switch"), "active", G_SETTINGS_BIND_DEFAULT); settings_on_off_editor_new (priv, priv->application_settings, "screen-reader-enabled", WID (priv->builder, "seeing_reader_switch"), NULL); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_enable_keybinding_label", "magnifier"); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_in_keybinding_label", "magnifier-zoom-in"); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_out_keybinding_label", "magnifier-zoom-out"); cc_ua_panel_set_shortcut_label (self, "seeing_reader_enable_keybinding_label", "screenreader"); }
static void cc_ua_panel_init_seeing (CcUaPanel *self) { CcUaPanelPrivate *priv = self->priv; text_scaling_factor_notify_cb (priv->interface_settings, "text-scaling-factor", self); g_signal_connect (priv->interface_settings, "changed::text-scaling-factor", G_CALLBACK (text_scaling_factor_notify_cb), self); g_signal_connect (WID (priv->builder, "seeing_contrast_combobox"), "changed", G_CALLBACK (contrast_combobox_changed_cb), self); g_signal_connect (WID (priv->builder, "seeing_text_size_combobox"), "changed", G_CALLBACK (text_scaling_factor_combo_box_changed), self); g_settings_bind (priv->kb_settings, "togglekeys-enable", WID (priv->builder, "seeing_enable_toggle_keys_checkbutton"), "active", G_SETTINGS_BIND_DEFAULT); priv->shell_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gnome.Shell", G_BUS_NAME_WATCHER_FLAGS_NONE, (GBusNameAppearedCallback) shell_appeared_cb, (GBusNameVanishedCallback) shell_vanished_cb, self, NULL); g_signal_connect (WID (priv->builder, "seeing_zoom_preferences_button"), "clicked", G_CALLBACK (zoom_options_launch_cb), self); g_settings_bind (priv->application_settings, "screen-magnifier-enabled", WID (priv->builder, "seeing_zoom_switch"), "active", G_SETTINGS_BIND_DEFAULT); settings_on_off_editor_new (priv, priv->application_settings, "screen-reader-enabled", WID (priv->builder, "seeing_reader_switch"), NULL); cc_ua_panel_set_shortcut_label (self, "seeing_contrast_toggle_keybinding_label", "toggle-contrast"); cc_ua_panel_set_shortcut_label (self, "seeing_increase_size_keybinding_label", "increase-text-size"); cc_ua_panel_set_shortcut_label (self, "seeing_decrease_size_keybinding_label", "decrease-text-size"); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_enable_keybinding_label", "magnifier"); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_in_keybinding_label", "magnifier-zoom-in"); cc_ua_panel_set_shortcut_label (self, "seeing_zoom_out_keybinding_label", "magnifier-zoom-out"); cc_ua_panel_set_shortcut_label (self, "seeing_reader_enable_keybinding_label", "screenreader"); }