Add static keywords, fix #ifdefs and spurious lines

This commit is contained in:
Christian Dywan 2010-10-20 23:48:36 +02:00
parent 30f3dc0461
commit b25f27cd66
2 changed files with 19 additions and 35 deletions

View file

@ -89,7 +89,7 @@ web_cache_save_headers (SoupMessage* msg,
return TRUE; return TRUE;
} }
GHashTable* static GHashTable*
web_cache_get_headers (gchar* filename) web_cache_get_headers (gchar* filename)
{ {
GHashTable* headers; GHashTable* headers;

View file

@ -759,7 +759,7 @@ typedef struct
MidoriView* view; MidoriView* view;
} KatzeNetIconPriv; } KatzeNetIconPriv;
void static void
katze_net_icon_priv_free (KatzeNetIconPriv* priv) katze_net_icon_priv_free (KatzeNetIconPriv* priv)
{ {
g_free (priv->icon_file); g_free (priv->icon_file);
@ -767,7 +767,7 @@ katze_net_icon_priv_free (KatzeNetIconPriv* priv)
g_free (priv); g_free (priv);
} }
gboolean static gboolean
katze_net_icon_status_cb (KatzeNetRequest* request, katze_net_icon_status_cb (KatzeNetRequest* request,
KatzeNetIconPriv* priv) KatzeNetIconPriv* priv)
{ {
@ -790,7 +790,7 @@ katze_net_icon_status_cb (KatzeNetRequest* request,
return TRUE; return TRUE;
} }
void static void
katze_net_icon_transfer_cb (KatzeNetRequest* request, katze_net_icon_transfer_cb (KatzeNetRequest* request,
KatzeNetIconPriv* priv) KatzeNetIconPriv* priv)
{ {
@ -846,7 +846,6 @@ katze_net_icon_transfer_cb (KatzeNetRequest* request,
katze_net_icon_priv_free (priv); katze_net_icon_priv_free (priv);
} }
static void static void
_midori_web_view_load_icon (MidoriView* view) _midori_web_view_load_icon (MidoriView* view)
{ {
@ -2956,7 +2955,7 @@ midori_view_notify_vadjustment_cb (MidoriView* view,
g_object_unref (vadjustment); g_object_unref (vadjustment);
} }
void static void
katze_net_object_maybe_unref (gpointer object) katze_net_object_maybe_unref (gpointer object)
{ {
if (object) if (object)
@ -3171,6 +3170,9 @@ _midori_view_update_settings (MidoriView* view)
{ {
gboolean zoom_text_and_images, kinetic_scrolling; gboolean zoom_text_and_images, kinetic_scrolling;
g_free (view->download_manager);
g_free (view->news_aggregator);
g_object_get (view->settings, g_object_get (view->settings,
"speed-dial-in-new-tabs", &view->speed_dial_in_new_tabs, "speed-dial-in-new-tabs", &view->speed_dial_in_new_tabs,
"download-manager", &view->download_manager, "download-manager", &view->download_manager,
@ -3239,17 +3241,11 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
g_object_get_property (G_OBJECT (view->settings), name, &value); g_object_get_property (G_OBJECT (view->settings), name, &value);
if (name == g_intern_string ("speed-dial-in-new-tabs")) if (name == g_intern_string ("speed-dial-in-new-tabs"))
{
view->speed_dial_in_new_tabs = g_value_get_boolean (&value); view->speed_dial_in_new_tabs = g_value_get_boolean (&value);
}
else if (name == g_intern_string ("download-manager")) else if (name == g_intern_string ("download-manager"))
{
katze_assign (view->download_manager, g_value_dup_string (&value)); katze_assign (view->download_manager, g_value_dup_string (&value));
}
else if (name == g_intern_string ("news-aggregator")) else if (name == g_intern_string ("news-aggregator"))
{
katze_assign (view->news_aggregator, g_value_dup_string (&value)); katze_assign (view->news_aggregator, g_value_dup_string (&value));
}
else if (name == g_intern_string ("zoom-text-and-images")) else if (name == g_intern_string ("zoom-text-and-images"))
{ {
if (view->web_view) if (view->web_view)
@ -3268,25 +3264,15 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
view->close_buttons_on_tabs); view->close_buttons_on_tabs);
} }
else if (name == g_intern_string ("open-new-pages-in")) else if (name == g_intern_string ("open-new-pages-in"))
{
view->open_new_pages_in = g_value_get_enum (&value); view->open_new_pages_in = g_value_get_enum (&value);
}
else if (name == g_intern_string ("ask-for-destination-folder")) else if (name == g_intern_string ("ask-for-destination-folder"))
{
view->ask_for_destination_folder = g_value_get_boolean (&value); view->ask_for_destination_folder = g_value_get_boolean (&value);
}
else if (name == g_intern_string ("middle-click-opens-selection")) else if (name == g_intern_string ("middle-click-opens-selection"))
{
view->middle_click_opens_selection = g_value_get_boolean (&value); view->middle_click_opens_selection = g_value_get_boolean (&value);
}
else if (name == g_intern_string ("open-tabs-in-the-background")) else if (name == g_intern_string ("open-tabs-in-the-background"))
{
view->open_tabs_in_the_background = g_value_get_boolean (&value); view->open_tabs_in_the_background = g_value_get_boolean (&value);
}
else if (name == g_intern_string ("find-while-typing")) else if (name == g_intern_string ("find-while-typing"))
{
view->find_while_typing = g_value_get_boolean (&value); view->find_while_typing = g_value_get_boolean (&value);
}
g_value_unset (&value); g_value_unset (&value);
} }
@ -3674,7 +3660,6 @@ midori_view_set_uri (MidoriView* view,
"{set_thumb_normal}", _("Medium"), "{set_thumb_normal}", _("Medium"),
"{set_thumb_big}", _("Big"), NULL); "{set_thumb_big}", _("Big"), NULL);
midori_view_load_alternate_string (view, midori_view_load_alternate_string (view,
data, res_root, "about:blank", NULL); data, res_root, "about:blank", NULL);
@ -3934,7 +3919,6 @@ midori_view_get_icon_uri (MidoriView* view)
return view->icon_uri; return view->icon_uri;
} }
/** /**
* midori_view_get_display_uri: * midori_view_get_display_uri:
* @view: a #MidoriView * @view: a #MidoriView
@ -4151,7 +4135,6 @@ midori_view_tab_label_menu_open_cb (GtkWidget* menuitem,
midori_browser_set_current_tab (browser, view); midori_browser_set_current_tab (browser, view);
} }
static void static void
midori_view_tab_label_menu_duplicate_tab_cb (GtkWidget* menuitem, midori_view_tab_label_menu_duplicate_tab_cb (GtkWidget* menuitem,
MidoriView* view) MidoriView* view)
@ -4886,6 +4869,7 @@ midori_view_get_next_page (MidoriView* view)
"document.getElementsByTagName ('a')]);", NULL)); "document.getElementsByTagName ('a')]);", NULL));
return uri && uri[0] != '0' ? uri : NULL; return uri && uri[0] != '0' ? uri : NULL;
} }
#if WEBKIT_CHECK_VERSION (1, 1, 5) #if WEBKIT_CHECK_VERSION (1, 1, 5)
static GtkWidget* static GtkWidget*
midori_view_print_create_custom_widget_cb (GtkPrintOperation* operation, midori_view_print_create_custom_widget_cb (GtkPrintOperation* operation,