[epiphany] Hook up new cookies dialog to prefs dialog
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Hook up new cookies dialog to prefs dialog
- Date: Mon, 9 Dec 2013 19:56:22 +0000 (UTC)
commit fe3929b956467e05e1fd3d3b7d7d477963fd9c02
Author: William Jon McCann <william jon mccann gmail com>
Date: Mon Dec 9 17:39:04 2013 +0100
Hook up new cookies dialog to prefs dialog
https://bugzilla.gnome.org/show_bug.cgi?id=720113
src/prefs-dialog.c | 15 +++++++++++
src/resources/prefs-dialog.ui | 55 +++++++++++++++++++++++++++++++---------
2 files changed, 57 insertions(+), 13 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 1d4336d..5564c7c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -38,6 +38,7 @@
#include "ephy-settings.h"
#include "ephy-shell.h"
#include "clear-data-dialog.h"
+#include "cookies-dialog.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -131,6 +132,18 @@ prefs_dialog_finalize (GObject *object)
}
static void
+on_manage_cookies_button_clicked (GtkWidget *button,
+ PrefsDialog *dialog)
+{
+ CookiesDialog *cookies_dialog;
+
+ cookies_dialog = g_object_new (EPHY_TYPE_COOKIES_DIALOG, NULL);
+ gtk_window_set_transient_for (GTK_WINDOW (cookies_dialog), GTK_WINDOW (dialog));
+ gtk_window_set_modal (GTK_WINDOW (cookies_dialog), TRUE);
+ gtk_window_present (GTK_WINDOW (cookies_dialog));
+}
+
+static void
prefs_dialog_class_init (PrefsDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -174,6 +187,8 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog, lang_up_button);
gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog, lang_down_button);
gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog,
enable_spell_checking_checkbutton);
+
+ gtk_widget_class_bind_template_callback (widget_class, on_manage_cookies_button_clicked);
}
static void
diff --git a/src/resources/prefs-dialog.ui b/src/resources/prefs-dialog.ui
index dce4782..9cd31ce 100644
--- a/src/resources/prefs-dialog.ui
+++ b/src/resources/prefs-dialog.ui
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Mon Dec 9 17:35:18 2013 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment1">
@@ -18,8 +19,8 @@
<property name="border_width">5</property>
<property name="title" translatable="yes">Preferences</property>
<property name="role">epiphany-preferences</property>
- <property name="window_position">center</property>
<property name="modal">True</property>
+ <property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
<property name="icon_name">gtk-preferences</property>
<property name="type_hint">dialog</property>
@@ -37,10 +38,10 @@
<child>
<object class="GtkButton" id="helpbutton1">
<property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -53,11 +54,11 @@
<child>
<object class="GtkButton" id="closebutton1">
<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="can_default">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -365,6 +366,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="font">Sans 12</property>
<property name="use_font">True</property>
</object>
<packing>
@@ -378,7 +380,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="font_name">Serif 12</property>
+ <property name="font">Serif 12</property>
<property name="use_font">True</property>
</object>
<packing>
@@ -394,7 +396,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="font_name">Monospace 12</property>
+ <property name="font">Monospace 12</property>
<property name="use_font">True</property>
</object>
<packing>
@@ -587,18 +589,45 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label1294">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Cookies</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <child>
+ <object class="GtkLabel" id="label1294">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Cookies</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="manage_cookies_button">
+ <property name="label" translatable="yes">Manage Cookies</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_manage_cookies_button_clicked"
object="PrefsDialog" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]