aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCrispin Flowerday <gnome@flowerday.cx>2006-01-18 02:54:32 +0800
committerCrispin Flowerday <crispin@src.gnome.org>2006-01-18 02:54:32 +0800
commitf81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377 (patch)
tree9bf35ea0a30bf7c1c5823e56bc084e7e2f9a5ada
parentce161c639c50899f3b720e31a55397542e6a6a4c (diff)
downloadgsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar.gz
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar.bz2
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar.lz
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar.xz
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.tar.zst
gsoc2013-epiphany-f81cb08fcbb2efc28cfccfa3fd685ad9d8c0e377.zip
Change the 'ephy_embed_event_get_property' function return a GValue*
2006-01-17 Crispin Flowerday <gnome@flowerday.cx> * embed/ephy-embed-event.c: (ephy_embed_event_get_property): * embed/ephy-embed-event.h: * embed/mozilla/mozilla-embed-event.cpp: * src/ephy-tab.c: (save_property_url), (ephy_tab_dom_mouse_click_cb): * src/ephy-window.c: (update_popups_tooltips), (show_embed_popup): * src/epiphany.defs: * src/epiphany.override: * src/popup-commands.c: (popup_cmd_link_in_new_window), (popup_cmd_link_in_new_tab), (popup_cmd_bookmark_link), (popup_cmd_copy_link_address), (save_property_url), (popup_cmd_open_link), (popup_cmd_set_image_as_background), (popup_cmd_copy_image_location), (popup_cmd_open_image): Change the 'ephy_embed_event_get_property' function return a GValue* rather than taking a pointer to it as an argument.
-rw-r--r--ChangeLog20
-rw-r--r--embed/ephy-embed-event.c7
-rw-r--r--embed/ephy-embed-event.h11
-rw-r--r--embed/mozilla/mozilla-embed-event.cpp7
-rw-r--r--src/ephy-tab.c4
-rw-r--r--src/ephy-window.c8
-rw-r--r--src/epiphany.defs3
-rw-r--r--src/epiphany.override2
-rw-r--r--src/popup-commands.c28
9 files changed, 52 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index d4f6d1fba..09229146e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-01-17 Crispin Flowerday <gnome@flowerday.cx>
+
+ * embed/ephy-embed-event.c: (ephy_embed_event_get_property):
+ * embed/ephy-embed-event.h:
+ * embed/mozilla/mozilla-embed-event.cpp:
+ * src/ephy-tab.c: (save_property_url),
+ (ephy_tab_dom_mouse_click_cb):
+ * src/ephy-window.c: (update_popups_tooltips), (show_embed_popup):
+ * src/epiphany.defs:
+ * src/epiphany.override:
+ * src/popup-commands.c: (popup_cmd_link_in_new_window),
+ (popup_cmd_link_in_new_tab), (popup_cmd_bookmark_link),
+ (popup_cmd_copy_link_address), (save_property_url),
+ (popup_cmd_open_link), (popup_cmd_set_image_as_background),
+ (popup_cmd_copy_image_location), (popup_cmd_open_image):
+
+ Change the 'ephy_embed_event_get_property' function
+ return a GValue* rather than taking a pointer to it as
+ an argument.
+
2006-01-17 Christian Persch <chpe@cvs.gnome.org>
* data/glade/prefs-dialog.glade:
diff --git a/embed/ephy-embed-event.c b/embed/ephy-embed-event.c
index 7a4ef6826..069a839d7 100644
--- a/embed/ephy-embed-event.c
+++ b/embed/ephy-embed-event.c
@@ -88,13 +88,12 @@ ephy_embed_event_get_coords (EphyEmbedEvent *event,
iface->get_coordinates (event, x, y);
}
-void
+const GValue*
ephy_embed_event_get_property (EphyEmbedEvent *event,
- const char *name,
- const GValue **value)
+ const char *name)
{
EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
- iface->get_property (event, name, value);
+ return iface->get_property (event, name);
}
gboolean
diff --git a/embed/ephy-embed-event.h b/embed/ephy-embed-event.h
index 95d59d073..075a971b0 100644
--- a/embed/ephy-embed-event.h
+++ b/embed/ephy-embed-event.h
@@ -61,9 +61,8 @@ struct _EphyEmbedEventIface
void (* get_coordinates) (EphyEmbedEvent *event,
guint *x,
guint *y);
- void (* get_property) (EphyEmbedEvent *event,
- const char *name,
- const GValue **value);
+ const GValue* (* get_property) (EphyEmbedEvent *event,
+ const char *name);
gboolean (* has_property) (EphyEmbedEvent *event,
const char *name);
gpointer (* get_dom_event) (EphyEmbedEvent *event);
@@ -85,10 +84,8 @@ guint ephy_embed_event_get_modifier (EphyEmbedEvent *event);
void ephy_embed_event_get_coords (EphyEmbedEvent *event,
guint *x, guint *y);
-
-void ephy_embed_event_get_property (EphyEmbedEvent *event,
- const char *name,
- const GValue **value);
+const GValue* ephy_embed_event_get_property (EphyEmbedEvent *event,
+ const char *name);
gboolean ephy_embed_event_has_property (EphyEmbedEvent *event,
const char *name);
diff --git a/embed/mozilla/mozilla-embed-event.cpp b/embed/mozilla/mozilla-embed-event.cpp
index cbd2802d4..eae87d95c 100644
--- a/embed/mozilla/mozilla-embed-event.cpp
+++ b/embed/mozilla/mozilla-embed-event.cpp
@@ -140,12 +140,11 @@ impl_get_coordinates (EphyEmbedEvent *event,
*y = ((MozillaEmbedEvent *) event)->y;
}
-static void
+static const GValue*
impl_get_property (EphyEmbedEvent *event,
- const char *name,
- const GValue **value)
+ const char *name)
{
- *value = (const GValue *) g_hash_table_lookup (((MozillaEmbedEvent *) event)->priv->props, name);
+ return (const GValue *) g_hash_table_lookup (((MozillaEmbedEvent *) event)->priv->props, name);
}
static gboolean
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 3d7a5dce0..838e192bf 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -1870,7 +1870,7 @@ save_property_url (EphyEmbed *embed,
const GValue *value;
EphyEmbedPersist *persist;
- ephy_embed_event_get_property (event, property, &value);
+ value = ephy_embed_event_get_property (event, property);
location = g_value_get_string (value);
persist = EPHY_EMBED_PERSIST
@@ -1951,7 +1951,7 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed,
const GValue *value;
const char *link_address;
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
link_address = g_value_get_string (value);
handled = open_link_in_new_tab (tab, link_address);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 1c4178f18..7e9c965c2 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1835,7 +1835,7 @@ update_popups_tooltips (EphyWindow *window, EphyEmbedEvent *event)
if (context & EPHY_EMBED_CONTEXT_IMAGE)
{
- ephy_embed_event_get_property (event, "image", &value);
+ value = ephy_embed_event_get_property (event, "image");
name = get_name_from_address_value (value);
action = gtk_action_group_get_action (group, "OpenImage");
@@ -1864,7 +1864,7 @@ update_popups_tooltips (EphyWindow *window, EphyEmbedEvent *event)
if (context & EPHY_EMBED_CONTEXT_EMAIL_LINK)
{
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
action = gtk_action_group_get_action (group, "SendEmail");
tooltip = g_strdup_printf (_("Send email to address ā€œ%sā€"),
@@ -1881,7 +1881,7 @@ update_popups_tooltips (EphyWindow *window, EphyEmbedEvent *event)
if (context & EPHY_EMBED_CONTEXT_LINK)
{
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
action = gtk_action_group_get_action (group, "DownloadLink");
name = get_name_from_address_value (value);
@@ -1925,7 +1925,7 @@ show_embed_popup (EphyWindow *window,
return;
}
- ephy_embed_event_get_property (event, "framed_page", &value);
+ value = ephy_embed_event_get_property (event, "framed_page");
framed = g_value_get_int (value);
can_open_in_new = ephy_embed_event_has_property (event, "link-has-web-scheme");
diff --git a/src/epiphany.defs b/src/epiphany.defs
index 78b910b78..15e5bcb76 100644
--- a/src/epiphany.defs
+++ b/src/epiphany.defs
@@ -599,10 +599,9 @@
(define-method get_property
(of-object "EphyEmbedEvent")
(c-name "ephy_embed_event_get_property")
- (return-type "none")
+ (return-type "const-GValue*")
(parameters
'("const-char*" "name")
- '("const-GValue**" "value")
)
)
diff --git a/src/epiphany.override b/src/epiphany.override
index 5018bd9f2..1d1535f79 100644
--- a/src/epiphany.override
+++ b/src/epiphany.override
@@ -359,7 +359,7 @@ _wrap_ephy_embed_event_get_property (PyGObject *self,
"s:EphyEmbedEvent.get_property", kwlist, &prop))
return NULL;
- ephy_embed_event_get_property (EPHY_EMBED_EVENT (self->obj), prop, &value);
+ value = ephy_embed_event_get_property (EPHY_EMBED_EVENT (self->obj), prop);
return pyg_value_as_pyobject(value, TRUE);
}
diff --git a/src/popup-commands.c b/src/popup-commands.c
index f05167bb4..107304f83 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -51,7 +51,7 @@ popup_cmd_link_in_new_window (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
ephy_shell_new_tab (ephy_shell, NULL, tab,
g_value_get_string (value),
@@ -72,7 +72,7 @@ popup_cmd_link_in_new_tab (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
ephy_shell_new_tab (ephy_shell, window, tab,
g_value_get_string (value),
@@ -98,11 +98,11 @@ popup_cmd_bookmark_link (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- ephy_embed_event_get_property (event, "link_is_smart", &link_is_smart);
- ephy_embed_event_get_property (event, "link", &link);
- ephy_embed_event_get_property (event, "link_title", &link_title);
- ephy_embed_event_get_property (event, "link_rel", &link_rel);
- ephy_embed_event_get_property (event, "linktext", &linktext);
+ link_is_smart = ephy_embed_event_get_property (event, "link_is_smart");
+ link = ephy_embed_event_get_property (event, "link");
+ link_title = ephy_embed_event_get_property (event, "link_title");
+ link_rel = ephy_embed_event_get_property (event, "link_rel");
+ linktext = ephy_embed_event_get_property (event, "linktext");
location = g_value_get_string (link);
g_return_if_fail (location);
@@ -155,13 +155,13 @@ popup_cmd_copy_link_address (GtkAction *action,
if (context & EPHY_EMBED_CONTEXT_EMAIL_LINK)
{
- ephy_embed_event_get_property (event, "email", &value);
+ value = ephy_embed_event_get_property (event, "email");
address = g_value_get_string (value);
popup_cmd_copy_to_clipboard (window, address);
}
else if (context & EPHY_EMBED_CONTEXT_LINK)
{
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
address = g_value_get_string (value);
popup_cmd_copy_to_clipboard (window, address);
}
@@ -186,7 +186,7 @@ save_property_url (GtkAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
- ephy_embed_event_get_property (event, property, &value);
+ value = ephy_embed_event_get_property (event, property);
location = g_value_get_string (value);
persist = EPHY_EMBED_PERSIST
@@ -219,7 +219,7 @@ popup_cmd_open_link (GtkAction *action,
g_return_if_fail (embed != NULL);
event = ephy_window_get_context_event (window);
- ephy_embed_event_get_property (event, "link", &value);
+ value = ephy_embed_event_get_property (event, "link");
location = g_value_get_string (value);
ephy_embed_load_url (embed, location);
@@ -292,7 +292,7 @@ popup_cmd_set_image_as_background (GtkAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
- ephy_embed_event_get_property (event, "image", &value);
+ value = ephy_embed_event_get_property (event, "image");
location = g_value_get_string (value);
persist = EPHY_EMBED_PERSIST
@@ -327,7 +327,7 @@ popup_cmd_copy_image_location (GtkAction *action,
const GValue *value;
event = ephy_window_get_context_event (window);
- ephy_embed_event_get_property (event, "image", &value);
+ value = ephy_embed_event_get_property (event, "image");
location = g_value_get_string (value);
popup_cmd_copy_to_clipboard (window, location);
}
@@ -435,7 +435,7 @@ popup_cmd_open_image (GtkAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
- ephy_embed_event_get_property (event, "image", &value);
+ value = ephy_embed_event_get_property (event, "image");
address = g_value_get_string (value);
scheme = gnome_vfs_get_uri_scheme (address);