aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-utils.c21
-rw-r--r--embed/ephy-favicon-cache.c6
-rw-r--r--embed/ephy-history.c6
-rw-r--r--embed/mozilla/mozilla-embed.cpp7
4 files changed, 15 insertions, 25 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 69089daa4..373f4801f 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -21,6 +21,7 @@
#include "ephy-embed-shell.h"
#include "ephy-bonobo-extensions.h"
#include "ephy-gui.h"
+#include "ephy-debug.h"
#include <gtk/gtkdialog.h>
#include <gtk/gtkmessagedialog.h>
@@ -222,9 +223,9 @@ add_verbs (BonoboUIComponent *ui_component,
**/
void
ephy_embed_utils_build_charsets_submenu (BonoboUIComponent *ui_component,
- const char *path,
- BonoboUIVerbFn fn,
- gpointer data)
+ const char *path,
+ BonoboUIVerbFn fn,
+ gpointer data)
{
GList *groups;
GString *xml_string;
@@ -232,13 +233,7 @@ ephy_embed_utils_build_charsets_submenu (BonoboUIComponent *ui_component,
int group_index = 0;
int charset_index = 0;
-#ifdef DEBUG_MARCO
- GTimer *timer;
- gulong s;
-
- timer = g_timer_new ();
- g_timer_start(timer);
-#endif
+ START_PROFILER ("Charsets menu")
g_return_if_fail (IS_EPHY_EMBED_SHELL (embed_shell));
g_return_if_fail (ephy_embed_shell_get_charset_groups (embed_shell, &groups) == G_OK);
@@ -287,11 +282,7 @@ ephy_embed_utils_build_charsets_submenu (BonoboUIComponent *ui_component,
g_list_free (groups);
g_string_free (xml_string, TRUE);
-#ifdef DEBUG_MARCO
- g_timer_stop (timer);
- g_timer_elapsed (timer, &s);
- g_print ("Time to build charset menu: %f\n", (double)(s)/1000000);
-#endif
+ STOP_PROFILER ("Charsets menu")
}
/**
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index e833cf2c7..7d76e50fe 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -279,8 +279,10 @@ ephy_favicon_cache_init (EphyFaviconCache *cache)
g_str_equal);
cache->priv->icons_hash_lock = g_new0 (GStaticRWLock, 1);
g_static_rw_lock_init (cache->priv->icons_hash_lock);
- cache->priv->downloads_hash = g_hash_table_new (g_str_hash,
- g_str_equal);
+ cache->priv->downloads_hash = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free,
+ NULL);
/* Icons */
cache->priv->icons = ephy_node_new_with_id (ICONS_NODE_ID);
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 898f7034c..3df30b109 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -20,15 +20,13 @@
#include "ephy-history.h"
#include "ephy-file-helpers.h"
#include "ephy-autocompletion-source.h"
+#include "ephy-debug.h"
#include <time.h>
#include <string.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomevfs/gnome-vfs-uri.h>
-//#define DEBUG_MSG(x) g_print x
-#define DEBUG_MSG(x)
-
#define EPHY_HISTORY_XML_VERSION "0.1"
/* how often to save the history, in milliseconds */
@@ -272,7 +270,7 @@ ephy_history_save (EphyHistory *eb)
GPtrArray *children;
int i;
- DEBUG_MSG (("Saving history\n"));
+ LOG ("Saving history\n")
/* save nodes to xml */
xmlIndentTreeOutput = TRUE;
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 05408973f..49c1dbad0 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -20,12 +20,13 @@
#include "gtkmozembed_internal.h"
#include "ephy-string.h"
#include "ephy-embed.h"
+#include "ephy-debug.h"
#include "mozilla-embed.h"
#include "MozillaPrivate.h"
#include "EphyWrapper.h"
#include "EventContext.h"
-#include "nsIWindowWatcher.h"
+#include <nsIWindowWatcher.h>
#include <nsIURI.h>
#include <nsIURL.h>
#include <nsNetUtil.h>
@@ -418,9 +419,7 @@ mozilla_embed_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
-#ifdef DEBUG_MARCO
- g_print ("MozillaEmbed finalized %p\n", embed);
-#endif
+ LOG ("MozillaEmbed finalized %p\n", embed)
}
gpointer