aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog60
-rw-r--r--configure.in12
-rw-r--r--embed/Makefile.am39
-rw-r--r--embed/ephy-embed-shell.c13
-rw-r--r--embed/ephy-embed-shell.h10
-rw-r--r--embed/ephy-embed-single.c1
-rw-r--r--embed/ephy-embed-single.h2
-rw-r--r--embed/mozilla/ProgressListener.cpp4
-rw-r--r--embed/mozilla/mozilla-embed.cpp1
-rw-r--r--lib/Makefile.am30
-rw-r--r--lib/ephy-langs.h11
-rw-r--r--lib/ephy-node.c20
-rw-r--r--plugins/Makefile.am6
-rw-r--r--plugins/sample/Makefile.am10
-rw-r--r--plugins/sample/sample.c82
-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
35 files changed, 403 insertions, 148 deletions
diff --git a/ChangeLog b/ChangeLog
index 364d79f38..7755a6e75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+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):
+ * src/toolbar.c: (topic_destroy_cb), (bookmark_destroy_cb),
+ (init_bookmarks_toolbar), (toolbar_set_window),
+ (toolbar_set_visibility):
+ * src/window-commands.c: (toolbar_editor_response_cb),
+ (window_cmd_edit_toolbar):
+
+ Cleanup header dependencies.
+ Install headers useful for plugins.
+ Actually load about:blank when necessary (first page failed to load).
+
2003-07-12 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-gui.c: (ephy_gui_menu_position_under_widget):
diff --git a/configure.in b/configure.in
index f703d9124..dca04e6b8 100644
--- a/configure.in
+++ b/configure.in
@@ -3,6 +3,9 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(epiphany, 0.7.3,
[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany])
+EPIPHANY_MAJOR=1.0
+AC_SUBST(EPIPHANY_MAJOR)
+
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(configure.in)
@@ -173,6 +176,15 @@ esac
AC_DEFINE_UNQUOTED(MOZILLA_SNAPSHOT, $MOZILLA_SNAPSHOT, [Define mozilla snapshot])
dnl *******************************
+dnl Plugins
+dnl *******************************
+
+AC_ARG_ENABLE(sample-plugin, [ --enable-sample-plugin (yes,no)
+ Enable sample plugin])
+AM_CONDITIONAL(ENABLE_SAMPLE_PLUGIN, test "x$enable_sample_plugin" = "xyes")
+
+
+dnl *******************************
dnl Internationalization
dnl *******************************
dnl Add the languages which your application supports here.
diff --git a/embed/Makefile.am b/embed/Makefile.am
index f26c57dc0..5ca9f0a3b 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -16,35 +16,44 @@ INCLUDES = \
noinst_LTLIBRARIES = libephyembed.la
+headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany
+header_DATA = $(INST_H_FILES)
+
+NOINST_H_FILES = \
+ downloader-view.h \
+ ephy-embed-dialog.h \
+ ephy-embed-popup-control.h \
+ ephy-embed-utils.h \
+ ephy-favicon-cache.h \
+ find-dialog.h \
+ print-dialog.h
+
+INST_H_FILES = \
+ ephy-embed.h \
+ ephy-embed-event.h \
+ ephy-embed-persist.h \
+ ephy-embed-prefs.h \
+ ephy-embed-single.h \
+ ephy-embed-shell.h \
+ ephy-embed-types.h \
+ ephy-history.h
+
libephyembed_la_SOURCES = \
downloader-view.c \
- downloader-view.h \
ephy-embed.c \
- ephy-embed.h \
ephy-embed-dialog.c \
- ephy-embed-dialog.h \
ephy-embed-event.c \
- ephy-embed-event.h \
ephy-embed-persist.c \
- ephy-embed-persist.h \
ephy-embed-popup-control.c \
- ephy-embed-popup-control.h \
- ephy-embed-prefs.h \
ephy-embed-single.c \
- ephy-embed-single.h \
ephy-embed-shell.c \
- ephy-embed-shell.h \
- ephy-embed-types.h \
ephy-embed-utils.c \
- ephy-embed-utils.h \
ephy-favicon-cache.c \
- ephy-favicon-cache.h \
ephy-history.c \
- ephy-history.h \
find-dialog.c \
- find-dialog.h \
print-dialog.c \
- print-dialog.h
+ $(INST_H_FILES) \
+ $(NO_INST_H_FILES)
libephyembed_la_LIBADD = \
$(top_builddir)/embed/mozilla/libephymozillaembed.la
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 61e8096a7..f772cccf5 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -23,6 +23,7 @@
#include "ephy-favicon-cache.h"
#include "mozilla-embed-single.h"
#include "ephy-debug.h"
+#include "downloader-view.h"
#include <string.h>
@@ -43,7 +44,7 @@ ephy_embed_shell_finalize (GObject *object);
static EphyHistory *
impl_get_global_history (EphyEmbedShell *shell);
-static DownloaderView *
+static GObject *
impl_get_downloader_view (EphyEmbedShell *shell);
static GObjectClass *parent_class = NULL;
@@ -168,7 +169,7 @@ ephy_embed_shell_new (const char *type)
*
* Return value: the favicons cache
**/
-EphyFaviconCache *
+GObject *
ephy_embed_shell_get_favicon_cache (EphyEmbedShell *ees)
{
if (ees->priv->favicon_cache == NULL)
@@ -176,7 +177,7 @@ ephy_embed_shell_get_favicon_cache (EphyEmbedShell *ees)
ees->priv->favicon_cache = ephy_favicon_cache_new ();
}
- return ees->priv->favicon_cache;
+ return G_OBJECT (ees->priv->favicon_cache);
}
EphyHistory *
@@ -186,7 +187,7 @@ ephy_embed_shell_get_global_history (EphyEmbedShell *shell)
return klass->get_global_history (shell);
}
-DownloaderView *
+GObject *
ephy_embed_shell_get_downloader_view (EphyEmbedShell *shell)
{
EphyEmbedShellClass *klass = EPHY_EMBED_SHELL_GET_CLASS (shell);
@@ -230,7 +231,7 @@ impl_get_global_history (EphyEmbedShell *shell)
return shell->priv->global_history;
}
-static DownloaderView *
+static GObject *
impl_get_downloader_view (EphyEmbedShell *shell)
{
if (!shell->priv->downloader_view)
@@ -241,6 +242,6 @@ impl_get_downloader_view (EphyEmbedShell *shell)
(gpointer *)&shell->priv->downloader_view);
}
- return shell->priv->downloader_view;
+ return G_OBJECT (shell->priv->downloader_view);
}
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index a5e6bd16b..30d365d09 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -21,9 +21,7 @@
#include "ephy-embed.h"
#include "ephy-embed-single.h"
-#include "ephy-favicon-cache.h"
#include "ephy-history.h"
-#include "downloader-view.h"
#include <glib-object.h>
#include <glib.h>
@@ -56,8 +54,8 @@ struct EphyEmbedShellClass
GObjectClass parent_class;
/* Methods */
- EphyHistory * (* get_global_history) (EphyEmbedShell *shell);
- DownloaderView * (* get_downloader_view) (EphyEmbedShell *shell);
+ EphyHistory * (* get_global_history) (EphyEmbedShell *shell);
+ GObject * (* get_downloader_view) (EphyEmbedShell *shell);
};
GType ephy_embed_shell_get_type (void);
@@ -66,11 +64,11 @@ GType ephy_embed_shell_get_impl (void);
EphyEmbedShell *ephy_embed_shell_new (const char *type);
-EphyFaviconCache *ephy_embed_shell_get_favicon_cache (EphyEmbedShell *ges);
+GObject *ephy_embed_shell_get_favicon_cache (EphyEmbedShell *ges);
EphyHistory *ephy_embed_shell_get_global_history (EphyEmbedShell *shell);
-DownloaderView *ephy_embed_shell_get_downloader_view (EphyEmbedShell *shell);
+GObject *ephy_embed_shell_get_downloader_view (EphyEmbedShell *shell);
EphyEmbedSingle *ephy_embed_shell_get_embed_single (EphyEmbedShell *shell);
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index e329c4e74..66f6da6ee 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -23,6 +23,7 @@
#include "ephy-favicon-cache.h"
#include "mozilla-embed-single.h"
#include "ephy-debug.h"
+#include "downloader-view.h"
#include <string.h>
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
index fd1964d32..ee5b0cf74 100644
--- a/embed/ephy-embed-single.h
+++ b/embed/ephy-embed-single.h
@@ -20,9 +20,7 @@
#define EPHY_EMBED_SINGLE_H
#include "ephy-embed.h"
-#include "ephy-favicon-cache.h"
#include "ephy-history.h"
-#include "downloader-view.h"
#include "ephy-langs.h"
#include <glib-object.h>
diff --git a/embed/mozilla/ProgressListener.cpp b/embed/mozilla/ProgressListener.cpp
index 077232f71..e9cc7b835 100644
--- a/embed/mozilla/ProgressListener.cpp
+++ b/embed/mozilla/ProgressListener.cpp
@@ -24,6 +24,7 @@
#include "ProgressListener.h"
#include "ephy-file-helpers.h"
+#include "downloader-view.h"
#include "mozilla-embed-persist.h"
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
@@ -117,7 +118,8 @@ NS_METHOD GProgressListener::PrivateInit (void)
if (NS_FAILED (rv)) return NS_ERROR_FAILURE;
source = g_strdup (cTmp.get());
- mDownloaderView = ephy_embed_shell_get_downloader_view (embed_shell);
+ mDownloaderView = DOWNLOADER_VIEW
+ (ephy_embed_shell_get_downloader_view (embed_shell));
downloader_view_add_download (mDownloaderView, filename, source,
dest, (gpointer)this);
g_free (source);
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 40d7bc8a8..b0fbda45b 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -354,6 +354,7 @@ static void
mozilla_embed_init (MozillaEmbed *embed)
{
embed->priv = g_new0 (MozillaEmbedPrivate, 1);
+ embed->priv->no_page = 1;
mozilla_embed_connect_signals (embed);
}
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3505e574a..f70c0c170 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -12,6 +12,36 @@ INCLUDES = \
noinst_LTLIBRARIES = libephy.la
+headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany
+header_DATA = $(INST_H_FILES)
+
+NOINST_H_FILES = \
+ eel-gconf-extensions.h \
+ ephy-autocompletion.h \
+ ephy-autocompletion-source.h \
+ ephy-bonobo-extensions.h \
+ ephy-debug.h \
+ ephy-dnd.h \
+ ephy-file-helpers.h \
+ ephy-glade.h \
+ ephy-gui.h \
+ ephy-marshal.h \
+ ephy-node-filter.h \
+ ephy-node-common.h \
+ ephy-prefs.h \
+ ephy-state.h \
+ ephy-string.h \
+ ephy-stock-icons.h \
+ ephy-thread-helpers.h \
+ ephy-zoom.h
+
+INST_H_FILES = \
+ ephy-dialog.h \
+ ephy-langs.h \
+ ephy-node.h \
+ ephy-node-db.h \
+ ephy-types.h
+
libephy_la_SOURCES = \
eel-gconf-extensions.c \
eel-gconf-extensions.h \
diff --git a/lib/ephy-langs.h b/lib/ephy-langs.h
index 30cb3a6d2..274d5a8a7 100644
--- a/lib/ephy-langs.h
+++ b/lib/ephy-langs.h
@@ -38,7 +38,7 @@ typedef enum
LG_GREEK,
LG_HEBREW,
LG_INDIAN,
- LG_JAPANESE,
+ LG_JAPANESE,
LG_KOREAN,
LG_TURKISH,
LG_UNICODE,
@@ -70,13 +70,14 @@ typedef struct
gchar* code;
} FontsLanguageInfo;
-void language_group_info_free (LanguageGroupInfo *info);
+guint ephy_langs_get_n_font_languages (void);
-void encoding_info_free (EncodingInfo *info);
+const FontsLanguageInfo *ephy_langs_get_font_languages (void);
-guint ephy_langs_get_n_font_languages (void);
+void language_group_info_free (LanguageGroupInfo *info);
+
+void encoding_info_free (EncodingInfo *info);
-const FontsLanguageInfo * ephy_langs_get_font_languages (void);
G_END_DECLS
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 6d9d9adab..2158c2da9 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -287,9 +287,12 @@ unref_signal_objects (long id,
EphyNodeSignalData *signal_data,
EphyNode *node)
{
- g_object_weak_unref (G_OBJECT (signal_data->data),
- (GWeakNotify)signal_object_weak_notify,
- signal_data);
+ if (signal_data->data)
+ {
+ g_object_weak_unref (G_OBJECT (signal_data->data),
+ (GWeakNotify)signal_object_weak_notify,
+ signal_data);
+ }
}
static void
@@ -1325,7 +1328,7 @@ ephy_node_signal_connect_object (EphyNode *node,
int ret;
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
-
+
signal_data = g_new0 (EphyNodeSignalData, 1);
signal_data->node = node;
signal_data->id = node->signal_id;
@@ -1336,8 +1339,13 @@ ephy_node_signal_connect_object (EphyNode *node,
g_hash_table_insert (node->signals,
GINT_TO_POINTER (node->signal_id),
signal_data);
- g_object_weak_ref (object, (GWeakNotify)signal_object_weak_notify,
- signal_data);
+ if (object)
+ {
+ g_object_weak_ref (object,
+ (GWeakNotify)signal_object_weak_notify,
+ signal_data);
+ }
+
ret = node->signal_id;
node->signal_id++;
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 456e189f4..8496a69ed 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1 +1,5 @@
-SUBDIRS = sample
+SUBDIRS =
+
+if ENABLE_SAMPLE_PLUGIN
+SUBDIRS += sample
+endif
diff --git a/plugins/sample/Makefile.am b/plugins/sample/Makefile.am
index 61f621445..45b79e024 100644
--- a/plugins/sample/Makefile.am
+++ b/plugins/sample/Makefile.am
@@ -1,11 +1,7 @@
plugindir = $(libdir)/epiphany/plugins
INCLUDES = \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/src/bookmarks \
- -I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/egg \
- -I$(top_srcdir)/embed \
+ -I/opt/gnome/include/epiphany-1.0 \
$(EPIPHANY_DEPENDENCY_CFLAGS) \
-DSHARE_DIR=\"$(pkgdatadir)\" \
-DG_DISABLE_DEPRECATED \
@@ -14,7 +10,7 @@ INCLUDES = \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED
-plugin_LTLIBRARIES = libephy.la
+plugin_LTLIBRARIES = libsample.la
-libephy_la_SOURCES = \
+libsample_la_SOURCES = \
sample.c
diff --git a/plugins/sample/sample.c b/plugins/sample/sample.c
index e19450401..c36352e6f 100644
--- a/plugins/sample/sample.c
+++ b/plugins/sample/sample.c
@@ -20,23 +20,97 @@
#include <gmodule.h>
#include <glib-object.h>
-#include "ephy-shell.h"
+#include "epiphany/ephy-shell.h"
+#include "epiphany/session.h"
static void
-bmks_changed (EphyBookmarks *bookmarks)
+bmk_added (EphyNode *node, EphyNode *child)
{
- g_print ("Bookmarks changed !\n");
+ g_print ("Bookmark added\n");
+}
+
+static void
+bmk_removed (EphyNode *node, EphyNode *child)
+{
+ g_print ("Bookmark removed\n");
+}
+
+static void
+bmk_changed (EphyNode *node, EphyNode *child)
+{
+ g_print ("Bookmark changed\n");
+}
+
+static void
+switch_page_cb (GtkWidget *widget)
+{
+ GtkWidget *toplevel;
+ EphyTab *tab;
+
+ toplevel = gtk_widget_get_toplevel (widget);
+
+ tab = ephy_window_get_active_tab (EPHY_WINDOW (toplevel));
+ g_print ("New active tab is %p\n", tab);
+}
+
+static void
+window_focus_in_cb (GtkWidget *widget, GdkEventFocus *event)
+{
+ EphyTab *tab;
+
+ tab = ephy_window_get_active_tab (EPHY_WINDOW (widget));
+ g_print ("New active tab is %p\n", tab);
+}
+
+static void
+location_changed_cb (EphyEmbed *embed, char *location)
+{
+ g_print ("New location %s\n", location);
+}
+
+static void
+tab_added_cb (GtkWidget *nb, GtkWidget *child)
+{
+ g_signal_connect (child, "ge_location",
+ G_CALLBACK (location_changed_cb), NULL);
+}
+
+static void
+new_window_cb (Session *session, EphyWindow *window)
+{
+ GtkWidget *nb;
+
+ nb = ephy_window_get_notebook (window);
+
+ g_signal_connect (window, "focus_in_event",
+ G_CALLBACK (window_focus_in_cb), NULL);
+ g_signal_connect (nb, "switch_page",
+ G_CALLBACK (switch_page_cb), NULL);
+ g_signal_connect (nb, "tab_added",
+ G_CALLBACK (tab_added_cb), NULL);
}
G_MODULE_EXPORT void
plugin_init (GTypeModule *module)
{
EphyBookmarks *bookmarks;
+ Session *session;
+ EphyNode *bmks;
g_print ("plugin init\n");
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
- g_signal_connect (bookmarks, "tree_changed", G_CALLBACK (bmks_changed), NULL);
+ bmks = ephy_bookmarks_get_bookmarks (bookmarks);
+ ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_ADDED,
+ (EphyNodeCallback) bmk_added, NULL);
+ ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_CHANGED,
+ (EphyNodeCallback) bmk_changed, NULL);
+ ephy_node_signal_connect_object (bmks, EPHY_NODE_CHILD_REMOVED,
+ (EphyNodeCallback) bmk_removed, NULL);
+
+ session = SESSION (ephy_shell_get_session (ephy_shell));
+ g_signal_connect (session, "new_window",
+ G_CALLBACK (new_window_cb), NULL);
}
G_MODULE_EXPORT void
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 ();