aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-13 03:04:48 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-13 03:04:48 +0800
commit3564d87bc51c44ac10645479f3523fff81d892f1 (patch)
tree96c9c817cd8ccc33c0188c8a7c7d311e618f4f4b /lib
parenta27be014985599ab073926bbf676846bdb2657c3 (diff)
downloadgsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar.gz
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar.bz2
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar.lz
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar.xz
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.tar.zst
gsoc2013-epiphany-3564d87bc51c44ac10645479f3523fff81d892f1.zip
Add Toolbar toggle to document context menu in fullscreen mode.
2005-01-12 Christian Persch <chpe@cvs.gnome.org> * data/ui/epiphany-ui.xml: Add Toolbar toggle to document context menu in fullscreen mode. * lib/egg/egg-editable-toolbar.c: (set_fixed_style), (update_fixed), (egg_editable_toolbar_set_fixed): * lib/egg/egg-editable-toolbar.h: Changed to allow setting a toolbar as fixed, not just one item. * lib/widgets/ephy-search-entry.h: Add _ prefixed struct declarations. * po/POTFILES.in: Updated. * src/Makefile.am: A src/ephy-fullscreen-popup.c: A src/ephy-fullscreen-popup.h: * src/ephy-history-window.c: * src/ephy-shell.c: (ephy_shell_new_tab): A src/ephy-toolbar.c: A src/ephy-toolbar.h: * src/ephy-window.c: (destroy_fullscreen_popup), (ephy_window_destroy), (exit_fullscreen_clicked_cb), (get_toolbar_visibility), (sync_chromes_visibility), (ephy_window_fullscreen), (ephy_window_unfullscreen), (sync_tab_address), (sync_tab_icon), (sync_tab_navigation), (sync_tab_security), (sync_tab_load_status), (sync_tab_zoom), (show_embed_popup), (modal_alert_cb), (ephy_window_focus_in_event), (ephy_window_focus_out_event), (ephy_window_init), (ephy_window_activate_location): R src/toolbar.c: R src/toolbar.h: * src/window-commands.c: (window_cmd_load_location): Implemented in-toolbar exit button, and integrated status indicator in the exit fullscreen popup. Moved toolbar.[ch] to ephy-toolbar.[ch] for namespace correcness, and much-needed code cleanup.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c44
-rwxr-xr-xlib/egg/egg-editable-toolbar.h18
-rw-r--r--lib/widgets/ephy-location-entry.c4
-rw-r--r--lib/widgets/ephy-location-entry.h4
-rw-r--r--lib/widgets/ephy-search-entry.h28
5 files changed, 45 insertions, 53 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 72884e5f7..58a9c67b2 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2003-2004 Marco Pesenti Gritti
- * Copyright (C) 2004 Christian Persch
+ * Copyright (C) 2003, 2004 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -71,13 +71,12 @@ static GObjectClass *parent_class = NULL;
#define EGG_EDITABLE_TOOLBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarPrivate))
-struct EggEditableToolbarPrivate
+struct _EggEditableToolbarPrivate
{
GtkUIManager *manager;
EggToolbarsModel *model;
gboolean edit_mode;
GtkWidget *selected_toolbar;
- GtkToolItem *fixed;
GtkWidget *fixed_toolbar;
gboolean pending;
@@ -723,7 +722,8 @@ static void
set_fixed_style (EggEditableToolbar *t, GtkToolbarStyle style)
{
g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
- gtk_toolbar_set_style (GTK_TOOLBAR (t->priv->fixed_toolbar), style);
+ gtk_toolbar_set_style (GTK_TOOLBAR (t->priv->fixed_toolbar),
+ style == GTK_TOOLBAR_ICONS ? GTK_TOOLBAR_BOTH_HORIZ : style);
}
static void
@@ -806,7 +806,7 @@ update_fixed (EggEditableToolbar *t)
{
gtk_box_pack_end (GTK_BOX (dock), toolbar, FALSE, TRUE, 0);
- gtk_widget_show_all (toolbar);
+ gtk_widget_show (toolbar);
}
}
@@ -1260,35 +1260,27 @@ egg_editable_toolbar_hide (EggEditableToolbar *etoolbar,
void
egg_editable_toolbar_set_fixed (EggEditableToolbar *toolbar,
- GtkToolItem *fixed)
+ GtkToolbar *fixed_toolbar)
{
g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (toolbar));
- g_return_if_fail (!fixed || GTK_IS_TOOL_ITEM (fixed));
+ g_return_if_fail (!fixed_toolbar || GTK_IS_TOOLBAR (fixed_toolbar));
- if (!toolbar->priv->fixed_toolbar)
+ if (toolbar->priv->fixed_toolbar)
{
- toolbar->priv->fixed_toolbar = gtk_toolbar_new ();
- gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar->priv->fixed_toolbar), FALSE);
- g_object_ref (toolbar->priv->fixed_toolbar);
- gtk_object_sink (GTK_OBJECT (toolbar->priv->fixed_toolbar));
+ unparent_fixed (toolbar);
+ g_object_unref (toolbar->priv->fixed_toolbar);
+ toolbar->priv->fixed_toolbar = NULL;
}
- if (toolbar->priv->fixed)
+ if (fixed_toolbar)
{
- gtk_container_remove (GTK_CONTAINER (toolbar->priv->fixed_toolbar),
- GTK_WIDGET (toolbar->priv->fixed));
- g_object_unref (toolbar->priv->fixed);
+ toolbar->priv->fixed_toolbar = GTK_WIDGET (fixed_toolbar);
+ gtk_toolbar_set_show_arrow (fixed_toolbar, FALSE);
+ g_object_ref (fixed_toolbar);
+ gtk_object_sink (GTK_OBJECT (fixed_toolbar));
}
- toolbar->priv->fixed = fixed;
-
- if (fixed)
- {
- g_object_ref (fixed);
- gtk_object_sink (GTK_OBJECT (fixed));
-
- gtk_toolbar_insert (GTK_TOOLBAR (toolbar->priv->fixed_toolbar), fixed, 0);
- }
+ update_fixed (toolbar);
}
void
diff --git a/lib/egg/egg-editable-toolbar.h b/lib/egg/egg-editable-toolbar.h
index 2aa087b5f..9f143da70 100755
--- a/lib/egg/egg-editable-toolbar.h
+++ b/lib/egg/egg-editable-toolbar.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2003-2004 Marco Pesenti Gritti
- * Copyright (C) 2004 Christian Persch
+ * Copyright (C) 2003, 2004 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,8 +32,6 @@
G_BEGIN_DECLS
-typedef struct EggEditableToolbarClass EggEditableToolbarClass;
-
#define EGG_TYPE_EDITABLE_TOOLBAR (egg_editable_toolbar_get_type ())
#define EGG_EDITABLE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
#define EGG_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
@@ -41,11 +39,11 @@ typedef struct EggEditableToolbarClass EggEditableToolbarClass;
#define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
#define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
+typedef struct _EggEditableToolbar EggEditableToolbar;
+typedef struct _EggEditableToolbarPrivate EggEditableToolbarPrivate;
+typedef struct _EggEditableToolbarClass EggEditableToolbarClass;
-typedef struct EggEditableToolbar EggEditableToolbar;
-typedef struct EggEditableToolbarPrivate EggEditableToolbarPrivate;
-
-struct EggEditableToolbar
+struct _EggEditableToolbar
{
GtkVBox parent_object;
@@ -53,7 +51,7 @@ struct EggEditableToolbar
EggEditableToolbarPrivate *priv;
};
-struct EggEditableToolbarClass
+struct _EggEditableToolbarClass
{
GtkVBoxClass parent_class;
@@ -80,7 +78,7 @@ void egg_editable_toolbar_set_drag_dest (EggEditableToolbar *etoolbar,
gint n_targets,
const char *toolbar_name);
void egg_editable_toolbar_set_fixed (EggEditableToolbar *etoolbar,
- GtkToolItem *fixed);
+ GtkToolbar *fixed_toolbar);
/* Private Functions */
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 889b23003..be5394692 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1,8 +1,8 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2002 Ricardo Fernández Pascual
- * Copyright (C) 2003 Marco Pesenti Gritti
- * Copyright (C) 2003 Christian Persch
+ * Copyright (C) 2003, 2004 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h
index c4a44addc..f8c8dfad0 100644
--- a/lib/widgets/ephy-location-entry.h
+++ b/lib/widgets/ephy-location-entry.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2002 Ricardo Fernández Pascual
- * Copyright (C) 2003 Marco Pesenti Gritti
- * Copyright (C) 2003 Christian Persch
+ * Copyright (C) 2003, 2004 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/widgets/ephy-search-entry.h b/lib/widgets/ephy-search-entry.h
index d641ac043..47e18280a 100644
--- a/lib/widgets/ephy-search-entry.h
+++ b/lib/widgets/ephy-search-entry.h
@@ -25,29 +25,31 @@
G_BEGIN_DECLS
-#define EPHY_TYPE_SEARCH_ENTRY (ephy_search_entry_get_type ())
-#define EPHY_SEARCH_ENTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntry))
-#define EPHY_SEARCH_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntryClass))
-#define EPHY_IS_SEARCH_ENTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SEARCH_ENTRY))
-#define EPHY_IS_SEARCH_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SEARCH_ENTRY))
-#define EPHY_SEARCH_ENTRY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntryClass))
-
-typedef struct _EphySearchEntryPrivate EphySearchEntryPrivate;
-
-typedef struct
+#define EPHY_TYPE_SEARCH_ENTRY (ephy_search_entry_get_type ())
+#define EPHY_SEARCH_ENTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntry))
+#define EPHY_SEARCH_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntryClass))
+#define EPHY_IS_SEARCH_ENTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SEARCH_ENTRY))
+#define EPHY_IS_SEARCH_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SEARCH_ENTRY))
+#define EPHY_SEARCH_ENTRY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SEARCH_ENTRY, EphySearchEntryClass))
+
+typedef struct _EphySearchEntry EphySearchEntry;
+typedef struct _EphySearchEntryPrivate EphySearchEntryPrivate;
+typedef struct _EphySearchEntryClass EphySearchEntryClass;
+
+struct _EphySearchEntry
{
GtkEntry parent;
/*< private >*/
EphySearchEntryPrivate *priv;
-} EphySearchEntry;
+};
-typedef struct
+struct _EphySearchEntryClass
{
GtkEntryClass parent;
void (*search) (EphySearchEntry *view, const char *text);
-} EphySearchEntryClass;
+};
GType ephy_search_entry_get_type (void);