[epiphany] Use header bar in clear personal data dialog
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Use header bar in clear personal data dialog
- Date: Fri, 7 Feb 2014 17:53:46 +0000 (UTC)
commit dd285fc1f03ba3341c77e258f4700e202df67007
Author: William Jon McCann <william jon mccann gmail com>
Date: Thu Feb 6 16:35:08 2014 -0500
Use header bar in clear personal data dialog
https://bugzilla.gnome.org/show_bug.cgi?id=723803
src/prefs-dialog.c | 4 +-
src/resources/clear-data-dialog.ui | 75 +++++++++++++++++++----------------
2 files changed, 44 insertions(+), 35 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 7aed1cc..74f67f8 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -958,7 +958,9 @@ clear_cache_button_clicked_cb (GtkWidget *button,
{
ClearDataDialog *clear_dialog;
- clear_dialog = g_object_new (EPHY_TYPE_CLEAR_DATA_DIALOG, NULL);
+ clear_dialog = g_object_new (EPHY_TYPE_CLEAR_DATA_DIALOG,
+ "use-header-bar", TRUE,
+ NULL);
clear_data_dialog_set_flags (clear_dialog, CLEAR_DATA_CACHE);
gtk_window_set_transient_for (GTK_WINDOW (clear_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (clear_dialog), TRUE);
diff --git a/src/resources/clear-data-dialog.ui b/src/resources/clear-data-dialog.ui
index f94fab0..d58bbf9 100644
--- a/src/resources/clear-data-dialog.ui
+++ b/src/resources/clear-data-dialog.ui
@@ -4,12 +4,50 @@
<!-- interface-requires gtk+ 3.10 -->
<template class="ClearDataDialog" parent="GtkDialog">
<property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Clear Personal Data</property>
+ <property name="border_width">10</property>
<property name="modal">True</property>
<property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar" id="headerbar1">
+ <property name="title" translatable="yes">Clear Personal Data</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show-close-button">False</property>
+ <child>
+ <object class="GtkButton" id="clear_button">
+ <property name="label" translatable="yes">C_lear</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_underline">True</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="destructive-action"/>
+ <class name="text-button"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">_Cancel</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_underline">True</property>
+ </object>
+ <packing>
+ <property name="pack_type">start</property>
+ </packing>
+ </child>
+ </object>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
@@ -18,40 +56,9 @@
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="cancel_button">
- <property name="label" translatable="yes">_Cancel</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_underline">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="clear_button">
- <property name="label" translatable="yes">C_lear</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="use_underline">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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]