summaryrefslogtreecommitdiff
path: root/capplets/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/accessibility')
-rw-r--r--capplets/accessibility/at-properties/Makefile.am8
-rw-r--r--capplets/accessibility/at-properties/at-enable-dialog.glade394
-rw-r--r--capplets/accessibility/at-properties/at-enable-dialog.ui347
-rw-r--r--capplets/accessibility/at-properties/main.c108
4 files changed, 406 insertions, 451 deletions
diff --git a/capplets/accessibility/at-properties/Makefile.am b/capplets/accessibility/at-properties/Makefile.am
index 4249d3ce6..3f3ee4afd 100644
--- a/capplets/accessibility/at-properties/Makefile.am
+++ b/capplets/accessibility/at-properties/Makefile.am
@@ -16,14 +16,14 @@ pixmap_DATA = \
at-startup.png \
at-support.png
-gladedir = $(pkgdatadir)/glade
-glade_DATA = at-enable-dialog.glade
+uidir = $(pkgdatadir)/ui
+ui_DATA = at-enable-dialog.ui
INCLUDES = $(AT_CAPPLET_CFLAGS) \
$(GNOMECC_CAPPLETS_CFLAGS) \
- -DGLADEDIR=\""$(gladedir)"\" \
+ -DUIDIR=\""$(uidir)"\" \
-DPIXMAPDIR=\""$(pixmapdir)"\" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\""
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA) $(pixmap_DATA)
+EXTRA_DIST = $(ui_DATA) $(pixmap_DATA)
diff --git a/capplets/accessibility/at-properties/at-enable-dialog.glade b/capplets/accessibility/at-properties/at-enable-dialog.glade
deleted file mode 100644
index 4035fea0e..000000000
--- a/capplets/accessibility/at-properties/at-enable-dialog.glade
+++ /dev/null
@@ -1,394 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<widget class="GtkDialog" id="at_properties_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Assistive Technologies Preferences</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="at_help_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="at_close_logout_button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">0</property>
- <property name="label" translatable="yes">Close and _Log Out</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="at_close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="at_support_frame">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Assistive Technologies&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="at_enable_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="at_pref_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="label" translatable="yes">_Preferred Applications</property>
- <property name="use_underline">True</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Jump to Preferred Applications dialog</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="at_enable_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable assistive technologies</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Changes to enable assistive technologies will not take effect until your next log in.</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="at_applications_frame">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="pref_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Preferences&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="at_applications_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="keyboard_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="label" translatable="yes">_Keyboard Accessibility</property>
- <property name="use_underline">True</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Jump to the Keyboard Accessibility dialog</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="mouse_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="label" translatable="yes">_Mouse Accessibility</property>
- <property name="use_underline">True</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Jump to the Mouse Accessibility dialog</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="login_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="label" translatable="yes">Accessible Lo_gin</property>
- <property name="use_underline">True</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Jump to the Accessible Login dialog</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/accessibility/at-properties/at-enable-dialog.ui b/capplets/accessibility/at-properties/at-enable-dialog.ui
new file mode 100644
index 000000000..8abfd6cc7
--- /dev/null
+++ b/capplets/accessibility/at-properties/at-enable-dialog.ui
@@ -0,0 +1,347 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="at_properties_dialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Assistive Technologies Preferences</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="at_support_frame">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Assistive Technologies&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="at_enable_image">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="at_pref_button">
+ <property name="label" translatable="yes">_Preferred Applications</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">pref_button_img</property>
+ <property name="use_underline">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="at_pref_button-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes">Jump to Preferred Applications dialog</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="at_enable_toggle">
+ <property name="label" translatable="yes">_Enable assistive technologies</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="at_enable_toggle-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes">Changes to enable assistive technologies will not take effect until your next log in.</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="at_applications_frame">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="pref_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preferences&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="at_applications_image">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="keyboard_button">
+ <property name="label" translatable="yes">_Keyboard Accessibility</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">keyboard_button_img</property>
+ <property name="use_underline">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="keyboard_button-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes">Jump to the Keyboard Accessibility dialog</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">5</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="mouse_button">
+ <property name="label" translatable="yes">_Mouse Accessibility</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">mouse_button_img</property>
+ <property name="use_underline">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="mouse_button-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes">Jump to the Mouse Accessibility dialog</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="login_button">
+ <property name="label" translatable="yes">Accessible Lo_gin</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">login_button_img</property>
+ <property name="use_underline">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="login_button-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes">Jump to the Accessible Login dialog</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">5</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="at_help_button">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="at_close_logout_button">
+ <property name="label" translatable="yes">Close and _Log Out</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">close_logout_button_img</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="at_close_button">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">at_help_button</action-widget>
+ <action-widget response="0">at_close_logout_button</action-widget>
+ <action-widget response="-7">at_close_button</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkImage" id="close_logout_button_img">
+ <property name="visible">True</property>
+ <property name="stock">gtk-quit</property>
+ </object>
+ <object class="GtkImage" id="pref_button_img">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ </object>
+ <object class="GtkImage" id="keyboard_button_img">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ </object>
+ <object class="GtkImage" id="mouse_button_img">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ </object>
+ <object class="GtkImage" id="login_button_img">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ </object>
+</interface>
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index e613adbd9..84065f2e4 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -1,7 +1,6 @@
#include <config.h>
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
-#include <glade/glade.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -25,46 +24,44 @@ enum {
static gboolean initial_state;
-static GladeXML *
-create_dialog (void)
+static GtkBuilder *
+create_builder (void)
{
- GladeXML *dialog;
+ GtkBuilder *builder;
+ GError *error = NULL;
+ static const gchar *uifile = UIDIR "/at-enable-dialog.ui";
- dialog = glade_xml_new (GLADEDIR "/at-enable-dialog.glade", "at_properties_dialog", NULL);
+ builder = gtk_builder_new ();
- if (dialog) {
- GtkWidget *image;
+ if (gtk_builder_add_from_file (builder, uifile, &error)) {
+ GObject *object;
gchar *prog;
- image = gtk_image_new_from_stock (GTK_STOCK_QUIT, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (WID ("at_close_logout_button")), image);
-
- image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (WID ("at_pref_button")), image);
-
- image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (WID ("keyboard_button")), image);
-
- image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (WID ("mouse_button")), image);
-
- image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (WID ("login_button")), image);
-
- gtk_image_set_from_file (GTK_IMAGE (WID ("at_enable_image")),
+ object = gtk_builder_get_object (builder, "at_enable_image");
+ gtk_image_set_from_file (GTK_IMAGE (object),
PIXMAPDIR "/at-startup.png");
- gtk_image_set_from_file (GTK_IMAGE (WID ("at_applications_image")),
+ object = gtk_builder_get_object (builder,
+ "at_applications_image");
+ gtk_image_set_from_file (GTK_IMAGE (object),
PIXMAPDIR "/at-support.png");
prog = g_find_program_in_path ("gdmsetup");
- if (prog == NULL)
- gtk_widget_hide (WID ("login_button"));
+ if (prog == NULL) {
+ object = gtk_builder_get_object (builder,
+ "login_button");
+ gtk_widget_hide (GTK_WIDGET (object));
+ }
g_free (prog);
+ } else {
+ g_warning ("Could not load UI: %s", error->message);
+ g_error_free (error);
+ g_object_unref (builder);
+ builder = NULL;
}
- return dialog;
+ return builder;
}
static void
@@ -168,18 +165,20 @@ cb_dialog_response (GtkDialog *dialog, gint response_id)
}
static void
-close_logout_update (GladeXML *dialog)
+close_logout_update (GtkBuilder *builder)
{
GConfClient *client = gconf_client_get_default ();
gboolean curr_state = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
+ GObject *btn = gtk_builder_get_object (builder,
+ "at_close_logout_button");
- gtk_widget_set_sensitive (WID ("at_close_logout_button"), initial_state != curr_state);
+ gtk_widget_set_sensitive (GTK_WIDGET (btn), initial_state != curr_state);
g_object_unref (client);
}
static void
at_enable_toggled (GtkToggleButton *toggle_button,
- GladeXML *dialog)
+ GtkBuilder *builder)
{
GConfClient *client = gconf_client_get_default ();
gboolean is_enabled = gtk_toggle_button_get_active (toggle_button);
@@ -192,11 +191,12 @@ at_enable_toggled (GtkToggleButton *toggle_button,
static void
at_enable_update (GConfClient *client,
- GladeXML *dialog)
+ GtkBuilder *builder)
{
gboolean is_enabled = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
+ GObject *btn = gtk_builder_get_object (builder, "at_enable_toggle");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_enable_toggle")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (btn),
is_enabled);
}
@@ -211,10 +211,11 @@ at_enable_changed (GConfClient *client,
}
static void
-setup_dialog (GladeXML *dialog)
+setup_dialog (GtkBuilder *builder)
{
GConfClient *client;
GtkWidget *widget;
+ GObject *object;
GObject *peditor;
client = gconf_client_get_default ();
@@ -222,40 +223,41 @@ setup_dialog (GladeXML *dialog)
gconf_client_add_dir (client, ACCESSIBILITY_KEY_DIR,
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- widget = WID ("at_enable_toggle");
- g_signal_connect (widget, "toggled",
+ object = gtk_builder_get_object (builder, "at_enable_toggle");
+ g_signal_connect (object, "toggled",
G_CALLBACK (at_enable_toggled),
- dialog);
+ builder);
peditor = gconf_peditor_new_boolean (NULL, ACCESSIBILITY_KEY,
- widget,
+ GTK_WIDGET (object),
NULL);
initial_state = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
- at_enable_update (client, dialog);
+ at_enable_update (client, builder);
gconf_client_notify_add (client, ACCESSIBILITY_KEY_DIR,
at_enable_changed,
- dialog, NULL, NULL);
+ builder, NULL, NULL);
- g_signal_connect (G_OBJECT (WID("at_pref_button")),
- "clicked",
+ object = gtk_builder_get_object (builder, "at_pref_button");
+ g_signal_connect (object, "clicked",
G_CALLBACK (cb_at_preferences), NULL);
- g_signal_connect (G_OBJECT (WID("keyboard_button")),
- "clicked",
+ object = gtk_builder_get_object (builder, "keyboard_button");
+ g_signal_connect (object, "clicked",
G_CALLBACK (cb_keyboard_preferences), NULL);
- g_signal_connect (G_OBJECT (WID("mouse_button")),
- "clicked",
+ object = gtk_builder_get_object (builder, "mouse_button");
+ g_signal_connect (object, "clicked",
G_CALLBACK (cb_mouse_preferences), NULL);
- g_signal_connect (G_OBJECT (WID("login_button")),
- "clicked",
+ object = gtk_builder_get_object (builder, "login_button");
+ g_signal_connect (object, "clicked",
G_CALLBACK (cb_login_preferences), NULL);
- widget = WID ("at_properties_dialog");
+ widget = GTK_WIDGET (gtk_builder_get_object (builder,
+ "at_properties_dialog"));
capplet_set_icon (widget, "preferences-desktop-accessibility");
g_signal_connect (G_OBJECT (widget),
@@ -270,21 +272,21 @@ setup_dialog (GladeXML *dialog)
int
main (int argc, char *argv[])
{
- GladeXML *dialog;
+ GtkBuilder *builder;
capplet_init (NULL, &argc, &argv);
activate_settings_daemon ();
- dialog = create_dialog ();
+ builder = create_builder ();
- if (dialog) {
+ if (builder) {
- setup_dialog (dialog);
+ setup_dialog (builder);
gtk_main ();
- g_object_unref (dialog);
+ g_object_unref (builder);
}
return 0;