diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2011-10-10 10:14:58 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <descalante@igalia.com> | 2011-10-11 10:16:09 +0800 |
commit | 03347735a65b75cc0d40ee7ee9c17ee612584544 (patch) | |
tree | d81b4ff81ecb7735a29e81e46ea7dd850c2d2e6c | |
parent | 14c5b69240de9dcbdbdb6bc7308665beb16231aa (diff) | |
download | gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar.gz gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar.bz2 gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar.lz gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar.xz gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.tar.zst gsoc2013-epiphany-03347735a65b75cc0d40ee7ee9c17ee612584544.zip |
pdm-dialog: port cookie properties to GtkGrid
Build the Cookie Properties dialog with GtkBuilder instead of handcraft
from the past.
Bug #661347
-rw-r--r-- | data/glade/epiphany.ui | 732 | ||||
-rw-r--r-- | src/pdm-dialog.c | 127 |
2 files changed, 532 insertions, 327 deletions
diff --git a/data/glade/epiphany.ui b/data/glade/epiphany.ui index 08c67b4a5..25e771f00 100644 --- a/data/glade/epiphany.ui +++ b/data/glade/epiphany.ui @@ -1,211 +1,420 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> - <requires lib="gtk+" version="2.16"/> - <!-- interface-naming-policy toplevel-contextual --> - <object class="GtkDialog" id="pdm_dialog"> - <property name="width_request">400</property> - <property name="height_request">300</property> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="cookie_properties_dialog"> + <property name="can_focus">False</property> <property name="border_width">5</property> - <property name="title" translatable="yes">Personal Data</property> - <property name="role">epiphany-cookie-manager</property> + <property name="title" translatable="yes">Cookie properties</property> + <property name="modal">True</property> <property name="destroy_with_parent">True</property> - <property name="type_hint">normal</property> + <property name="type_hint">dialog</property> + <property name="transient_for">pdm_dialog</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox27"> + <object class="GtkBox" id="dialog-vbox4"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">2</property> + <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="close_cookie_properties_button"> + <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">True</property> + <property name="position">0</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="GtkNotebook" id="pdm_notebook"> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="content_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Content:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="path_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Path:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="send_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Send for:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="expires_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Expires:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="content_val_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">label</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="path_val_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">label</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="send_val_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">label</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="expires_val_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">label</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">close_cookie_properties_button</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="encoding_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Text Encoding</property> + <property name="role">epiphany-encoding-chooser</property> + <property name="default_width">300</property> + <property name="default_height">420</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox30"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area30"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="okbutton2"> + <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> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="encoding_help_button"> + <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="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> + <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">0</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox144"> + <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">5</property> + <property name="spacing">18</property> <child> - <object class="GtkHBox" id="hbox87"> + <object class="GtkVBox" id="vbox148"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">6</property> + <property name="can_focus">False</property> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1139"> + <object class="GtkRadioButton" id="automatic_button"> + <property name="label" translatable="yes"><b>_Automatic</b></property> + <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="cookies_treeview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - </child> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkVButtonBox" id="vbuttonbox1"> + <object class="GtkAlignment" id="alignment8"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <property name="layout_style">start</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> <child> - <object class="GtkButton" id="cookies_remove_button"> - <property name="label">gtk-remove</property> + <object class="GtkLabel" id="label1246"> <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_stock">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Use the encoding specified by the document</property> + <property name="wrap">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="cookies_properties_button"> - <property name="label">gtk-properties</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_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">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> - </child> - <child type="tab"> - <object class="GtkLabel" id="label1227"> - <property name="visible">True</property> - <property name="label" translatable="yes">Cookies</property> - </object> <packing> - <property name="tab_fill">False</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkVBox" id="vbox149"> + <object class="GtkVBox" id="manual_vbox"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkHBox" id="hbox88"> + <object class="GtkRadioButton" id="manual_button"> + <property name="label" translatable="yes"><b>_Use a different encoding:</b></property> + <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="spacing">6</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">automatic_button</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1140"> + <object class="GtkScrolledWindow" id="scrolled_window"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> + <property name="hscrollbar_policy">never</property> <property name="shadow_type">in</property> <child> - <object class="GtkTreeView" id="passwords_treeview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVButtonBox" id="vbuttonbox2"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <property name="layout_style">start</property> - <child> - <object class="GtkButton" id="passwords_remove_button"> - <property name="label">gtk-remove</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_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> + <placeholder/> </child> </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> </child> </object> <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="passwords_show_button"> - <property name="label" translatable="yes">_Show passwords</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> - </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">1</property> </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> - <child type="tab"> - <object class="GtkLabel" id="label1228"> - <property name="visible">True</property> - <property name="label" translatable="yes">Passwords</property> - </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> </object> <packing> + <property name="expand">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> + </object> + </child> + <action-widgets> + <action-widget response="-7">okbutton2</action-widget> + <action-widget response="-11">encoding_help_button</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="pdm_dialog"> + <property name="width_request">400</property> + <property name="height_request">300</property> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Personal Data</property> + <property name="role">epiphany-cookie-manager</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">normal</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox27"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area27"> + <object class="GtkButtonBox" id="dialog-action_area27"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="layout_style">end</property> <child> <object class="GtkButton" id="pdm_help_button"> <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="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> @@ -216,22 +425,27 @@ </child> <child> <object class="GtkButton" id="removeallbutton"> + <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> <child> <object class="GtkAlignment" id="alignment12"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xscale">0</property> <property name="yscale">0</property> <child> <object class="GtkHBox" id="hbox91"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">2</property> <child> <object class="GtkImage" id="image3"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="stock">gtk-clear</property> </object> <packing> @@ -243,6 +457,7 @@ <child> <object class="GtkLabel" id="label1249"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Clear _All...</property> <property name="use_underline">True</property> </object> @@ -266,10 +481,12 @@ <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> @@ -281,118 +498,188 @@ </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> - </object> - </child> - <action-widgets> - <action-widget response="-11">pdm_help_button</action-widget> - <action-widget response="1">removeallbutton</action-widget> - <action-widget response="-7">closebutton1</action-widget> - </action-widgets> - </object> - <object class="GtkDialog" id="encoding_dialog"> - <property name="border_width">5</property> - <property name="title" translatable="yes">Text Encoding</property> - <property name="role">epiphany-encoding-chooser</property> - <property name="default_width">300</property> - <property name="default_height">420</property> - <property name="type_hint">dialog</property> - <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox30"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">2</property> <child> - <object class="GtkVBox" id="vbox144"> + <object class="GtkNotebook" id="pdm_notebook"> <property name="visible">True</property> + <property name="can_focus">True</property> <property name="border_width">5</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> <child> - <object class="GtkVBox" id="vbox148"> + <object class="GtkHBox" id="hbox87"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="spacing">6</property> <child> - <object class="GtkRadioButton" id="automatic_button"> - <property name="label" translatable="yes"><b>_Automatic</b></property> + <object class="GtkScrolledWindow" id="scrolledwindow1139"> <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> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="cookies_treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> + </object> + </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> <child> - <object class="GtkAlignment" id="alignment8"> + <object class="GtkVButtonBox" id="vbuttonbox1"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> <child> - <object class="GtkLabel" id="label1246"> + <object class="GtkButton" id="cookies_remove_button"> + <property name="label">gtk-remove</property> + <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="label" translatable="yes">Use the encoding specified by the document</property> - <property name="wrap">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_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">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cookies_properties_button"> + <property name="label">gtk-properties</property> + <property name="use_action_appearance">False</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_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">False</property> <property name="position">1</property> </packing> </child> </object> + </child> + <child type="tab"> + <object class="GtkLabel" id="label1227"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Cookies</property> + </object> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> + <property name="tab_fill">False</property> </packing> </child> <child> - <object class="GtkVBox" id="manual_vbox"> + <object class="GtkVBox" id="vbox149"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> <property name="spacing">6</property> <child> - <object class="GtkRadioButton" id="manual_button"> - <property name="label" translatable="yes"><b>_Use a different encoding:</b></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> - <property name="group">automatic_button</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment9"> + <object class="GtkHBox" id="hbox88"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> <child> - <object class="GtkScrolledWindow" id="scrolled_window"> + <object class="GtkScrolledWindow" id="scrolledwindow1140"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> - <placeholder/> + <object class="GtkTreeView" id="passwords_treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection2"/> + </child> + </object> </child> </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkVButtonBox" id="vbuttonbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="passwords_remove_button"> + <property name="label">gtk-remove</property> + <property name="use_action_appearance">False</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_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">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="passwords_show_button"> + <property name="label" translatable="yes">_Show passwords</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_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> @@ -401,57 +688,30 @@ <property name="position">1</property> </packing> </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area30"> - <property name="visible">True</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="okbutton2"> - <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="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="encoding_help_button"> - <property name="label">gtk-help</property> + <child type="tab"> + <object class="GtkLabel" id="label1228"> <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> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Passwords</property> </object> <packing> - <property name="expand">False</property> - <property name="fill">False</property> <property name="position">1</property> + <property name="tab_fill">False</property> </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> </child> <action-widgets> - <action-widget response="-7">okbutton2</action-widget> - <action-widget response="-11">encoding_help_button</action-widget> + <action-widget response="-11">pdm_help_button</action-widget> + <action-widget response="1">removeallbutton</action-widget> + <action-widget response="-7">closebutton1</action-widget> </action-widgets> </object> </interface> diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index c243c16e0..fe92f8bf9 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -604,93 +604,51 @@ setup_action (PdmActionInfo *action) } /* "Cookies" tab */ +static void +cookie_dialog_response_cb (GtkDialog *widget, + int response, + EphyDialog *cookie_dialog) +{ + g_object_unref (cookie_dialog); +} static void show_cookies_properties (PdmDialog *dialog, SoupCookie *info) { - GtkWidget *gdialog; - GtkWidget *table; - GtkWidget *label; + EphyDialog *cookie_dialog; + GtkWidget *cookie_widget; GtkWidget *parent; - GtkWidget *content_area; + GtkWidget *content_label; + GtkWidget *path_label; + GtkWidget *send_label; + GtkWidget *expires_label; char *str; - parent = ephy_dialog_get_control (EPHY_DIALOG(dialog), "pdm_dialog"); - - gdialog = gtk_dialog_new_with_buttons - (_("Cookie Properties"), - GTK_WINDOW (parent), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CLOSE, 0, NULL); - ephy_state_add_window (GTK_WIDGET (gdialog), "cookie_properties", - -1, -1, FALSE, - EPHY_STATE_WINDOW_SAVE_SIZE | EPHY_STATE_WINDOW_SAVE_POSITION); - gtk_container_set_border_width (GTK_CONTAINER (gdialog), 5); - content_area = gtk_dialog_get_content_area (GTK_DIALOG (gdialog)); - gtk_box_set_spacing (GTK_BOX (content_area), 14); /* 24 = 2 * 5 + 14 */ - - table = gtk_table_new (2, 4, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (table), 5); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_widget_show (table); - - str = g_strconcat ("<b>", _("Content:"), "</b>", NULL); - label = gtk_label_new (str); - g_free (str); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, - GTK_FILL, GTK_FILL, 0, 0); - - label = gtk_label_new (info->value); - gtk_label_set_selectable (GTK_LABEL (label), TRUE); - gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1); + parent = ephy_dialog_get_control (EPHY_DIALOG (dialog), "pdm_dialog"); - str = g_strconcat ("<b>", _("Path:"), "</b>", NULL); - label = gtk_label_new (str); - g_free (str); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, - GTK_FILL, GTK_FILL, 0, 0); - - label = gtk_label_new (info->path); - gtk_label_set_selectable (GTK_LABEL (label), TRUE); - gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 1, 2); + cookie_dialog = ephy_dialog_new_with_parent (parent); + ephy_dialog_construct (cookie_dialog, + ephy_file ("epiphany.ui"), + "cookie_properties_dialog", + NULL); - str = g_strconcat ("<b>", _("Send for:"), "</b>", NULL); - label = gtk_label_new (str); - g_free (str); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, - GTK_FILL, GTK_FILL, 0, 0); + ephy_dialog_get_controls (EPHY_DIALOG (cookie_dialog), + "cookie_properties_dialog", &cookie_widget, + "content_val_label", &content_label, + "path_val_label", &path_label, + "send_val_label", &send_label, + "expires_val_label", &expires_label, + NULL); - label = gtk_label_new (info->secure ? _("Encrypted connections only") : _("Any type of connection") ); - gtk_label_set_selectable (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 2, 3); + g_signal_connect (cookie_widget, "response", + G_CALLBACK (cookie_dialog_response_cb), cookie_dialog); - str = g_strconcat ("<b>", _("Expires:"), "</b>", NULL); - label = gtk_label_new (str); - g_free (str); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0); - gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, - GTK_FILL, GTK_FILL, 0, 0); + gtk_label_set_text (GTK_LABEL (content_label), info->value); + gtk_label_set_text (GTK_LABEL (path_label), info->path); + gtk_label_set_text (GTK_LABEL (send_label), info->secure ? + _("Encrypted connections only") : + _("Any type of connection")); if (info->expires == NULL) { @@ -703,23 +661,10 @@ show_cookies_properties (PdmDialog *dialog, time_t out = soup_date_to_time_t(info->expires); str = eel_strdup_strftime ("%c", localtime_r (&out, &t)); } - label = gtk_label_new (str); + gtk_label_set_text (GTK_LABEL (expires_label), str); g_free (str); - gtk_label_set_selectable (GTK_LABEL (label), TRUE); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); - gtk_widget_show (label); - gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 3, 4); - - gtk_box_pack_start (GTK_BOX (content_area), - table, - FALSE, FALSE, 0); - - gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (parent)), - GTK_WINDOW (gdialog)); - - gtk_dialog_run (GTK_DIALOG (gdialog)); - gtk_widget_destroy (gdialog); + ephy_dialog_run (cookie_dialog); } static void @@ -1524,7 +1469,7 @@ pdm_dialog_init (PdmDialog *dialog) priv = dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog); - ephy_dialog_construct (EPHY_DIALOG(dialog), + ephy_dialog_construct (EPHY_DIALOG (dialog), ephy_file ("epiphany.ui"), "pdm_dialog", NULL); |