aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-13 16:52:36 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-13 16:52:36 +0800
commit9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec (patch)
tree089536612813c5504f5fe5a35184e3ff23a8adcd /src
parentf73556913d8a794f6c8ed17a7664d0a2f61635da (diff)
downloadgsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar.gz
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar.bz2
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar.lz
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar.xz
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.tar.zst
gsoc2013-epiphany-9f70e82e7fd4d8888f55c63cf3eb911d27b0fbec.zip
2003-07-13 Marco Pesenti Gritti <marco@it.gnome.org>
* Makefile.am: * configure.in: * embed/Makefile.am: * embed/ephy-embed-shell.c: (ephy_embed_shell_get_favicon_cache), (impl_get_downloader_view): * embed/ephy-embed-shell.h: * embed/ephy-embed-single.c: * embed/ephy-embed-single.h: * embed/mozilla/ProgressListener.cpp: * embed/mozilla/mozilla-embed.cpp: * lib/Makefile.am: * lib/ephy-langs.h: * lib/ephy-node.c: (unref_signal_objects), (ephy_node_signal_connect_object): * plugins/Makefile.am: * plugins/sample/Makefile.am: * plugins/sample/sample.c: (bmk_added), (bmk_removed), (bmk_changed), (switch_page_cb), (window_focus_in_cb), (location_changed_cb), (tab_added_cb), (new_window_cb), (plugin_init): * src/Makefile.am: * src/bookmarks/Makefile.am: * src/bookmarks/ephy-bookmark-action.c: (ephy_bookmark_action_sync_icon): * src/bookmarks/ephy-bookmark-properties.c: (set_window_icon), (ephy_bookmark_properties_init): * src/bookmarks/ephy-bookmarks-editor.c: (provide_favicon), (ephy_bookmarks_editor_init): * src/bookmarks/ephy-bookmarks.c: (update_favorites_menus): * src/bookmarks/ephy-topic-action.c: (build_bookmarks_menu): * src/ephy-automation.c: (impl_ephy_automation_loadurl), (impl_ephy_automation_quit), (impl_ephy_automation_load_session): * src/ephy-favicon-action.c: (ephy_favicon_action_init): * src/ephy-history-window.c: (confirmation_dialog_response_cb), (provide_favicon): * src/ephy-location-action.c: (connect_proxy): * src/ephy-notebook.c: (sync_icon): * src/ephy-shell.c: (ephy_shell_get_active_window), (ephy_shell_get_session), (ephy_shell_get_autocompletion), (ephy_shell_get_toolbars_model): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_net_state_cb), (ephy_tab_init), (ephy_tab_get_action): * src/ephy-tab.h: * src/ephy-tabs-menu.c: (ephy_tabs_menu_update): * src/ephy-window.c: (ephy_window_fullscreen), (ephy_window_unfullscreen), (sync_tab_icon), (ephy_window_init), (remove_from_session), (ephy_window_get_active_tab):
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am56
-rw-r--r--src/bookmarks/Makefile.am29
-rw-r--r--src/bookmarks/ephy-bookmark-action.c5
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c8
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c8
-rw-r--r--src/bookmarks/ephy-bookmarks.c4
-rw-r--r--src/bookmarks/ephy-topic-action.c5
-rw-r--r--src/ephy-automation.c7
-rw-r--r--src/ephy-favicon-action.c5
-rw-r--r--src/ephy-history-window.c7
-rw-r--r--src/ephy-location-action.c4
-rw-r--r--src/ephy-notebook.c4
-rw-r--r--src/ephy-shell.c18
-rw-r--r--src/ephy-shell.h13
-rw-r--r--src/ephy-tab.c12
-rw-r--r--src/ephy-tab.h19
-rw-r--r--src/ephy-tabs-menu.c3
-rw-r--r--src/ephy-window.c19
-rwxr-xr-xsrc/toolbar.c16
-rw-r--r--src/window-commands.c8
20 files changed, 155 insertions, 95 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 53cb7c4c7..e47c8331b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,60 +41,70 @@ else
nautilus_view_sources =
endif
+headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany
+header_DATA = $(INST_H_FILES)
+
+NO_INST_H_FILES = \
+ ephy-automation.h \
+ ephy-encoding-menu.h \
+ ephy-favicon-action.h \
+ ephy-favorites-menu.h \
+ ephy-go-action.h \
+ ephy-history-window.h \
+ ephy-location-action.h \
+ ephy-navigation-action.h \
+ ephy-plugin.h \
+ ephy-spinner-action.h \
+ ephy-tabs-menu.h \
+ ephy-toolbars-model.h \
+ language-editor.h \
+ pdm-dialog.h \
+ prefs-dialog.h \
+ ppview-toolbar.h \
+ statusbar.h \
+ toolbar.h \
+ window-commands.h
+
+INST_H_FILES = \
+ ephy-notebook.h \
+ ephy-shell.h \
+ ephy-tab.h \
+ ephy-window.h \
+ session.h
+
epiphany_bin_SOURCES = \
$(ephy_automation_interface_idl_sources) \
$(nautilus_view_sources) \
ephy-automation.c \
- ephy-automation.h \
ephy-encoding-menu.c \
- ephy-encoding-menu.h \
ephy-favicon-action.c \
- ephy-favicon-action.h \
ephy-favorites-menu.c \
- ephy-favorites-menu.h \
ephy-go-action.c \
- ephy-go-action.h \
ephy-history-window.c \
- ephy-history-window.h \
ephy-location-action.c \
- ephy-location-action.h \
ephy-main.c \
ephy-navigation-action.c \
- ephy-navigation-action.h \
ephy-notebook.c \
- ephy-notebook.h \
ephy-plugin.c \
- ephy-plugin.h \
ephy-shell.c \
- ephy-shell.h \
ephy-spinner-action.c \
- ephy-spinner-action.h \
ephy-tab.c \
ephy-tab.h \
ephy-tabs-menu.c \
- ephy-tabs-menu.h \
ephy-toolbars-model.c \
ephy-toolbars-model.h \
ephy-window.c \
- ephy-window.h \
language-editor.c \
- language-editor.h \
pdm-dialog.c \
- pdm-dialog.h \
popup-commands.c \
- popup-commands.h \
prefs-dialog.c \
- prefs-dialog.h \
ppview-toolbar.c \
- ppview-toolbar.h \
session.c \
- session.h \
statusbar.c \
- statusbar.h \
toolbar.c \
- toolbar.h \
window-commands.c \
- window-commands.h
+ $(INST_H_FILES) \
+ $(NOINST_H_FILES)
epiphany_bin_LDADD = \
$(top_builddir)/embed/libephyembed.la \
diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am
index 4425d0aa5..5b1865d31 100644
--- a/src/bookmarks/Makefile.am
+++ b/src/bookmarks/Makefile.am
@@ -17,24 +17,33 @@ INCLUDES = \
noinst_LTLIBRARIES = libephybookmarks.la
+headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany
+header_DATA = $(INST_H_FILES)
+
+INST_H_FILES = \
+ ephy-bookmarks.h
+
+NOINST_H_FILES = \
+ ephy-bookmark-action.h \
+ ephy-bookmarks-editor.h \
+ ephy-bookmarks-export.h \
+ ephy-bookmarks-import.h \
+ ephy-bookmarks-menu.h \
+ ephy-bookmark-properties.h \
+ ephy-new-bookmark.h \
+ ephy-topic-action.h \
+ ephy-topics-selector.h
+
libephybookmarks_la_SOURCES = \
ephy-bookmarks.c \
- ephy-bookmarks.h \
ephy-bookmark-action.c \
- ephy-bookmark-action.h \
ephy-bookmarks-editor.c \
- ephy-bookmarks-editor.h \
ephy-bookmarks-export.c \
- ephy-bookmarks-export.h \
ephy-bookmarks-import.c \
- ephy-bookmarks-import.h \
ephy-bookmarks-menu.c \
- ephy-bookmarks-menu.h \
ephy-bookmark-properties.c \
- ephy-bookmark-properties.h \
ephy-new-bookmark.c \
- ephy-new-bookmark.h \
ephy-topic-action.c \
- ephy-topic-action.h \
ephy-topics-selector.c \
- ephy-topics-selector.h
+ $(NOINST_H_FILES) \
+ $(INST_H_FILES)
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index c768af3cb..42aa5cac4 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -25,6 +25,7 @@
#include "ephy-bookmark-action.h"
#include "ephy-bookmarks.h"
+#include "ephy-favicon-cache.h"
#include "ephy-shell.h"
#include "ephy-string.h"
#include "eggtoolitem.h"
@@ -161,8 +162,8 @@ ephy_bookmark_action_sync_icon (EggAction *action, GParamSpec *pspec, GtkWidget
icon_location = EPHY_BOOKMARK_ACTION (action)->priv->icon;
- cache = ephy_embed_shell_get_favicon_cache
- (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache
+ (EPHY_EMBED_SHELL (ephy_shell)));
if (icon_location)
{
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 1e0ae60e9..9fda1cfea 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -21,12 +21,14 @@
#include <config.h>
#endif
+#include "ephy-toolbars-model.h"
#include "ephy-bookmark-properties.h"
#include "ephy-topics-selector.h"
#include "ephy-debug.h"
#include "ephy-shell.h"
#include "ephy-state.h"
#include "ephy-gui.h"
+#include "ephy-favicon-cache.h"
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtktogglebutton.h>
@@ -294,7 +296,8 @@ set_window_icon (EphyBookmarkProperties *editor)
const char *icon_location;
GdkPixbuf *icon = NULL;
- cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
icon_location = ephy_node_get_property_string
(editor->priv->bookmark, EPHY_NODE_BMK_PROP_ICON);
@@ -440,7 +443,8 @@ ephy_bookmark_properties_init (EphyBookmarkProperties *editor)
editor->priv = g_new0 (EphyBookmarkPropertiesPrivate, 1);
editor->priv->bookmark = NULL;
- editor->priv->tb_model = ephy_shell_get_toolbars_model (ephy_shell);
+ editor->priv->tb_model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
}
GtkWidget *
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 490de4f86..900e576ba 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -55,6 +55,8 @@
#include "ephy-gui.h"
#include "ephy-stock-icons.h"
#include "ephy-search-entry.h"
+#include "ephy-toolbars-model.h"
+#include "ephy-favicon-cache.h"
static GtkTargetEntry topic_drag_dest_types [] =
{
@@ -1161,7 +1163,8 @@ provide_favicon (EphyNode *node, GValue *value, gpointer user_data)
const char *icon_location;
GdkPixbuf *pixbuf = NULL;
- cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
icon_location = ephy_node_get_property_string
(node, EPHY_NODE_BMK_PROP_ICON);
@@ -1453,7 +1456,8 @@ ephy_bookmarks_editor_init (EphyBookmarksEditor *editor)
editor->priv->props_dialogs = g_hash_table_new (g_direct_hash,
g_direct_equal);
- editor->priv->tb_model = ephy_shell_get_toolbars_model (ephy_shell);
+ editor->priv->tb_model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
g_signal_connect (editor->priv->tb_model, "item_added",
G_CALLBACK (toolbar_items_changed_cb), editor);
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 757b2f3b3..82b937543 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -32,6 +32,8 @@
#include "ephy-toolbars-model.h"
#include "ephy-bookmarks-export.h"
#include "ephy-bookmarks-import.h"
+#include "ephy-autocompletion.h"
+#include "session.h"
#include <string.h>
#include <bonobo/bonobo-i18n.h>
@@ -518,7 +520,7 @@ update_favorites_menus ()
Session *session;
const GList *l;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
l = session_get_windows (session);
for (; l != NULL; l = l->next)
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 344010989..e2cb0adfa 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -25,6 +25,7 @@
#include "ephy-node-common.h"
#include "ephy-topic-action.h"
#include "ephy-bookmarks.h"
+#include "ephy-favicon-cache.h"
#include "ephy-shell.h"
#include "eggtoolitem.h"
#include "ephy-debug.h"
@@ -199,8 +200,8 @@ build_bookmarks_menu (EphyTopicAction *action, EphyNode *node)
menu = gtk_menu_new ();
- cache = ephy_embed_shell_get_favicon_cache
- (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
children = ephy_node_get_children (node);
diff --git a/src/ephy-automation.c b/src/ephy-automation.c
index 0fbea13bb..2baa56c17 100644
--- a/src/ephy-automation.c
+++ b/src/ephy-automation.c
@@ -21,6 +21,7 @@
#include "EphyAutomation.h"
#include "ephy-embed.h"
#include "ephy-window.h"
+#include "session.h"
#include <string.h>
#include <bonobo/bonobo-generic-factory.h>
@@ -94,7 +95,7 @@ impl_ephy_automation_loadurl (PortableServer_Servant _servant,
EphyWindow *window;
Session *session;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
/* no window open, let's try to autoresume */
if (session_get_windows (session) == NULL)
@@ -155,7 +156,7 @@ impl_ephy_automation_quit (PortableServer_Servant _servant,
{
Session *session;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
session_close (session);
}
@@ -167,7 +168,7 @@ impl_ephy_automation_load_session (PortableServer_Servant _servant,
{
Session *session;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
session_load (session, filename);
}
diff --git a/src/ephy-favicon-action.c b/src/ephy-favicon-action.c
index 8a35d8012..418c11ab8 100644
--- a/src/ephy-favicon-action.c
+++ b/src/ephy-favicon-action.c
@@ -269,8 +269,9 @@ ephy_favicon_action_init (EphyFaviconAction *action)
action->priv = g_new0 (EphyFaviconActionPrivate, 1);
action->priv->icon = NULL;
- action->priv->cache = ephy_embed_shell_get_favicon_cache
- (EPHY_EMBED_SHELL (ephy_shell));
+ action->priv->cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache
+ (EPHY_EMBED_SHELL (ephy_shell)));
g_object_ref (action->priv->cache);
}
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 0367275ea..bbd8a6190 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -50,6 +50,8 @@
#include "toolbar.h"
#include "ephy-stock-icons.h"
#include "ephy-search-entry.h"
+#include "session.h"
+#include "ephy-favicon-cache.h"
static GtkTargetEntry page_drag_types [] =
{
@@ -193,7 +195,7 @@ confirmation_dialog_response_cb (GtkDialog *dialog, gint response,
if (response != GTK_RESPONSE_OK)
return;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
windows = session_get_windows (session);
for (; windows != NULL; windows = windows->next)
@@ -918,7 +920,8 @@ provide_favicon (EphyNode *node, GValue *value, gpointer user_data)
const char *icon_location;
GdkPixbuf *pixbuf = NULL;
- cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
icon_location = ephy_node_get_property_string
(node, EPHY_NODE_PAGE_PROP_ICON);
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index d8d62b82e..c9e1c5903 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -98,9 +98,11 @@ location_url_activate_cb (EphyLocationEntry *entry,
static void
connect_proxy (EggAction *action, GtkWidget *proxy)
{
- EphyAutocompletion *ac = ephy_shell_get_autocompletion (ephy_shell);
+ EphyAutocompletion *ac;
EphyLocationEntry *e = EPHY_LOCATION_ENTRY (proxy);
+ ac = EPHY_AUTOCOMPLETION (ephy_shell_get_autocompletion (ephy_shell));
+
LOG ("Connect location proxy")
g_return_if_fail (EPHY_IS_LOCATION_ENTRY (e));
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 46dda88ea..3e2bad417 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -30,6 +30,7 @@
#include "ephy-window.h"
#include "ephy-shell.h"
#include "ephy-debug.h"
+#include "ephy-favicon-cache.h"
#include <gtk/gtk.h>
#include <glib-object.h>
@@ -801,7 +802,8 @@ sync_icon (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy)
GtkImage *icon = NULL;
const char *address;
- cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
address = ephy_tab_get_icon_address (tab);
if (address)
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 3a0d43b0e..276517c59 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -36,6 +36,10 @@
#include "ephy-debug.h"
#include "ephy-plugin.h"
#include "toolbar.h"
+#include "session.h"
+#include "downloader-view.h"
+#include "ephy-toolbars-model.h"
+#include "ephy-autocompletion.h"
#include <string.h>
#include <libgnomeui/gnome-client.h>
@@ -363,7 +367,7 @@ ephy_shell_get_active_window (EphyShell *gs)
Session *session;
const GList *windows;
- session = ephy_shell_get_session (gs);
+ session = SESSION (ephy_shell_get_session (gs));
windows = session_get_windows (session);
if (windows == NULL) return NULL;
@@ -508,7 +512,7 @@ ephy_nautilus_view_new (BonoboGenericFactory *factory, const char *id,
*
* Return value: the current session.
**/
-Session *
+GObject *
ephy_shell_get_session (EphyShell *gs)
{
if (!gs->priv->session)
@@ -519,10 +523,10 @@ ephy_shell_get_session (EphyShell *gs)
(gpointer *)&gs->priv->session);
}
- return gs->priv->session;
+ return G_OBJECT (gs->priv->session);
}
-EphyAutocompletion *
+GObject *
ephy_shell_get_autocompletion (EphyShell *gs)
{
EphyShellPrivate *p = gs->priv;
@@ -544,7 +548,7 @@ ephy_shell_get_autocompletion (EphyShell *gs)
ephy_autocompletion_add_source (p->autocompletion,
EPHY_AUTOCOMPLETION_SOURCE (bmk));
}
- return p->autocompletion;
+ return G_OBJECT (p->autocompletion);
}
EphyBookmarks *
@@ -558,7 +562,7 @@ ephy_shell_get_bookmarks (EphyShell *gs)
return gs->priv->bookmarks;
}
-EphyToolbarsModel *
+GObject *
ephy_shell_get_toolbars_model (EphyShell *gs)
{
if (gs->priv->toolbars_model == NULL)
@@ -573,7 +577,7 @@ ephy_shell_get_toolbars_model (EphyShell *gs)
gs->priv->toolbars_model, NULL);
}
- return gs->priv->toolbars_model;
+ return G_OBJECT (gs->priv->toolbars_model);
}
static void
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 81518cd7c..3ce3add31 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -19,13 +19,10 @@
#ifndef EPHY_SHELL_H
#define EPHY_SHELL_H
-#include "ephy-autocompletion.h"
-#include "prefs-dialog.h"
-#include "downloader-view.h"
#include "ephy-embed-shell.h"
-#include "session.h"
#include "ephy-bookmarks.h"
-#include "ephy-toolbars-model.h"
+#include "ephy-window.h"
+#include "ephy-tab.h"
#include <glib-object.h>
#include <glib.h>
@@ -93,13 +90,13 @@ EphyTab *ephy_shell_new_tab (EphyShell *shell,
const char *url,
EphyNewTabFlags flags);
-Session *ephy_shell_get_session (EphyShell *gs);
+GObject *ephy_shell_get_session (EphyShell *gs);
-EphyAutocompletion *ephy_shell_get_autocompletion (EphyShell *gs);
+GObject *ephy_shell_get_autocompletion (EphyShell *gs);
EphyBookmarks *ephy_shell_get_bookmarks (EphyShell *gs);
-EphyToolbarsModel *ephy_shell_get_toolbars_model (EphyShell *gs);
+GObject *ephy_shell_get_toolbars_model (EphyShell *gs);
void ephy_shell_show_bookmarks_editor (EphyShell *gs,
GtkWidget *parent);
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index df8a6f9c7..5d2056dcd 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -31,6 +31,8 @@
#include "ephy-notebook.h"
#include "ephy-file-helpers.h"
#include "ephy-zoom.h"
+#include "session.h"
+#include "ephy-favicon-cache.h"
#include <bonobo/bonobo-i18n.h>
#include <libgnomevfs/gnome-vfs-uri.h>
@@ -753,7 +755,8 @@ ephy_tab_net_state_cb (EphyEmbed *embed, const char *uri,
{
/* tab load completed, save in session */
Session *s;
- s = ephy_shell_get_session (ephy_shell);
+
+ s = SESSION (ephy_shell_get_session (ephy_shell));
session_save (s, SESSION_CRASHED);
ephy_tab_set_load_percent (tab, 0);
@@ -1014,7 +1017,8 @@ ephy_tab_init (EphyTab *tab)
G_CALLBACK (ephy_tab_favicon_cb),
tab);
- cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
g_signal_connect_object (G_OBJECT (cache), "changed",
G_CALLBACK (ephy_tab_icon_cache_changed_cb),
tab, 0);
@@ -1244,10 +1248,10 @@ ephy_tab_get_zoom (EphyTab *tab)
return tab->priv->zoom;
}
-EggAction *
+GObject *
ephy_tab_get_action (EphyTab *tab)
{
g_return_val_if_fail (IS_EPHY_TAB (tab), NULL);
- return tab->priv->action;
+ return G_OBJECT (tab->priv->action);
}
diff --git a/src/ephy-tab.h b/src/ephy-tab.h
index 9b9aa6ab4..eaf4f6b62 100644
--- a/src/ephy-tab.h
+++ b/src/ephy-tab.h
@@ -20,7 +20,6 @@
#define EPHY_TAB_H
#include "ephy-embed.h"
-#include "egg-action.h"
#include <glib-object.h>
#include <gtk/gtkwidget.h>
@@ -69,22 +68,22 @@ struct EphyTabClass
GType ephy_tab_get_type (void);
-EphyTab * ephy_tab_new (void);
+EphyTab *ephy_tab_new (void);
-EggAction * ephy_tab_get_action (EphyTab *tab);
+GObject *ephy_tab_get_action (EphyTab *tab);
-EphyEmbed * ephy_tab_get_embed (EphyTab *tab);
+EphyEmbed *ephy_tab_get_embed (EphyTab *tab);
void ephy_tab_set_window (EphyTab *tab,
EphyWindow *window);
-EphyWindow * ephy_tab_get_window (EphyTab *tab);
+EphyWindow *ephy_tab_get_window (EphyTab *tab);
-const char * ephy_tab_get_icon_address (EphyTab *tab);
+const char *ephy_tab_get_icon_address (EphyTab *tab);
gboolean ephy_tab_get_load_status (EphyTab *tab);
-const char * ephy_tab_get_link_message (EphyTab *tab);
+const char *ephy_tab_get_link_message (EphyTab *tab);
int ephy_tab_get_load_percent (EphyTab *tab);
@@ -93,7 +92,7 @@ void ephy_tab_set_location (EphyTab *tab,
const char *location,
TabAddressExpire expire);
-const char * ephy_tab_get_location (EphyTab *tab);
+const char *ephy_tab_get_location (EphyTab *tab);
TabNavigationFlags ephy_tab_get_navigation_flags (EphyTab *tab);
@@ -103,9 +102,9 @@ void ephy_tab_get_size (EphyTab *tab,
int *width,
int *height);
-const char * ephy_tab_get_status_message (EphyTab *tab);
+const char *ephy_tab_get_status_message (EphyTab *tab);
-const char * ephy_tab_get_title (EphyTab *tab);
+const char *ephy_tab_get_title (EphyTab *tab);
void ephy_tab_set_visibility (EphyTab *tab,
gboolean visible);
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index afa87e5d0..67c855d2c 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -26,6 +26,7 @@
#include "ephy-marshal.h"
#include "ephy-shell.h"
#include "ephy-debug.h"
+#include "egg-action.h"
#include <string.h>
#include <stdlib.h>
@@ -288,7 +289,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu)
for (l = tabs; l != NULL; l = l->next)
{
tab = (EphyTab *) l->data;
- action = ephy_tab_get_action (tab);
+ action = EGG_ACTION (ephy_tab_get_action (tab));
tab_set_action_accelerator (p->action_group, action, i);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index b0dc4a26c..2fda4cf13 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -42,6 +42,9 @@
#include "ephy-encoding-menu.h"
#include "ephy-tabs-menu.h"
#include "ephy-stock-icons.h"
+#include "ephy-toolbars-model.h"
+#include "session.h"
+#include "ephy-favicon-cache.h"
#include <string.h>
#include <bonobo/bonobo-i18n.h>
@@ -533,7 +536,8 @@ ephy_window_fullscreen (EphyWindow *window)
window->priv->is_fullscreen = TRUE;
- tmodel = ephy_shell_get_toolbars_model (ephy_shell);
+ tmodel = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
ephy_toolbars_model_set_flag (tmodel, EGG_TB_MODEL_ICONS_ONLY);
popup = gtk_window_new (GTK_WINDOW_POPUP);
@@ -576,7 +580,8 @@ ephy_window_unfullscreen (EphyWindow *window)
window->priv->is_fullscreen = FALSE;
- tmodel = ephy_shell_get_toolbars_model (ephy_shell);
+ tmodel = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
ephy_toolbars_model_unset_flag (tmodel, EGG_TB_MODEL_ICONS_ONLY);
g_signal_handlers_disconnect_by_func (G_OBJECT (gdk_screen_get_default ()),
@@ -749,8 +754,9 @@ sync_tab_icon (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
if (window->priv->closing) return;
- cache = ephy_embed_shell_get_favicon_cache
- (EPHY_EMBED_SHELL (ephy_shell));
+ cache = EPHY_FAVICON_CACHE
+ (ephy_embed_shell_get_favicon_cache
+ (EPHY_EMBED_SHELL (ephy_shell)));
address = ephy_tab_get_icon_address (tab);
@@ -1398,7 +1404,7 @@ ephy_window_init (EphyWindow *window)
LOG ("EphyWindow initialising %p", window)
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
window->priv = g_new0 (EphyWindowPrivate, 1);
window->priv->active_tab = NULL;
@@ -1459,7 +1465,7 @@ remove_from_session (EphyWindow *window)
{
Session *session;
- session = ephy_shell_get_session (ephy_shell);
+ session = SESSION (ephy_shell_get_session (ephy_shell));
g_return_if_fail (session != NULL);
session_remove_window (session, window);
@@ -1759,7 +1765,6 @@ EphyTab *
ephy_window_get_active_tab (EphyWindow *window)
{
g_return_val_if_fail (IS_EPHY_WINDOW (window), NULL);
- g_return_val_if_fail (window->priv->active_tab != NULL, NULL);
return window->priv->active_tab;
}
diff --git a/src/toolbar.c b/src/toolbar.c
index f2e071722..3d482f267 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -42,6 +42,7 @@
#include "ephy-new-bookmark.h"
#include "ephy-stock-icons.h"
#include "eggtoolbar.h"
+#include "ephy-toolbars-model.h"
#include <string.h>
#include <bonobo/bonobo-i18n.h>
@@ -138,7 +139,8 @@ topic_destroy_cb (EphyNode *node,
EphyToolbarsModel *model;
long id;
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
id = ephy_node_get_id (node);
name = ephy_toolbars_model_get_action_name (model, TRUE, id);
@@ -161,7 +163,8 @@ bookmark_destroy_cb (EphyNode *node,
EphyToolbarsModel *model;
long id;
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
id = ephy_node_get_id (node);
name = ephy_toolbars_model_get_action_name (model, FALSE, id);
@@ -422,7 +425,8 @@ init_bookmarks_toolbar (Toolbar *t)
EphyToolbarsModel *model;
int i, n_toolbars;
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
n_toolbars = egg_toolbars_model_n_toolbars
(EGG_TOOLBARS_MODEL (model));
@@ -527,7 +531,8 @@ toolbar_set_window (Toolbar *t, EphyWindow *window)
G_CALLBACK (action_request_cb),
NULL);
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
g_signal_connect (EGG_TOOLBARS_MODEL (model), "toolbar_added",
G_CALLBACK (update_toolbar_remove_flag),
NULL);
@@ -729,7 +734,8 @@ toolbar_set_visibility (Toolbar *t,
EphyToolbarsModel *model;
int i, n_toolbars;
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
n_toolbars = egg_toolbars_model_n_toolbars
(EGG_TOOLBARS_MODEL (model));
diff --git a/src/window-commands.c b/src/window-commands.c
index d1a93099f..7712ce8b7 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -39,6 +39,8 @@
#include "ephy-state.h"
#include "ephy-gui.h"
#include "ephy-zoom.h"
+#include "prefs-dialog.h"
+#include "ephy-toolbars-model.h"
#include <string.h>
#include <libgnomevfs/gnome-vfs-uri.h>
@@ -646,7 +648,8 @@ toolbar_editor_response_cb (GtkDialog *dialog,
gtk_widget_destroy (GTK_WIDGET (dialog));
break;
case RESPONSE_ADD_TOOLBAR:
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
n = egg_toolbars_model_n_toolbars (EGG_TOOLBARS_MODEL (model));
egg_toolbars_model_add_toolbar (EGG_TOOLBARS_MODEL (model),
n - 1, "UserCreated");
@@ -666,7 +669,8 @@ window_cmd_edit_toolbar (EggAction *action,
Toolbar *t;
GtkWidget *dialog;
- model = ephy_shell_get_toolbars_model (ephy_shell);
+ model = EPHY_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell));
t = ephy_window_get_toolbar (window);
dialog = gtk_dialog_new ();