From 1b57d44cfe8ed36a245f6a31961ec67d31529262 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 7 Jun 2003 11:54:41 +0000 Subject: Remove memory cache prefs/ui, now mozilla can deal with it automagically. 2003-06-07 Marco Pesenti Gritti * data/epiphany.schemas.in: * data/glade/prefs-dialog.glade: * embed/ephy-embed-prefs.h: * embed/ephy-embed-single.c: (ephy_embed_single_clear_cache): * embed/ephy-embed-single.h: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-notifiers.cpp: * src/bookmarks/ephy-bookmarks-import.c: (mozilla_parse_bookmarks), (xbel_parse_folder): * src/prefs-dialog.c: (prefs_clear_cache_button_clicked_cb): Remove memory cache prefs/ui, now mozilla can deal with it automagically. Rename Appeareance tab to be less generic. Do not convert spaces to _ on bookmarks importing. --- src/bookmarks/ephy-bookmarks-import.c | 23 +++-------------------- src/prefs-dialog.c | 28 ++++++---------------------- 2 files changed, 9 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index e767ad879..950560d8f 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -29,12 +29,6 @@ typedef struct _XbelInfo char *smarturl; } XbelInfo; -static char * -build_keyword (const char *folder) -{ - return ephy_str_replace_substring (folder, " ", "_"); -} - static EphyNode * set_folder (EphyBookmarks *bookmarks, EphyNode *bookmark, @@ -64,12 +58,7 @@ mozilla_parse_bookmarks (EphyBookmarks *bookmarks, { if (xmlStrEqual (child->name, "h3")) { - xmlChar *tmp; - - tmp = xmlNodeGetContent (child); - g_free (*keyword); - *keyword = build_keyword (tmp); - xmlFree (tmp); + *keyword = xmlNodeGetContent (child); } else if (xmlStrEqual (child->name, "a")) { @@ -140,13 +129,7 @@ xbel_parse_folder (EphyBookmarks *bookmarks, { if (xmlStrEqual (child->name, "title")) { - xmlChar *tmp; - - tmp = xmlNodeGetContent (child); - - g_free (keyword); - keyword = build_keyword (tmp); - xmlFree (tmp); + keyword = xmlNodeGetContent (child); } else if (xmlStrEqual (child->name, "bookmark")) { @@ -191,7 +174,7 @@ xbel_parse_folder (EphyBookmarks *bookmarks, g_free (keyword); keyword = g_strdup (default_keyword); } - + child = child->next; } diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 53170f8f3..594e11e21 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -54,11 +54,8 @@ void prefs_proxy_auto_url_reload_cb (GtkWidget *button, EphyDialog *dialog); void -prefs_clear_memory_cache_button_clicked_cb (GtkWidget *button, - gpointer data); -void -prefs_clear_disk_cache_button_clicked_cb (GtkWidget *button, - gpointer data); +prefs_clear_cache_button_clicked_cb (GtkWidget *button, + gpointer data); void prefs_dialog_response_cb (GtkDialog *dialog, gint response_id, gpointer data); void @@ -258,8 +255,7 @@ EphyDialogProperty properties [] = /* Advanced */ { CACHE_COMPARE_PROP, "cache_compare_radiobutton", CONF_NETWORK_CACHE_COMPARE, PT_AUTOAPPLY, NULL }, - { DISK_CACHE_PROP, "disk_cache_spin", CONF_NETWORK_DISK_CACHE, PT_AUTOAPPLY, NULL }, - { MEMORY_CACHE_PROP, "memory_cache_spin", CONF_NETWORK_MEMORY_CACHE, PT_AUTOAPPLY, NULL }, + { DISK_CACHE_PROP, "disk_cache_spin", CONF_NETWORK_CACHE_SIZE, PT_AUTOAPPLY, NULL }, { -1, NULL, NULL } }; @@ -1076,27 +1072,15 @@ prefs_dialog_response_cb (GtkDialog *dialog, gint response_id, gpointer data) } void -prefs_clear_memory_cache_button_clicked_cb (GtkWidget *button, - gpointer data) -{ - EphyEmbedSingle *single; - - single = ephy_embed_shell_get_embed_single - (EPHY_EMBED_SHELL (ephy_shell)); - - ephy_embed_single_clear_cache (single, MEMORY_CACHE); -} - -void -prefs_clear_disk_cache_button_clicked_cb (GtkWidget *button, - gpointer data) +prefs_clear_cache_button_clicked_cb (GtkWidget *button, + gpointer data) { EphyEmbedSingle *single; single = ephy_embed_shell_get_embed_single (EPHY_EMBED_SHELL (ephy_shell)); - ephy_embed_single_clear_cache (single, DISK_CACHE); + ephy_embed_single_clear_cache (single); } void -- cgit