diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-11 00:35:56 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-11 00:35:56 +0800 |
commit | e3396ef5e3ae7fd5674eda19a893e7dca88bce35 (patch) | |
tree | 6315e5bc2549ec9db6109607fbb29596363d969e /lib | |
parent | 80bc591b9024029ee12957944593053db6763c41 (diff) | |
download | gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar.gz gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar.bz2 gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar.lz gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar.xz gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.tar.zst gsoc2013-epiphany-e3396ef5e3ae7fd5674eda19a893e7dca88bce35.zip |
Implement history disabling.
2004-01-10 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-history.c: (ephy_history_get_type),
(ephy_history_set_enabled), (ephy_history_set_property),
(ephy_history_get_property), (ephy_history_class_init),
(page_removed_from_host_cb), (disable_history_notifier),
(ephy_history_init), (ephy_history_finalize), (ephy_history_new),
(ephy_history_get_host), (ephy_history_visited),
(ephy_history_add_page), (ephy_history_set_page_title),
(ephy_history_clear), (ephy_history_is_enabled):
* embed/ephy-history.h:
* lib/ephy-node-db.c: (ephy_node_db_get_property),
(ephy_node_db_set_property), (ephy_node_db_set_immutable):
* lib/ephy-node-db.h:
* lib/ephy-prefs.h:
* src/bookmarks/ephy-bookmarks.c: (clear_favorites),
(history_cleared_cb), (ephy_setup_history_notifiers):
Implement history disabling.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-node-db.c | 15 | ||||
-rw-r--r-- | lib/ephy-node-db.h | 3 | ||||
-rw-r--r-- | lib/ephy-prefs.h | 37 |
3 files changed, 32 insertions, 23 deletions
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index 43b6db39f..920bdf1fb 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -99,7 +99,6 @@ ephy_node_db_set_name (EphyNodeDb *db, const char *name) g_hash_table_insert (ephy_node_databases, db->priv->name, db); } - static void ephy_node_db_get_property (GObject *object, guint prop_id, @@ -116,12 +115,11 @@ ephy_node_db_get_property (GObject *object, g_value_set_string (value, db->priv->name); break; case PROP_IMMUTABLE: - g_value_set_boolean (value, db->priv->immutable); + g_value_set_boolean (value, ephy_node_db_is_immutable (db)); break; } } - static void ephy_node_db_set_property (GObject *object, guint prop_id, @@ -138,8 +136,7 @@ ephy_node_db_set_property (GObject *object, ephy_node_db_set_name (db, g_value_get_string (value)); break; case PROP_IMMUTABLE: - db->priv->immutable = g_value_get_boolean (value); - g_object_notify (G_OBJECT (db), "immutable"); + ephy_node_db_set_immutable (db, g_value_get_boolean (value)); break; } } @@ -253,6 +250,14 @@ ephy_node_db_is_immutable (EphyNodeDb *db) return db->priv->immutable; } +void +ephy_node_db_set_immutable (EphyNodeDb *db, gboolean immutable) +{ + db->priv->immutable = immutable; + + g_object_notify (G_OBJECT (db), "immutable"); +} + EphyNode * ephy_node_db_get_node_from_id (EphyNodeDb *db, long id) { diff --git a/lib/ephy-node-db.h b/lib/ephy-node-db.h index 21206f2ff..f6138a427 100644 --- a/lib/ephy-node-db.h +++ b/lib/ephy-node-db.h @@ -75,6 +75,9 @@ const char *ephy_node_db_get_name (EphyNodeDb *db); gboolean ephy_node_db_is_immutable (EphyNodeDb *db); +void ephy_node_db_set_immutable (EphyNodeDb *db, + gboolean immutable); + EphyNode *ephy_node_db_get_node_from_id (EphyNodeDb *db, long id); diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h index ba49df410..d1cc998f7 100644 --- a/lib/ephy-prefs.h +++ b/lib/ephy-prefs.h @@ -27,32 +27,33 @@ G_BEGIN_DECLS #define CONF_SCHEMA_VERSION "/apps/epiphany/schema_version" /* General */ -#define CONF_GENERAL_HOMEPAGE "/apps/epiphany/general/homepage" -#define CONF_ALWAYS_SHOW_TABS_BAR "/apps/epiphany/general/always_show_tabs_bar" -#define CONF_WINDOWS_SHOW_TOOLBARS "/apps/epiphany/general/show_toolbars" -#define CONF_WINDOWS_SHOW_BOOKMARKS_BAR "/apps/epiphany/general/show_bookmarks_bar" -#define CONF_WINDOWS_SHOW_STATUSBAR "/apps/epiphany/general/show_statusbar" -#define CONF_INTERFACE_MIDDLE_CLICK_OPEN_URL "/apps/epiphany/general/middle_click_open_url" -#define CONF_AUTO_OPEN_DOWNLOADS "/apps/epiphany/general/auto_open_downloads" -#define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir" +#define CONF_GENERAL_HOMEPAGE "/apps/epiphany/general/homepage" +#define CONF_ALWAYS_SHOW_TABS_BAR "/apps/epiphany/general/always_show_tabs_bar" +#define CONF_WINDOWS_SHOW_TOOLBARS "/apps/epiphany/general/show_toolbars" +#define CONF_WINDOWS_SHOW_BOOKMARKS_BAR "/apps/epiphany/general/show_bookmarks_bar" +#define CONF_WINDOWS_SHOW_STATUSBAR "/apps/epiphany/general/show_statusbar" +#define CONF_INTERFACE_MIDDLE_CLICK_OPEN_URL "/apps/epiphany/general/middle_click_open_url" +#define CONF_AUTO_OPEN_DOWNLOADS "/apps/epiphany/general/auto_open_downloads" +#define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir" /* Directories */ -#define CONF_STATE_SAVE_DIR "/apps/epiphany/directories/save" -#define CONF_STATE_SAVE_IMAGE_DIR "/apps/epiphany/directories/saveimage" -#define CONF_STATE_OPEN_DIR "/apps/epiphany/directories/open" -#define CONF_STATE_DOWNLOAD_DIR "/apps/epiphany/directories/download" -#define CONF_STATE_UPLOAD_DIR "/apps/epiphany/directories/upload" +#define CONF_STATE_SAVE_DIR "/apps/epiphany/directories/save" +#define CONF_STATE_SAVE_IMAGE_DIR "/apps/epiphany/directories/saveimage" +#define CONF_STATE_OPEN_DIR "/apps/epiphany/directories/open" +#define CONF_STATE_DOWNLOAD_DIR "/apps/epiphany/directories/download" +#define CONF_STATE_UPLOAD_DIR "/apps/epiphany/directories/upload" /* Lockdown */ -#define CONF_LOCKDOWN_DISABLE_ARBITRARY_URL "/apps/epiphany/lockdown/disable_arbitrary_url" +#define CONF_LOCKDOWN_DISABLE_ARBITRARY_URL "/apps/epiphany/lockdown/disable_arbitrary_url" #define CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING "/apps/epiphany/lockdown/disable_bookmark_editing" -#define CONF_LOCKDOWN_DISABLE_TOOLBAR_EDITING "/apps/epiphany/lockdown/disable_toolbar_editing" -#define CONF_LOCKDOWN_DISABLE_HISTORY "/apps/epiphany/lockdown/disable_history" +#define CONF_LOCKDOWN_DISABLE_TOOLBAR_EDITING "/apps/epiphany/lockdown/disable_toolbar_editing" +#define CONF_LOCKDOWN_DISABLE_HISTORY "/apps/epiphany/lockdown/disable_history" #define CONF_LOCKDOWN_DISABLE_SAVE_TO_DISK "/desktop/gnome/lockdown/disable_save_to_disk" +#define CONF_LOCKDOWN_DISABLE_HISTORY "/apps/epiphany/lockdown/disable_history" /* System prefs */ -#define CONF_DESKTOP_FTP_HANDLER "/desktop/gnome/url-handlers/ftp/command" -#define CONF_DESKTOP_TOOLBAR_STYLE "/desktop/gnome/interface/toolbar_style" +#define CONF_DESKTOP_FTP_HANDLER "/desktop/gnome/url-handlers/ftp/command" +#define CONF_DESKTOP_TOOLBAR_STYLE "/desktop/gnome/interface/toolbar_style" G_END_DECLS |