From e497b299846293f001ad98f2b7dca3e68db2bf26 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 26 Jun 2004 18:28:44 +0000 Subject: Implement File->Work Off-Line command and backend. No DBUS/HAL/whatever 2004-06-26 Christian Persch * data/ui/epiphany-ui.xml: * embed/ephy-embed-single.c: (ephy_embed_single_iface_init), (ephy_embed_single_set_offline_mode), (ephy_embed_single_get_offline_mode): * embed/ephy-embed-single.h: * embed/mozilla/EphySingle.cpp: * embed/mozilla/mozilla-embed-single.cpp: * src/ephy-window.c: (network_status_changed), (ephy_window_init), (ephy_window_finalize): * src/window-commands.c: (window_cmd_file_save_as), (window_cmd_file_work_offline): * src/window-commands.h: Implement File->Work Off-Line command and backend. No DBUS/HAL/whatever integration yet. --- embed/ephy-embed-single.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'embed/ephy-embed-single.c') diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index 9581883e4..c609d3efc 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -81,6 +81,23 @@ ephy_embed_single_iface_init (gpointer g_class) G_TYPE_STRING, G_TYPE_STRING); +/** + * EphyEmbedSingle::network-status: + * @single: + * @offline: the network status + * + * The ::network-status signal is emitted when the network status changes. + **/ + g_signal_new ("network-status", + EPHY_TYPE_EMBED_SINGLE, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EphyEmbedSingleIface, network_status), + NULL, NULL, + g_cclosure_marshal_VOID__BOOLEAN, + G_TYPE_NONE, + 1, + G_TYPE_BOOLEAN); + initialised = TRUE; } } @@ -134,6 +151,19 @@ ephy_embed_single_set_offline_mode (EphyEmbedSingle *single, iface->set_offline_mode (single, offline); } +/** + * ephy_embed_single_get_offline_mode: + * @single: the #EphyEmbedSingle + * + * Gets the state of the network connection. + **/ +gboolean +ephy_embed_single_get_offline_mode (EphyEmbedSingle *single) +{ + EphyEmbedSingleIface *iface = EPHY_EMBED_SINGLE_GET_IFACE (single); + return iface->get_offline_mode (single); +} + /** * ephy_embed_single_load_proxy_autoconf: * @single: the #EphyEmbedSingle -- cgit v1.2.3