aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-11-17 02:53:41 +0800
committerXan Lopez <xan@src.gnome.org>2007-11-17 02:53:41 +0800
commitbbc813a37feca5e67d2a69e6aba1cd39458660a6 (patch)
treece01afb782f13c99b3185872fa6620fc2809bfca /src
parent7a04f9035bafcbaab6d01fe0cb65b0fa7bc7b6ad (diff)
downloadgsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar.gz
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar.bz2
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar.lz
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar.xz
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.tar.zst
gsoc2013-epiphany-bbc813a37feca5e67d2a69e6aba1cd39458660a6.zip
Move active-tab property to the embed-container interface.
Rename it to active-child and fix a bug in the set_property function in EphyWindow, where the wrong function was being called for this property. svn path=/trunk/; revision=7703
Diffstat (limited to 'src')
-rw-r--r--src/ephy-encoding-dialog.c2
-rw-r--r--src/ephy-session.c4
-rw-r--r--src/ephy-tabs-menu.c6
-rw-r--r--src/ephy-window.c20
4 files changed, 15 insertions, 17 deletions
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 4fa23bdf8..d58a43fc7 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -217,7 +217,7 @@ sync_parent_window_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer d
dialog->priv->window = window;
sync_active_tab (window, NULL, dialog);
- g_signal_connect (G_OBJECT (window), "notify::active-tab",
+ g_signal_connect (G_OBJECT (window), "notify::active-child",
G_CALLBACK (sync_active_tab), dialog);
}
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 9ad5c271c..6eca2d2ce 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1103,7 +1103,7 @@ write_active_tab (xmlTextWriterPtr writer,
current = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
- ret = xmlTextWriterWriteFormatAttribute (writer, (const xmlChar *) "active-tab", "%d", current);
+ ret = xmlTextWriterWriteFormatAttribute (writer, (const xmlChar *) "active-child", "%d", current);
return ret;
}
@@ -1487,7 +1487,7 @@ ephy_session_load (EphySession *session,
parse_embed (child->children, window, session);
/* Set focus to something sane */
- tmp = xmlGetProp (child, (xmlChar *) "active-tab");
+ tmp = xmlGetProp (child, (xmlChar *) "active-child");
if (tmp != NULL)
{
gboolean success;
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index e49b3ce14..a8ec273db 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -219,7 +219,7 @@ notebook_page_added_cb (EphyNotebook *notebook,
group = gtk_radio_action_get_group (GTK_RADIO_ACTION (priv->anchor_action));
gtk_radio_action_set_group (GTK_RADIO_ACTION (action), group);
- /* set this here too, since tab-added comes after notify::active-tab */
+ /* set this here too, since tab-added comes after notify::active-child */
if (ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (priv->window)) == embed)
{
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
@@ -307,7 +307,7 @@ sync_active_tab (EphyWindow *window,
LOG ("active tab is embed %p", embed);
action = g_object_get_data (G_OBJECT (embed), DATA_KEY);
- /* happens initially, since the ::active-tab comes before
+ /* happens initially, since the ::active-child comes before
* the ::tab-added signal
*/
/* FIXME that's not true with gtk+ 2.9 anymore */
@@ -339,7 +339,7 @@ ephy_tabs_menu_set_window (EphyTabsMenu *menu,
g_signal_connect (priv->action_group, "connect-proxy",
G_CALLBACK (connect_proxy_cb), NULL);
- g_signal_connect (window, "notify::active-tab",
+ g_signal_connect (window, "notify::active-child",
G_CALLBACK (sync_active_tab), menu);
notebook = ephy_window_get_notebook (window);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 15d37776a..85067efef 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -463,7 +463,7 @@ struct _EphyWindowPrivate
enum
{
PROP_0,
- PROP_ACTIVE_TAB,
+ PROP_ACTIVE_CHILD,
PROP_CHROME,
PROP_PPV_MODE,
PROP_SINGLE_TAB_MODE
@@ -2534,7 +2534,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
G_CALLBACK (ephy_window_dom_mouse_click_cb),
window, 0);
- g_object_notify (G_OBJECT (window), "active-tab");
+ g_object_notify (G_OBJECT (window), "active-child");
}
}
@@ -2976,8 +2976,8 @@ ephy_window_set_property (GObject *object,
switch (prop_id)
{
- case PROP_ACTIVE_TAB:
- ephy_window_set_active_tab (window, g_value_get_object (value));
+ case PROP_ACTIVE_CHILD:
+ ephy_window_set_active_child (window, g_value_get_object (value));
break;
case PROP_CHROME:
ephy_window_set_chrome (window, g_value_get_flags (value));
@@ -3001,7 +3001,7 @@ ephy_window_get_property (GObject *object,
switch (prop_id)
{
- case PROP_ACTIVE_TAB:
+ case PROP_ACTIVE_CHILD:
g_value_set_object (value, window->priv->active_embed);
break;
case PROP_CHROME:
@@ -3119,18 +3119,16 @@ ephy_window_class_init (EphyWindowClass *klass)
widget_class->delete_event = ephy_window_delete_event;
g_object_class_install_property (object_class,
- PROP_ACTIVE_TAB,
- g_param_spec_object ("active-tab", NULL, NULL,
- GTK_TYPE_WIDGET /* Can't use an interface type here */,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
-
- g_object_class_install_property (object_class,
PROP_PPV_MODE,
g_param_spec_boolean ("print-preview-mode", NULL, NULL,
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_object_class_override_property (object_class,
+ PROP_ACTIVE_CHILD,
+ "active-child");
+
+ g_object_class_override_property (object_class,
PROP_SINGLE_TAB_MODE,
"is-popup");