Commit beaba05a authored by Michael Catanzaro's avatar Michael Catanzaro

Purge g_return from embed/

parent 3f97148d
...@@ -270,8 +270,8 @@ void ...@@ -270,8 +270,8 @@ void
ephy_download_set_destination_uri (EphyDownload *download, ephy_download_set_destination_uri (EphyDownload *download,
const char *destination) const char *destination)
{ {
g_return_if_fail (EPHY_IS_DOWNLOAD (download)); g_assert (EPHY_IS_DOWNLOAD (download));
g_return_if_fail (destination != NULL); g_assert (destination != NULL);
webkit_download_set_destination (download->download, destination); webkit_download_set_destination (download->download, destination);
g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_DESTINATION]); g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_DESTINATION]);
...@@ -290,7 +290,7 @@ void ...@@ -290,7 +290,7 @@ void
ephy_download_set_action (EphyDownload *download, ephy_download_set_action (EphyDownload *download,
EphyDownloadActionType action) EphyDownloadActionType action)
{ {
g_return_if_fail (EPHY_IS_DOWNLOAD (download)); g_assert (EPHY_IS_DOWNLOAD (download));
download->action = action; download->action = action;
g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_ACTION]); g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_ACTION]);
...@@ -307,7 +307,7 @@ ephy_download_set_action (EphyDownload *download, ...@@ -307,7 +307,7 @@ ephy_download_set_action (EphyDownload *download,
WebKitDownload * WebKitDownload *
ephy_download_get_webkit_download (EphyDownload *download) ephy_download_get_webkit_download (EphyDownload *download)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), NULL); g_assert (EPHY_IS_DOWNLOAD (download));
return download->download; return download->download;
} }
...@@ -323,7 +323,7 @@ ephy_download_get_webkit_download (EphyDownload *download) ...@@ -323,7 +323,7 @@ ephy_download_get_webkit_download (EphyDownload *download)
const char * const char *
ephy_download_get_destination_uri (EphyDownload *download) ephy_download_get_destination_uri (EphyDownload *download)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), NULL); g_assert (EPHY_IS_DOWNLOAD (download));
return webkit_download_get_destination (download->download); return webkit_download_get_destination (download->download);
} }
...@@ -342,7 +342,7 @@ ephy_download_get_destination_uri (EphyDownload *download) ...@@ -342,7 +342,7 @@ ephy_download_get_destination_uri (EphyDownload *download)
EphyDownloadActionType EphyDownloadActionType
ephy_download_get_action (EphyDownload *download) ephy_download_get_action (EphyDownload *download)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), EPHY_DOWNLOAD_ACTION_NONE); g_assert (EPHY_IS_DOWNLOAD (download));
return download->action; return download->action;
} }
...@@ -373,7 +373,7 @@ ephy_download_get_start_time (EphyDownload *download) ...@@ -373,7 +373,7 @@ ephy_download_get_start_time (EphyDownload *download)
void void
ephy_download_cancel (EphyDownload *download) ephy_download_cancel (EphyDownload *download)
{ {
g_return_if_fail (EPHY_IS_DOWNLOAD (download)); g_assert (EPHY_IS_DOWNLOAD (download));
webkit_download_cancel (download->download); webkit_download_cancel (download->download);
} }
...@@ -381,7 +381,7 @@ ephy_download_cancel (EphyDownload *download) ...@@ -381,7 +381,7 @@ ephy_download_cancel (EphyDownload *download)
gboolean gboolean
ephy_download_is_active (EphyDownload *download) ephy_download_is_active (EphyDownload *download)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE); g_assert (EPHY_IS_DOWNLOAD (download));
return !download->finished; return !download->finished;
} }
...@@ -389,7 +389,7 @@ ephy_download_is_active (EphyDownload *download) ...@@ -389,7 +389,7 @@ ephy_download_is_active (EphyDownload *download)
gboolean gboolean
ephy_download_succeeded (EphyDownload *download) ephy_download_succeeded (EphyDownload *download)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE); g_assert (EPHY_IS_DOWNLOAD (download));
return download->finished && !download->error; return download->finished && !download->error;
} }
...@@ -398,7 +398,7 @@ gboolean ...@@ -398,7 +398,7 @@ gboolean
ephy_download_failed (EphyDownload *download, ephy_download_failed (EphyDownload *download,
GError **error) GError **error)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE); g_assert (EPHY_IS_DOWNLOAD (download));
if (download->finished && download->error) { if (download->finished && download->error) {
if (error) if (error)
...@@ -722,7 +722,7 @@ ephy_download_new (WebKitDownload *download) ...@@ -722,7 +722,7 @@ ephy_download_new (WebKitDownload *download)
{ {
EphyDownload *ephy_download; EphyDownload *ephy_download;
g_return_val_if_fail (WEBKIT_IS_DOWNLOAD (download), NULL); g_assert (WEBKIT_IS_DOWNLOAD (download));
ephy_download = g_object_new (EPHY_TYPE_DOWNLOAD, NULL); ephy_download = g_object_new (EPHY_TYPE_DOWNLOAD, NULL);
...@@ -763,7 +763,7 @@ ephy_download_new_for_uri (const char *uri) ...@@ -763,7 +763,7 @@ ephy_download_new_for_uri (const char *uri)
WebKitDownload *download; WebKitDownload *download;
EphyEmbedShell *shell = ephy_embed_shell_get_default (); EphyEmbedShell *shell = ephy_embed_shell_get_default ();
g_return_val_if_fail (uri != NULL, NULL); g_assert (uri != NULL);
download = webkit_web_context_download_uri (ephy_embed_shell_get_web_context (shell), uri); download = webkit_web_context_download_uri (ephy_embed_shell_get_web_context (shell), uri);
ephy_download = ephy_download_new (download); ephy_download = ephy_download_new (download);
......
...@@ -165,8 +165,8 @@ ephy_downloads_manager_add_download (EphyDownloadsManager *manager, ...@@ -165,8 +165,8 @@ ephy_downloads_manager_add_download (EphyDownloadsManager *manager,
{ {
WebKitDownload *wk_download; WebKitDownload *wk_download;
g_return_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager)); g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
g_return_if_fail (EPHY_IS_DOWNLOAD (download)); g_assert (EPHY_IS_DOWNLOAD (download));
if (g_list_find (manager->downloads, download)) if (g_list_find (manager->downloads, download))
return; return;
...@@ -195,8 +195,8 @@ ephy_downloads_manager_remove_download (EphyDownloadsManager *manager, ...@@ -195,8 +195,8 @@ ephy_downloads_manager_remove_download (EphyDownloadsManager *manager,
{ {
GList *download_link; GList *download_link;
g_return_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager)); g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
g_return_if_fail (EPHY_IS_DOWNLOAD (download)); g_assert (EPHY_IS_DOWNLOAD (download));
download_link = g_list_find (manager->downloads, download); download_link = g_list_find (manager->downloads, download);
if (!download_link) if (!download_link)
...@@ -212,7 +212,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager) ...@@ -212,7 +212,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager)
{ {
GList *l; GList *l;
g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), FALSE); g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
for (l = manager->downloads; l; l = g_list_next (l)) { for (l = manager->downloads; l; l = g_list_next (l)) {
EphyDownload *download = EPHY_DOWNLOAD (l->data); EphyDownload *download = EPHY_DOWNLOAD (l->data);
...@@ -227,7 +227,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager) ...@@ -227,7 +227,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager)
GList * GList *
ephy_downloads_manager_get_downloads (EphyDownloadsManager *manager) ephy_downloads_manager_get_downloads (EphyDownloadsManager *manager)
{ {
g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), NULL); g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
return manager->downloads; return manager->downloads;
} }
...@@ -239,7 +239,7 @@ ephy_downloads_manager_get_estimated_progress (EphyDownloadsManager *manager) ...@@ -239,7 +239,7 @@ ephy_downloads_manager_get_estimated_progress (EphyDownloadsManager *manager)
guint n_active = 0; guint n_active = 0;
gdouble progress = 0; gdouble progress = 0;
g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), 0); g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
for (l = manager->downloads; l; l = g_list_next (l)) { for (l = manager->downloads; l; l = g_list_next (l)) {
EphyDownload *download = EPHY_DOWNLOAD (l->data); EphyDownload *download = EPHY_DOWNLOAD (l->data);
......
...@@ -59,8 +59,8 @@ ephy_embed_container_add_child (EphyEmbedContainer *container, ...@@ -59,8 +59,8 @@ ephy_embed_container_add_child (EphyEmbedContainer *container,
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), -1); g_assert (EPHY_IS_EMBED_CONTAINER (container));
g_return_val_if_fail (EPHY_IS_EMBED (child), -1); g_assert (EPHY_IS_EMBED (child));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->add_child (container, child, position, set_active); return iface->add_child (container, child, position, set_active);
...@@ -79,8 +79,8 @@ ephy_embed_container_set_active_child (EphyEmbedContainer *container, ...@@ -79,8 +79,8 @@ ephy_embed_container_set_active_child (EphyEmbedContainer *container,
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container)); g_assert (EPHY_IS_EMBED_CONTAINER (container));
g_return_if_fail (EPHY_IS_EMBED (child)); g_assert (EPHY_IS_EMBED (child));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
...@@ -100,8 +100,8 @@ ephy_embed_container_remove_child (EphyEmbedContainer *container, ...@@ -100,8 +100,8 @@ ephy_embed_container_remove_child (EphyEmbedContainer *container,
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container)); g_assert (EPHY_IS_EMBED_CONTAINER (container));
g_return_if_fail (EPHY_IS_EMBED (child)); g_assert (EPHY_IS_EMBED (child));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
...@@ -121,7 +121,7 @@ ephy_embed_container_get_active_child (EphyEmbedContainer *container) ...@@ -121,7 +121,7 @@ ephy_embed_container_get_active_child (EphyEmbedContainer *container)
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL); g_assert (EPHY_IS_EMBED_CONTAINER (container));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_active_child (container); return iface->get_active_child (container);
...@@ -141,7 +141,7 @@ ephy_embed_container_get_children (EphyEmbedContainer *container) ...@@ -141,7 +141,7 @@ ephy_embed_container_get_children (EphyEmbedContainer *container)
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL); g_assert (EPHY_IS_EMBED_CONTAINER (container));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_children (container); return iface->get_children (container);
...@@ -160,7 +160,7 @@ ephy_embed_container_get_is_popup (EphyEmbedContainer *container) ...@@ -160,7 +160,7 @@ ephy_embed_container_get_is_popup (EphyEmbedContainer *container)
{ {
EphyEmbedContainerInterface *iface; EphyEmbedContainerInterface *iface;
g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), FALSE); g_assert (EPHY_IS_EMBED_CONTAINER (container));
iface = EPHY_EMBED_CONTAINER_GET_IFACE (container); iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_is_popup (container); return iface->get_is_popup (container);
......
...@@ -78,7 +78,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event) ...@@ -78,7 +78,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event)
{ {
guint context; guint context;
g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0); g_assert (EPHY_IS_EMBED_EVENT (event));
g_object_get (event->hit_test_result, "context", &context, NULL); g_object_get (event->hit_test_result, "context", &context, NULL);
return context; return context;
...@@ -87,7 +87,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event) ...@@ -87,7 +87,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event)
guint guint
ephy_embed_event_get_button (EphyEmbedEvent *event) ephy_embed_event_get_button (EphyEmbedEvent *event)
{ {
g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0); g_assert (EPHY_IS_EMBED_EVENT (event));
return event->button; return event->button;
} }
...@@ -95,7 +95,7 @@ ephy_embed_event_get_button (EphyEmbedEvent *event) ...@@ -95,7 +95,7 @@ ephy_embed_event_get_button (EphyEmbedEvent *event)
guint guint
ephy_embed_event_get_modifier (EphyEmbedEvent *event) ephy_embed_event_get_modifier (EphyEmbedEvent *event)
{ {
g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0); g_assert (EPHY_IS_EMBED_EVENT (event));
return event->modifier; return event->modifier;
} }
...@@ -104,7 +104,7 @@ void ...@@ -104,7 +104,7 @@ void
ephy_embed_event_get_coords (EphyEmbedEvent *event, ephy_embed_event_get_coords (EphyEmbedEvent *event,
guint *x, guint *y) guint *x, guint *y)
{ {
g_return_if_fail (EPHY_IS_EMBED_EVENT (event)); g_assert (EPHY_IS_EMBED_EVENT (event));
if (x) if (x)
*x = event->x; *x = event->x;
...@@ -123,8 +123,8 @@ ephy_embed_event_get_property (EphyEmbedEvent *event, ...@@ -123,8 +123,8 @@ ephy_embed_event_get_property (EphyEmbedEvent *event,
const char *name, const char *name,
GValue *value) GValue *value)
{ {
g_return_if_fail (EPHY_IS_EMBED_EVENT (event)); g_assert (EPHY_IS_EMBED_EVENT (event));
g_return_if_fail (name); g_assert (name);
/* FIXME: ugly hack! This only works for now because all properties /* FIXME: ugly hack! This only works for now because all properties
we have are strings */ we have are strings */
...@@ -137,8 +137,8 @@ gboolean ...@@ -137,8 +137,8 @@ gboolean
ephy_embed_event_has_property (EphyEmbedEvent *event, ephy_embed_event_has_property (EphyEmbedEvent *event,
const char *name) const char *name)
{ {
g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), FALSE); g_assert (EPHY_IS_EMBED_EVENT (event));
g_return_val_if_fail (name, FALSE); g_assert (name);
return g_object_class_find_property (G_OBJECT_GET_CLASS (event->hit_test_result), return g_object_class_find_property (G_OBJECT_GET_CLASS (event->hit_test_result),
name) != NULL; name) != NULL;
...@@ -153,7 +153,7 @@ ephy_embed_event_has_property (EphyEmbedEvent *event, ...@@ -153,7 +153,7 @@ ephy_embed_event_has_property (EphyEmbedEvent *event,
WebKitHitTestResult * WebKitHitTestResult *
ephy_embed_event_get_hit_test_result (EphyEmbedEvent *event) ephy_embed_event_get_hit_test_result (EphyEmbedEvent *event)
{ {
g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), NULL); g_assert (EPHY_IS_EMBED_EVENT (event));
return event->hit_test_result; return event->hit_test_result;
} }
...@@ -539,7 +539,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell) ...@@ -539,7 +539,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
{ {
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (priv->global_history_service == NULL) { if (priv->global_history_service == NULL) {
char *filename; char *filename;
...@@ -554,7 +554,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell) ...@@ -554,7 +554,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL); filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
priv->global_history_service = ephy_history_service_new (filename, mode); priv->global_history_service = ephy_history_service_new (filename, mode);
g_free (filename); g_free (filename);
g_return_val_if_fail (priv->global_history_service, NULL); g_assert (priv->global_history_service);
g_signal_connect (priv->global_history_service, "urls-visited", g_signal_connect (priv->global_history_service, "urls-visited",
G_CALLBACK (history_service_urls_visited_cb), G_CALLBACK (history_service_urls_visited_cb),
shell); shell);
...@@ -597,7 +597,7 @@ ephy_embed_shell_get_encodings (EphyEmbedShell *shell) ...@@ -597,7 +597,7 @@ ephy_embed_shell_get_encodings (EphyEmbedShell *shell)
{ {
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (priv->encodings == NULL) if (priv->encodings == NULL)
priv->encodings = ephy_encodings_new (); priv->encodings = ephy_encodings_new ();
...@@ -1291,7 +1291,7 @@ ephy_embed_shell_set_page_setup (EphyEmbedShell *shell, ...@@ -1291,7 +1291,7 @@ ephy_embed_shell_set_page_setup (EphyEmbedShell *shell,
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
char *path; char *path;
g_return_if_fail (EPHY_IS_EMBED_SHELL (shell)); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (page_setup != NULL) if (page_setup != NULL)
g_object_ref (page_setup); g_object_ref (page_setup);
...@@ -1318,7 +1318,7 @@ ephy_embed_shell_get_page_setup (EphyEmbedShell *shell) ...@@ -1318,7 +1318,7 @@ ephy_embed_shell_get_page_setup (EphyEmbedShell *shell)
{ {
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (priv->page_setup == NULL) { if (priv->page_setup == NULL) {
GError *error = NULL; GError *error = NULL;
...@@ -1354,7 +1354,7 @@ ephy_embed_shell_set_print_settings (EphyEmbedShell *shell, ...@@ -1354,7 +1354,7 @@ ephy_embed_shell_set_print_settings (EphyEmbedShell *shell,
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
char *path; char *path;
g_return_if_fail (EPHY_IS_EMBED_SHELL (shell)); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (settings != NULL) if (settings != NULL)
g_object_ref (settings); g_object_ref (settings);
...@@ -1382,7 +1382,7 @@ ephy_embed_shell_get_print_settings (EphyEmbedShell *shell) ...@@ -1382,7 +1382,7 @@ ephy_embed_shell_get_print_settings (EphyEmbedShell *shell)
{ {
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); g_assert (EPHY_IS_EMBED_SHELL (shell));
if (priv->print_settings == NULL) { if (priv->print_settings == NULL) {
GError *error = NULL; GError *error = NULL;
...@@ -1414,7 +1414,7 @@ ephy_embed_shell_get_mode (EphyEmbedShell *shell) ...@@ -1414,7 +1414,7 @@ ephy_embed_shell_get_mode (EphyEmbedShell *shell)
{ {
EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), EPHY_EMBED_SHELL_MODE_BROWSER); g_assert (EPHY_IS_EMBED_SHELL (shell));
return priv->mode; return priv->mode;
} }
...@@ -1442,8 +1442,8 @@ ephy_embed_shell_launch_handler (EphyEmbedShell *shell, ...@@ -1442,8 +1442,8 @@ ephy_embed_shell_launch_handler (EphyEmbedShell *shell,
GList *list = NULL; GList *list = NULL;
gboolean ret = FALSE; gboolean ret = FALSE;
g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), FALSE); g_assert (EPHY_IS_EMBED_SHELL (shell));
g_return_val_if_fail (file || mime_type, FALSE); g_assert (file || mime_type);
app = ephy_file_launcher_get_app_info_for_file (file, mime_type); app = ephy_file_launcher_get_app_info_for_file (file, mime_type);
......
...@@ -222,7 +222,7 @@ ephy_embed_utils_normalize_address (const char *address) ...@@ -222,7 +222,7 @@ ephy_embed_utils_normalize_address (const char *address)
{ {
char *effective_address = NULL; char *effective_address = NULL;
g_return_val_if_fail (address, NULL); g_assert (address);
if (is_bang_search (address)) { if (is_bang_search (address)) {
EphyEmbedShell *shell; EphyEmbedShell *shell;
......
...@@ -135,8 +135,8 @@ ephy_embed_statusbar_get_context_id (EphyEmbed *embed, const char *context_desc ...@@ -135,8 +135,8 @@ ephy_embed_statusbar_get_context_id (EphyEmbed *embed, const char *context_desc
char *string; char *string;
guint id; guint id;
g_return_val_if_fail (EPHY_IS_EMBED (embed), 0); g_assert (EPHY_IS_EMBED (embed));
g_return_val_if_fail (context_description != NULL, 0); g_assert (context_description != NULL);
/* we need to preserve namespaces on object datas */ /* we need to preserve namespaces on object datas */
string = g_strconcat ("ephy-embed-status-bar-context:", context_description, NULL); string = g_strconcat ("ephy-embed-status-bar-context:", context_description, NULL);
...@@ -167,7 +167,7 @@ ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label) ...@@ -167,7 +167,7 @@ ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label)
static void static void
ephy_embed_statusbar_update (EphyEmbed *embed, const char *text) ephy_embed_statusbar_update (EphyEmbed *embed, const char *text)
{ {
g_return_if_fail (EPHY_IS_EMBED (embed)); g_assert (EPHY_IS_EMBED (embed));
ephy_embed_set_statusbar_label (embed, text); ephy_embed_set_statusbar_label (embed, text);
} }
...@@ -177,9 +177,9 @@ ephy_embed_statusbar_push (EphyEmbed *embed, guint context_id, const char *text) ...@@ -177,9 +177,9 @@ ephy_embed_statusbar_push (EphyEmbed *embed, guint context_id, const char *text)
{ {
EphyEmbedStatusbarMsg *msg; EphyEmbedStatusbarMsg *msg;
g_return_val_if_fail (EPHY_IS_EMBED (embed), 0); g_assert (EPHY_IS_EMBED (embed));
g_return_val_if_fail (context_id != 0, 0); g_assert (context_id != 0);
g_return_val_if_fail (text != NULL, 0); g_assert (text != NULL);
msg = g_slice_new (EphyEmbedStatusbarMsg); msg = g_slice_new (EphyEmbedStatusbarMsg);
msg->text = g_strdup (text); msg->text = g_strdup (text);
...@@ -201,8 +201,8 @@ ephy_embed_statusbar_pop (EphyEmbed *embed, guint context_id) ...@@ -201,8 +201,8 @@ ephy_embed_statusbar_pop (EphyEmbed *embed, guint context_id)
EphyEmbedStatusbarMsg *msg; EphyEmbedStatusbarMsg *msg;
GSList *list; GSList *list;
g_return_if_fail (EPHY_IS_EMBED (embed)); g_assert (EPHY_IS_EMBED (embed));
g_return_if_fail (context_id != 0); g_assert (context_id != 0);
for (list = embed->messages; list; list = list->next) { for (list = embed->messages; list; list = list->next) {
msg = list->data; msg = list->data;
...@@ -815,7 +815,7 @@ ephy_embed_init (EphyEmbed *embed) ...@@ -815,7 +815,7 @@ ephy_embed_init (EphyEmbed *embed)
EphyWebView * EphyWebView *
ephy_embed_get_web_view (EphyEmbed *embed) ephy_embed_get_web_view (EphyEmbed *embed)
{ {
g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL); g_assert (EPHY_IS_EMBED (embed));
return EPHY_WEB_VIEW (embed->web_view); return EPHY_WEB_VIEW (embed->web_view);
} }
...@@ -831,7 +831,7 @@ ephy_embed_get_web_view (EphyEmbed *embed) ...@@ -831,7 +831,7 @@ ephy_embed_get_web_view (EphyEmbed *embed)
EphyFindToolbar * EphyFindToolbar *
ephy_embed_get_find_toolbar (EphyEmbed *embed) ephy_embed_get_find_toolbar (EphyEmbed *embed)
{ {
g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL); g_assert (EPHY_IS_EMBED (embed));
return EPHY_FIND_TOOLBAR (embed->find_toolbar); return EPHY_FIND_TOOLBAR (embed->find_toolbar);
} }
...@@ -903,8 +903,8 @@ ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget) ...@@ -903,8 +903,8 @@ ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget)
void void
ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request, WebKitWebViewSessionState *state) ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request, WebKitWebViewSessionState *state)
{ {
g_return_if_fail (EPHY_IS_EMBED (embed)); g_assert (EPHY_IS_EMBED (embed));
g_return_if_fail (WEBKIT_IS_URI_REQUEST (request)); g_assert (WEBKIT_IS_URI_REQUEST (request));
g_clear_pointer (&embed->delayed_state, webkit_web_view_session_state_unref); g_clear_pointer (&embed->delayed_state, webkit_web_view_session_state_unref);
g_clear_object (&embed->delayed_request); g_clear_object (&embed->delayed_request);
...@@ -925,7 +925,7 @@ ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request ...@@ -925,7 +925,7 @@ ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request
gboolean gboolean
ephy_embed_has_load_pending (EphyEmbed *embed) ephy_embed_has_load_pending (EphyEmbed *embed)
{ {
g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE); g_assert (EPHY_IS_EMBED (embed));
return !!embed->delayed_request; return !!embed->delayed_request;
} }
...@@ -933,7 +933,7 @@ ephy_embed_has_load_pending (EphyEmbed *embed) ...@@ -933,7 +933,7 @@ ephy_embed_has_load_pending (EphyEmbed *embed)
const char * const char *
ephy_embed_get_title (EphyEmbed *embed) ephy_embed_get_title (EphyEmbed *embed)
{ {
g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL); g_assert (EPHY_IS_EMBED (embed));
return embed->title; return embed->title;
} }
...@@ -950,7 +950,7 @@ ephy_embed_get_title (EphyEmbed *embed) ...@@ -950,7 +950,7 @@ ephy_embed_get_title (EphyEmbed *embed)
gboolean gboolean
ephy_embed_inspector_is_loaded (EphyEmbed *embed) ephy_embed_inspector_is_loaded (EphyEmbed *embed)
{ {
g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE); g_assert (EPHY_IS_EMBED (embed));
return embed->inspector_loaded; return embed->inspector_loaded;
} }
...@@ -960,7 +960,7 @@ ephy_embed_attach_notification_container (EphyEmbed *embed) ...@@ -960,7 +960,7 @@ ephy_embed_attach_notification_container (EphyEmbed *embed)
{ {
EphyNotificationContainer *container; EphyNotificationContainer *container;
g_return_if_fail (EPHY_IS_EMBED (embed)); g_assert (EPHY_IS_EMBED (embed));
container = ephy_notification_container_get_default (); container = ephy_notification_container_get_default ();
if (gtk_widget_get_parent (GTK_WIDGET (container)) == NULL) if (gtk_widget_get_parent (GTK_WIDGET (container)) == NULL)
...@@ -972,7 +972,7 @@ ephy_embed_detach_notification_container (EphyEmbed *embed) ...@@ -972,7 +972,7 @@ ephy_embed_detach_notification_container (EphyEmbed *embed)
{ {
EphyNotificationContainer *container; EphyNotificationContainer *container;
g_return_if_fail (EPHY_IS_EMBED (embed)); g_assert (EPHY_IS_EMBED (embed));
container = ephy_notification_container_get_default (); container = ephy_notification_container_get_default ();
if (gtk_widget_get_parent (GTK_WIDGET (container)) == embed->overlay) { if (gtk_widget_get_parent (GTK_WIDGET (container)) == embed->overlay) {
......
...@@ -224,7 +224,7 @@ ephy_encoding_init (EphyEncoding *encoding) ...@@ -224,7 +224,7 @@ ephy_encoding_init (EphyEncoding *encoding)
const char * const char *
ephy_encoding_get_title (EphyEncoding *encoding) ephy_encoding_get_title (EphyEncoding *encoding)
{ {
g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL); g_assert (EPHY_IS_ENCODING (encoding));
return encoding->title; return encoding->title;
} }
...@@ -232,7 +232,7 @@ ephy_encoding_get_title (EphyEncoding *encoding) ...@@ -232,7 +232,7 @@ ephy_encoding_get_title (EphyEncoding *encoding)
const char * const char *
ephy_encoding_get_title_elided (EphyEncoding *encoding) ephy_encoding_get_title_elided (EphyEncoding *encoding)
{ {
g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL); g_assert (EPHY_IS_ENCODING (encoding));
return encoding->title_elided; return encoding->title_elided;
} }
...@@ -240,7 +240,7 @@ ephy_encoding_get_title_elided (EphyEncoding *encoding) ...@@ -240,7 +240,7 @@ ephy_encoding_get_title_elided (EphyEncoding *encoding)
const char * const char *