svnno****@sourc*****
svnno****@sourc*****
Sun Feb 15 06:45:47 JST 2009
Revision: 3689 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3689 Author: ikezoe Date: 2009-02-15 06:45:47 +0900 (Sun, 15 Feb 2009) Log Message: ----------- 2009-02-15 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/kz-embed.c: suppress warnings. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-embed.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-02-14 10:40:03 UTC (rev 3688) +++ kazehakase/trunk/ChangeLog 2009-02-14 21:45:47 UTC (rev 3689) @@ -1,3 +1,7 @@ +2009-02-15 Hiroyuki Ikezoe <poinc****@ikezo*****> + + * src/kz-embed.c: suppress warnings. + 2009-02-14 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/generate-def.mk: Extract all symbols. @@ -24,6 +28,8 @@ * src/kz-notebook.[ch]: Remove kz_notebook_get_nth_page. * src/kz-window.c (kz_window_close_tab): disconnect all signals before invoking kz_notebook_close_tab. + * src/widget/kz-bin.[ch]: Added for wrapping KzEmbed in KzNotebook to + switch layout engine. 2009-02-13 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/kz-embed.c =================================================================== --- kazehakase/trunk/src/kz-embed.c 2009-02-14 10:40:03 UTC (rev 3688) +++ kazehakase/trunk/src/kz-embed.c 2009-02-14 21:45:47 UTC (rev 3689) @@ -413,7 +413,8 @@ kz_embed_view_source (KzEmbed *kzembed, const gchar *url) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->view_source); + if (!KZ_EMBED_GET_IFACE(kzembed)->view_source) + return; KZ_EMBED_GET_IFACE(kzembed)->view_source(kzembed, url); } @@ -423,7 +424,8 @@ kz_embed_view_current_page_source_in_new (KzEmbed *kzembed, KzEmbed *new_embed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->view_current_page_source_in_new); + if (!KZ_EMBED_GET_IFACE(kzembed)->view_current_page_source_in_new) + return; KZ_EMBED_GET_IFACE(kzembed)->view_current_page_source_in_new(kzembed, new_embed); } @@ -433,7 +435,8 @@ kz_embed_is_loading (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->is_loading, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->is_loading) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->is_loading(kzembed); } @@ -443,7 +446,8 @@ kz_embed_get_title (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_title, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_title) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_title(kzembed); } @@ -453,7 +457,8 @@ kz_embed_get_location (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_location, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_location) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_location(kzembed); } @@ -491,7 +496,8 @@ kz_embed_get_link_message (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_link_message, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_link_message) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_link_message(kzembed); } @@ -501,7 +507,8 @@ kz_embed_get_progress (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), 0.0); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_progress, 0.0); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_progress) + return 0.0; return KZ_EMBED_GET_IFACE(kzembed)->get_progress(kzembed); } @@ -511,7 +518,8 @@ kz_embed_can_cut_selection (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->can_cut_selection, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->can_cut_selection) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->can_cut_selection(kzembed); } @@ -521,7 +529,8 @@ kz_embed_can_copy_selection (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->can_copy_selection, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->can_copy_selection) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->can_copy_selection(kzembed); } @@ -531,7 +540,8 @@ kz_embed_can_paste (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->can_paste, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->can_paste) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->can_paste(kzembed); } @@ -541,7 +551,8 @@ kz_embed_cut_selection (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->cut_selection); + if (!KZ_EMBED_GET_IFACE(kzembed)->cut_selection) + return; KZ_EMBED_GET_IFACE(kzembed)->cut_selection(kzembed); } @@ -551,7 +562,8 @@ kz_embed_copy_selection (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->copy_selection); + if (!KZ_EMBED_GET_IFACE(kzembed)->copy_selection) + return; KZ_EMBED_GET_IFACE(kzembed)->copy_selection(kzembed); } @@ -561,7 +573,8 @@ kz_embed_paste (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->paste); + if (!KZ_EMBED_GET_IFACE(kzembed)->paste) + return; KZ_EMBED_GET_IFACE(kzembed)->paste(kzembed); } @@ -571,7 +584,8 @@ kz_embed_select_all (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->select_all); + if (!KZ_EMBED_GET_IFACE(kzembed)->select_all) + return; KZ_EMBED_GET_IFACE(kzembed)->select_all(kzembed); } @@ -581,7 +595,8 @@ kz_embed_get_selection_string (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_selection_string, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_selection_string) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_selection_string(kzembed); } @@ -591,7 +606,8 @@ kz_embed_find (KzEmbed *kzembed, const gchar *keyword, gboolean backward) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->find, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->find) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->find(kzembed, keyword, backward); } @@ -603,7 +619,8 @@ gboolean backward) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->incremental_search, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->incremental_search) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->incremental_search(kzembed, keyword, @@ -615,7 +632,8 @@ kz_embed_selection_is_collapsed (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), TRUE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->selection_is_collapsed, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->selection_is_collapsed) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->selection_is_collapsed(kzembed); } @@ -629,7 +647,8 @@ g_return_val_if_fail(list, FALSE); *list = NULL; g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_links, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_links) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->get_links(kzembed, list, @@ -644,7 +663,8 @@ g_return_val_if_fail(list, FALSE); *list = NULL; g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_links, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_dest_anchors) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->get_dest_anchors(kzembed, list); @@ -683,7 +703,8 @@ gint *pos, gint *count) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), 0); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->shistory_get_pos, 0); + if (!KZ_EMBED_GET_IFACE(kzembed)->shistory_get_pos) + return 0; return KZ_EMBED_GET_IFACE(kzembed)->shistory_get_pos(kzembed, pos, count); @@ -698,7 +719,8 @@ gchar **aTitle) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->shistory_get_nth); + if (!KZ_EMBED_GET_IFACE(kzembed)->shistory_get_nth) + return; KZ_EMBED_GET_IFACE(kzembed)->shistory_get_nth(kzembed, nth, is_relative, aUrl, aTitle); @@ -809,7 +831,8 @@ kz_embed_can_go_nav_link (KzEmbed *kzembed, KzEmbedNavLink link) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->can_go_nav_link, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->can_go_nav_link) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->can_go_nav_link(kzembed, link); } @@ -819,7 +842,8 @@ kz_embed_go_nav_link (KzEmbed *kzembed, KzEmbedNavLink link) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->go_nav_link); + if (!KZ_EMBED_GET_IFACE(kzembed)->go_nav_link) + return; KZ_EMBED_GET_IFACE(kzembed)->go_nav_link(kzembed, link); } @@ -831,7 +855,8 @@ KzNavi *navi) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->append_nav_link); + if (!KZ_EMBED_GET_IFACE(kzembed)->append_nav_link) + return; KZ_EMBED_GET_IFACE(kzembed)->append_nav_link(kzembed, link, navi); } @@ -856,7 +881,8 @@ guint n) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_nth_nav_link); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_nth_nav_link) + return; KZ_EMBED_GET_IFACE(kzembed)->set_nth_nav_link(kzembed, link, navi, n); } @@ -877,7 +903,8 @@ kz_embed_get_nth_nav_link (KzEmbed *kzembed, KzEmbedNavLink link, guint n) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_nth_nav_link, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_nth_nav_link) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_nth_nav_link(kzembed, link, n); } @@ -887,7 +914,8 @@ kz_embed_get_nav_links (KzEmbed *kzembed, KzEmbedNavLink link) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_nav_links, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_nav_links) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_nav_links(kzembed, link); } @@ -897,7 +925,8 @@ kz_embed_go_history_index (KzEmbed *kzembed, gint index) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->go_history_index); + if (!KZ_EMBED_GET_IFACE(kzembed)->go_history_index) + return; KZ_EMBED_GET_IFACE(kzembed)->go_history_index(kzembed, index); } @@ -907,7 +936,8 @@ kz_embed_do_command (KzEmbed *kzembed, const gchar *command) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->do_command); + if (!KZ_EMBED_GET_IFACE(kzembed)->do_command) + return; KZ_EMBED_GET_IFACE(kzembed)->do_command(kzembed, command); } @@ -917,7 +947,8 @@ kz_embed_can_do_command (KzEmbed *kzembed, const gchar *command) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->can_do_command, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->can_do_command) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->can_do_command(kzembed, command); } @@ -927,7 +958,8 @@ kz_embed_get_lock (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_lock, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_lock) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->get_lock(kzembed); } @@ -937,7 +969,8 @@ kz_embed_set_lock (KzEmbed *kzembed, gboolean lock) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_lock); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_lock) + return; KZ_EMBED_GET_IFACE(kzembed)->set_lock(kzembed, lock); } @@ -947,7 +980,8 @@ kz_embed_get_body_text (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_body_text, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_body_text) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_body_text(kzembed); } @@ -957,7 +991,8 @@ kz_embed_set_encoding (KzEmbed *kzembed, const gchar *encoding) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_encoding); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_encoding) + return; KZ_EMBED_GET_IFACE(kzembed)->set_encoding(kzembed, encoding); } @@ -967,7 +1002,8 @@ kz_embed_get_encoding (KzEmbed *kzembed, gchar **encoding, gboolean *forced) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_encoding); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_encoding) + return; KZ_EMBED_GET_IFACE(kzembed)->get_encoding(kzembed, encoding, forced); } @@ -977,7 +1013,8 @@ kz_embed_print (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->print); + if (!KZ_EMBED_GET_IFACE(kzembed)->print) + return; KZ_EMBED_GET_IFACE(kzembed)->print(kzembed); } @@ -987,7 +1024,8 @@ kz_embed_print_preview (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->print_preview); + if (!KZ_EMBED_GET_IFACE(kzembed)->print_preview) + return; KZ_EMBED_GET_IFACE(kzembed)->print_preview(kzembed); } @@ -997,7 +1035,8 @@ kz_embed_get_printer_list (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_printer_list, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_printer_list) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_printer_list(kzembed); } @@ -1017,7 +1056,8 @@ kz_embed_save_with_content (KzEmbed *kzembed, const gchar *rawfilename) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->save_with_content, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->save_with_content) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->save_with_content(kzembed, rawfilename); @@ -1030,7 +1070,8 @@ const gchar *text) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_text_into_textarea, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_text_into_textarea) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->set_text_into_textarea(kzembed, element, @@ -1042,7 +1083,8 @@ kz_embed_get_text_from_textarea (KzEmbed *kzembed, gpointer element) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_text_from_textarea, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_text_from_textarea) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_text_from_textarea(kzembed, element); @@ -1053,7 +1095,8 @@ kz_embed_zoom_set (KzEmbed *kzembed, gint zoom, gboolean reflow) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->zoom_set); + if (!KZ_EMBED_GET_IFACE(kzembed)->zoom_set) + return; KZ_EMBED_GET_IFACE(kzembed)->zoom_set(kzembed, zoom, reflow); } @@ -1063,7 +1106,8 @@ kz_embed_zoom_get (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), 100); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->zoom_set, 100); + if (!KZ_EMBED_GET_IFACE(kzembed)->zoom_get) + return 100; return KZ_EMBED_GET_IFACE(kzembed)->zoom_get(kzembed); } @@ -1073,7 +1117,8 @@ kz_embed_set_text_size (KzEmbed *kzembed, gint zoom, gboolean reflow) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_text_size); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_text_size) + return; KZ_EMBED_GET_IFACE(kzembed)->set_text_size(kzembed, zoom, reflow); } @@ -1083,7 +1128,8 @@ kz_embed_get_text_size (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), 100); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_text_size, 100); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_text_size) + return 100; return KZ_EMBED_GET_IFACE(kzembed)->get_text_size(kzembed); } @@ -1093,7 +1139,8 @@ kz_embed_get_html_with_contents (KzEmbed *kzembed, const gchar *storedir) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), NULL); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_html_with_contents, NULL); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_html_with_contents) + return NULL; return KZ_EMBED_GET_IFACE(kzembed)->get_html_with_contents(kzembed, storedir); @@ -1143,7 +1190,8 @@ kz_embed_page_down (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->page_down); + if (!KZ_EMBED_GET_IFACE(kzembed)->page_down) + return; KZ_EMBED_GET_IFACE(kzembed)->page_down(kzembed); } @@ -1153,7 +1201,8 @@ kz_embed_page_up (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->page_up); + if (!KZ_EMBED_GET_IFACE(kzembed)->page_up) + return; KZ_EMBED_GET_IFACE(kzembed)->page_up(kzembed); } @@ -1163,7 +1212,8 @@ kz_embed_set_allow_javascript (KzEmbed *kzembed, gboolean allow) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_allow_javascript); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_allow_javascript) + return; KZ_EMBED_GET_IFACE(kzembed)->set_allow_javascript(kzembed, allow); } @@ -1173,7 +1223,8 @@ kz_embed_get_allow_javascript (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_allow_javascript, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_allow_javascript) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->get_allow_javascript(kzembed); } @@ -1183,7 +1234,8 @@ kz_embed_set_allow_images (KzEmbed *kzembed, gboolean allow) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->set_allow_images); + if (!KZ_EMBED_GET_IFACE(kzembed)->set_allow_images) + return; KZ_EMBED_GET_IFACE(kzembed)->set_allow_images(kzembed, allow); } @@ -1193,7 +1245,8 @@ kz_embed_get_allow_images (KzEmbed *kzembed) { g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - g_return_val_if_fail(KZ_EMBED_GET_IFACE(kzembed)->get_allow_images, FALSE); + if (!KZ_EMBED_GET_IFACE(kzembed)->get_allow_images) + return FALSE; return KZ_EMBED_GET_IFACE(kzembed)->get_allow_images(kzembed); } @@ -1202,7 +1255,8 @@ kz_embed_show_page_certificate (KzEmbed *kzembed) { g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_return_if_fail(KZ_EMBED_GET_IFACE(kzembed)->show_page_certificate); + if (!KZ_EMBED_GET_IFACE(kzembed)->show_page_certificate) + return; return KZ_EMBED_GET_IFACE(kzembed)->show_page_certificate(kzembed); }