aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--embed/ephy-embed-shell.c5
-rw-r--r--embed/ephy-favicon-cache.c2
-rw-r--r--embed/ephy-history.c25
-rw-r--r--embed/mozilla/BaseProtocolContentHandler.cpp2
-rw-r--r--embed/mozilla/StartHereProtocolHandler.cpp6
-rw-r--r--lib/widgets/ephy-spinner.c4
-rw-r--r--lib/widgets/ephy-spinner.h3
-rw-r--r--src/ephy-shell.c10
-rw-r--r--src/ephy-spinner-action.c2
10 files changed, 53 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index eac4e0178..3083f8d0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2003-01-21 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * embed/mozilla/BaseProtocolContentHandler.cpp:
+ * embed/mozilla/StartHereProtocolHandler.cpp:
+
+ Api changes.
+
+ * embed/ephy-embed-shell.c: (ephy_embed_shell_finalize):
+ * embed/ephy-favicon-cache.c: (ephy_favicon_cache_finalize):
+ * embed/ephy-history.c: (ephy_history_host_visited),
+ (ephy_history_set_page_title), (ephy_history_remove):
+ * lib/widgets/ephy-spinner.c: (ephy_spinner_expose),
+ (ephy_spinner_size_request):
+ * lib/widgets/ephy-spinner.h:
+ * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_finalize):
+ * src/ephy-shell.c: (ephy_shell_finalize),
+ (ephy_shell_get_autocompletion):
+ * src/ephy-spinner-action.c: (create_tool_item):
+
+ Nicer spinner size. Fix references problem
+ and a lot of logs to make it easy to debug it.
+
2003-01-20 Marco Pesenti Gritti <marco@it.gnome.org>
* src/ephy-window.c: (update_nav_control):
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 9db8e2db6..e4ca5bb73 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -21,8 +21,8 @@
#include "ephy-embed-shell.h"
#include "ephy-marshal.h"
#include "ephy-favicon-cache.h"
-
#include "mozilla-embed-shell.h"
+#include "ephy-debug.h"
#include <string.h>
@@ -155,11 +155,13 @@ ephy_embed_shell_finalize (GObject *object)
g_return_if_fail (ges->priv != NULL);
+ LOG ("Unref history")
if (ges->priv->global_history)
{
g_object_unref (ges->priv->global_history);
}
+ LOG ("Unref downloader")
if (ges->priv->downloader_view)
{
g_object_remove_weak_pointer
@@ -168,6 +170,7 @@ ephy_embed_shell_finalize (GObject *object)
g_object_unref (ges->priv->downloader_view);
}
+ LOG ("Unref favicon cache")
if (ges->priv->favicon_cache)
{
g_object_unref (G_OBJECT (ges->priv->favicon_cache));
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index 3c34913d5..eae812691 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -335,6 +335,8 @@ ephy_favicon_cache_finalize (GObject *object)
{
EphyFaviconCache *cache;
+ LOG ("Finalize favicon cache")
+
g_return_if_fail (object != NULL);
g_return_if_fail (EPHY_IS_FAVICON_CACHE (object));
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index da304ed6e..f818ceb21 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -500,6 +500,8 @@ ephy_history_host_visited (EphyHistory *eh,
GValue value = { 0, };
int visits;
+ LOG ("Host visited")
+
visits = ephy_node_get_property_int
(host, EPHY_NODE_PAGE_PROP_VISITS);
if (visits < 0) visits = 0;
@@ -762,20 +764,21 @@ ephy_history_set_page_title (EphyHistory *gh,
{
EphyNode *node;
guint host_id;
+ GValue value = { 0, };
+
+ LOG ("Set page title")
node = ephy_history_get_page (gh, url);
- if (node)
- {
- GValue value = { 0, };
+ if (!node) return;
- g_value_init (&value, G_TYPE_STRING);
- g_value_set_string (&value, title);
- ephy_node_set_property
- (node, EPHY_NODE_PAGE_PROP_TITLE, &value);
- g_value_unset (&value);
- }
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string (&value, title);
+ ephy_node_set_property
+ (node, EPHY_NODE_PAGE_PROP_TITLE, &value);
+ g_value_unset (&value);
- host_id = ephy_node_get_property_int (node, EPHY_NODE_PAGE_PROP_HOST_ID);
+ host_id = ephy_node_get_property_int
+ (node, EPHY_NODE_PAGE_PROP_HOST_ID);
if (host_id >= 0)
{
ephy_history_host_set_title (gh, ephy_node_get_from_id (host_id),
@@ -828,6 +831,8 @@ ephy_history_remove (EphyHistory *gh, EphyNode *node)
EphyNode *host;
int host_id;
+ LOG ("Remove history item")
+
host_id = ephy_node_get_property_int (node, EPHY_NODE_PAGE_PROP_HOST_ID);
if (host_id < 0)
{
diff --git a/embed/mozilla/BaseProtocolContentHandler.cpp b/embed/mozilla/BaseProtocolContentHandler.cpp
index 741d21722..d381d0b17 100644
--- a/embed/mozilla/BaseProtocolContentHandler.cpp
+++ b/embed/mozilla/BaseProtocolContentHandler.cpp
@@ -64,7 +64,7 @@ NS_IMETHODIMP GBaseProtocolContentHandler::NewChannel(nsIURI *aURI,
nsCOMPtr<nsIChannel> channel;
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), aURI,
- iStream, mMimeType, NS_LITERAL_CSTRING(""), 0);
+ iStream, mMimeType, NS_LITERAL_CSTRING(""));
if (NS_FAILED(rv)) return rv;
NS_IF_ADDREF (*_retval = channel);
diff --git a/embed/mozilla/StartHereProtocolHandler.cpp b/embed/mozilla/StartHereProtocolHandler.cpp
index a4548378d..369b9123d 100644
--- a/embed/mozilla/StartHereProtocolHandler.cpp
+++ b/embed/mozilla/StartHereProtocolHandler.cpp
@@ -160,17 +160,13 @@ NS_IMETHODIMP GStartHereProtocolHandler::NewChannel(nsIURI *aURI,
if (NS_FAILED (rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIInputStream> iStream;
- PRUint32 size;
-
- rv = sStream->GetLength(&size);
- if (NS_FAILED(rv)) return rv;
rv = sStream->NewInputStream(0, getter_AddRefs(iStream));
if (NS_FAILED(rv)) return rv;
rv = NS_NewInputStreamChannel(getter_AddRefs(mChannel), uri,
iStream, NS_LITERAL_CSTRING("text/xml"),
- NS_LITERAL_CSTRING("utf-8"), size);
+ NS_LITERAL_CSTRING("utf-8"));
g_free (buf);
g_object_unref (sh);
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index d1caf8fba..ba5aee66d 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -370,6 +370,8 @@ ephy_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
g_return_val_if_fail (IS_EPHY_SPINNER (widget), FALSE);
+ GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+
spinner = EPHY_SPINNER (widget);
if (!spinner->details->ready) {
return FALSE;
@@ -721,7 +723,7 @@ ephy_spinner_size_request (GtkWidget *widget, GtkRequisition *requisition)
get_spinner_dimensions (spinner, &spinner_width, &spinner_height);
/* allocate some extra margin so we don't butt up against toolbar edges */
- requisition->width = spinner_width + 8;
+ requisition->width = spinner_width + 4;
requisition->height = spinner_height;
}
diff --git a/lib/widgets/ephy-spinner.h b/lib/widgets/ephy-spinner.h
index c72bee8c1..6aee728a0 100644
--- a/lib/widgets/ephy-spinner.h
+++ b/lib/widgets/ephy-spinner.h
@@ -65,9 +65,8 @@ GtkType ephy_spinner_get_type (void);
GtkWidget *ephy_spinner_new (void);
void ephy_spinner_start (EphySpinner *throbber);
void ephy_spinner_stop (EphySpinner *throbber);
-void ephy_spinner_set_small_mode (EphySpinner *throbber,
+void ephy_spinner_set_small_mode (EphySpinner *spinner,
gboolean new_mode);
-
GList *ephy_spinner_list_spinners (void);
void ephy_spinner_info_free (EphySpinnerInfo *info);
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 11954632d..e07203775 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -231,6 +231,7 @@ ephy_shell_finalize (GObject *object)
g_assert (ephy_shell == NULL);
+ LOG ("Unref session")
if (gs->priv->session)
{
g_return_if_fail (IS_SESSION(gs->priv->session));
@@ -240,11 +241,13 @@ ephy_shell_finalize (GObject *object)
g_object_unref (G_OBJECT (gs->priv->session));
}
+ LOG ("Unref autocompletion")
if (gs->priv->autocompletion)
{
g_object_unref (gs->priv->autocompletion);
}
+ LOG ("Unref bookmarks")
if (gs->priv->bookmarks)
{
g_object_unref (gs->priv->bookmarks);
@@ -510,20 +513,13 @@ ephy_shell_get_autocompletion (EphyShell *gs)
EphyHistory *gh = ephy_embed_shell_get_global_history (EPHY_EMBED_SHELL (gs));
EphyBookmarks *bmk = ephy_shell_get_bookmarks (gs);
- EphyFilesystemAutocompletion *fa = ephy_filesystem_autocompletion_new ();
p->autocompletion = ephy_autocompletion_new ();
ephy_autocompletion_set_prefixes (p->autocompletion, prefixes);
ephy_autocompletion_add_source (p->autocompletion,
EPHY_AUTOCOMPLETION_SOURCE (gh));
ephy_autocompletion_add_source (p->autocompletion,
- EPHY_AUTOCOMPLETION_SOURCE (fa));
- ephy_autocompletion_add_source (p->autocompletion,
EPHY_AUTOCOMPLETION_SOURCE (bmk));
-
- g_object_unref (gh);
- g_object_unref (fa);
- g_object_unref (gs->priv->bookmarks);
}
return p->autocompletion;
}
diff --git a/src/ephy-spinner-action.c b/src/ephy-spinner-action.c
index 3e990f49b..84d0e3cee 100644
--- a/src/ephy-spinner-action.c
+++ b/src/ephy-spinner-action.c
@@ -95,7 +95,7 @@ create_tool_item (EggAction *action)
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (item), button);
spinner = ephy_spinner_new ();
- ephy_spinner_set_small_mode (EPHY_SPINNER (spinner), TRUE);
+ ephy_spinner_set_small_mode (spinner, TRUE);
gtk_container_add (GTK_CONTAINER (button), spinner);
egg_tool_item_set_pack_end (EGG_TOOL_ITEM (item), TRUE);
egg_tool_item_set_homogeneous (EGG_TOOL_ITEM (item), FALSE);