universal-access: Use header bar in all the dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=724299
This commit is contained in:
Yosef Or Boczko 2014-03-24 09:26:55 +02:00
parent 8913ad2f36
commit 56e520cb00
4 changed files with 30 additions and 219 deletions

View file

@ -466,8 +466,6 @@ cc_ua_panel_init_seeing (CcUaPanel *self)
priv->toplevels = g_slist_prepend (priv->toplevels, dialog);
g_object_set_data (G_OBJECT (WID ("row_screen_reader")), "dialog", dialog);
g_signal_connect_swapped (WID ("screen_reader_done"), "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
@ -487,8 +485,6 @@ cc_ua_panel_init_seeing (CcUaPanel *self)
priv->toplevels = g_slist_prepend (priv->toplevels, dialog);
g_object_set_data (G_OBJECT (WID ("row_sound_keys")), "dialog", dialog);
g_signal_connect_swapped (WID ("sound_keys_done"), "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
}
@ -574,8 +570,6 @@ cc_ua_panel_init_hearing (CcUaPanel *self)
g_object_set_data (G_OBJECT (WID ("row_visual_alerts")), "dialog", dialog);
g_signal_connect_swapped (WID ("visual_alerts_done"), "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
@ -703,8 +697,6 @@ cc_ua_panel_init_keyboard (CcUaPanel *self)
g_object_set_data (G_OBJECT (WID ("row_accessx")), "dialog", dialog);
g_signal_connect_swapped (WID ("typing_done"), "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
}
@ -785,8 +777,6 @@ cc_ua_panel_init_mouse (CcUaPanel *self)
g_object_set_data (G_OBJECT (WID ("row_click_assist")), "dialog", dialog);
g_signal_connect_swapped (WID ("pointing_done"), "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
}

View file

@ -764,6 +764,7 @@
<property name="type_hint">dialog</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="can_focus">False</property>
@ -787,33 +788,6 @@
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="screen_reader_done">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
@ -863,9 +837,6 @@
</child>
</object>
</child>
<action-widgets>
<action-widget response="-5">screen_reader_done</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="sound_keys_dialog">
<property name="can_focus">False</property>
@ -874,6 +845,7 @@
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox3">
<property name="can_focus">False</property>
@ -896,33 +868,6 @@
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area3">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="sound_keys_done">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
@ -972,17 +917,38 @@
</child>
</object>
</child>
<action-widgets>
<action-widget response="-5">sound_keys_done</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="visual_alerts_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Visual Alerts</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar" id="visual_alerts_header_bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Visual Alerts</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="visual_alerts_test_button">
<property name="label" translatable="yes">_Test flash</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="valign">center</property>
<style>
<class name="text-button"/>
</style>
</object>
<packing>
<property name="pack_type">start</property>
</packing>
</child>
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox4">
<property name="can_focus">False</property>
@ -1005,48 +971,6 @@
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area4">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="visual_alerts_test_button">
<property name="label" translatable="yes">_Test flash</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="visual_alerts_done">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
@ -1135,7 +1059,6 @@
</child>
<action-widgets>
<action-widget response="0">visual_alerts_test_button</action-widget>
<action-widget response="-5">visual_alerts_done</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="typing_bouncekeys_delay_adjustment">
@ -1157,37 +1080,11 @@
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox5">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area5">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="typing_done">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
@ -1814,9 +1711,6 @@
</child>
</object>
</child>
<action-widgets>
<action-widget response="-5">typing_done</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="click_delay_adjustment">
<property name="lower">0.5</property>
@ -1845,37 +1739,12 @@
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox6">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area6">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="pointing_done">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
@ -2339,9 +2208,6 @@
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">pointing_done</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>

View file

@ -422,13 +422,6 @@ effects_slider_changed (GtkRange *slider, ZoomOptionsPrivate *priv)
}
}
static void
zoom_option_close_dialog_cb (GtkWidget *closer, ZoomOptionsPrivate *priv)
{
if (priv->dialog != NULL)
gtk_widget_hide (priv->dialog);
}
static void
zoom_options_dispose (GObject *object)
{
@ -589,10 +582,6 @@ zoom_options_init (ZoomOptions *self)
/* ... Window itself ... */
priv->dialog = WID ("magPrefsDialog");
w = WID ("closeButton");
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (zoom_option_close_dialog_cb),
priv);
g_signal_connect (G_OBJECT (priv->dialog), "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete),
NULL);

View file

@ -77,6 +77,7 @@
<property name="title" translatable="yes">Zoom Options</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
@ -145,38 +146,6 @@
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="closeButton">
<property name="label">gtk-close</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
@ -1208,9 +1177,6 @@
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">closeButton</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="xHairsThickness">
<property name="lower">1</property>