diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-04 20:52:05 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-04 20:52:05 +0800 |
commit | 753b29514d19fd54d51c2346bc6bb08ff1093cac (patch) | |
tree | e15206e10a0f54f52bcd5c2fd245d0d21f8750ee /embed/mozilla/mozilla-embed.cpp | |
parent | 1fe471d0ab202613f6802751f5604420e23727d1 (diff) | |
download | gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar.gz gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar.bz2 gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar.lz gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar.xz gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.tar.zst gsoc2013-epiphany-753b29514d19fd54d51c2346bc6bb08ff1093cac.zip |
Add API to check if an EphyEmbed has forms with user input in them.
2004-01-04 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed.c: (ephy_embed_has_modified_forms):
* embed/ephy-embed.h:
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/mozilla-embed.cpp:
Add API to check if an EphyEmbed has forms with user input in them.
Currently it required one modified textarea, or two modified text
fields.
* src/ephy-notebook.c: (ephy_notebook_class_init),
(close_button_clicked_cb):
* src/ephy-notebook.h:
* src/ephy-window.c: (confirm_close_with_modified_forms),
(ephy_window_delete_event_cb), (tab_delete_cb), (setup_notebook),
(ephy_window_init), (ephy_window_remove_tab):
When closing a window or tab, check if there is unsubmitted user
input in form fields, and if so, warn the user before closing.
Fixes bug #119857.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index f333c8768..15b88938b 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -786,6 +786,18 @@ impl_get_encoding_info (EphyEmbed *embed) return info; } +static gboolean +impl_has_modified_forms (EphyEmbed *embed) +{ + MozillaEmbedPrivate *mpriv = MOZILLA_EMBED(embed)->priv; + nsresult result; + + PRBool modified; + result = mpriv->browser->GetHasModifiedForms (&modified); + + return modified == PR_TRUE ? TRUE : FALSE; +} + static void mozilla_embed_location_changed_cb (GtkMozEmbed *embed, MozillaEmbed *membed) @@ -1121,6 +1133,7 @@ ephy_embed_iface_init (EphyEmbedIFace *iface) iface->print_preview_close = impl_print_preview_close; iface->print_preview_n_pages = impl_print_preview_n_pages; iface->print_preview_navigate = impl_print_preview_navigate; + iface->has_modified_forms = impl_has_modified_forms; } void |