Remove further support for WebKitGTK+ < 1.1.14

This commit is contained in:
Paweł Forysiuk 2011-06-09 00:45:34 +02:00 committed by Christian Dywan
parent 38da85ee43
commit 46de9f7767
9 changed files with 3 additions and 238 deletions

View file

@ -978,7 +978,7 @@ midori_load_soup_session (gpointer settings)
{
SoupSession* session = webkit_get_default_session ();
#if WEBKIT_CHECK_VERSION (1, 1, 14) && defined (HAVE_LIBSOUP_2_29_91)
#if defined (HAVE_LIBSOUP_2_29_91)
const gchar* certificate_files[] =
{
"/etc/pki/tls/certs/ca-bundle.crt",
@ -2139,10 +2139,8 @@ main (int argc,
sokoke_register_privacy_item ("flash-cookies", _("'Flash' Cookies"),
G_CALLBACK (midori_clear_flash_cookies_cb));
#endif
#if WEBKIT_CHECK_VERSION (1, 1, 14)
sokoke_register_privacy_item ("html5-databases", _("HTML5 _Databases"),
G_CALLBACK (midori_clear_html5_databases_cb));
#endif
#if WEBKIT_CHECK_VERSION (1, 3, 11)
sokoke_register_privacy_item ("web-cache", _("Web Cache"),
G_CALLBACK (midori_clear_web_cache_cb));
@ -2320,9 +2318,7 @@ main (int argc,
error = NULL;
settings = settings_and_accels_new (config, &extensions);
g_object_set (settings, "enable-developer-extras", TRUE, NULL);
#if WEBKIT_CHECK_VERSION (1, 1, 14)
g_object_set (settings, "enable-html5-database", TRUE, NULL);
#endif
midori_startup_timer ("Config and accels read: \t%f");
/* Load search engines */

View file

@ -369,7 +369,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
gtk_widget_set_tooltip_text (button, _("Whether scripts are allowed to open popup windows automatically"));
SPANNED_ADD (button);
button = NULL;
#if WEBKIT_CHECK_VERSION (1, 1, 15) || HAVE_HILDON
#if HAVE_HILDON
if (katze_widget_has_touchscreen_mode (parent ?
GTK_WIDGET (parent) : GTK_WIDGET (preferences)))
button = katze_property_proxy (settings, "kinetic-scrolling", NULL);

View file

@ -41,11 +41,6 @@
/* This is unstable API, so we need to declare it */
gchar*
webkit_web_view_get_selected_text (WebKitWebView* web_view);
/* This is public API since WebKitGTK+ 1.1.6 */
#if !WEBKIT_CHECK_VERSION (1, 1, 6)
void
webkit_web_frame_print (WebKitWebFrame* web_frame);
#endif
static void
midori_view_construct_web_view (MidoriView* view);
@ -960,7 +955,7 @@ webkit_web_view_load_committed_cb (WebKitWebView* web_view,
if (!strncmp (uri, "https", 5))
{
#if WEBKIT_CHECK_VERSION (1, 1, 14) && defined (HAVE_LIBSOUP_2_29_91)
#if defined (HAVE_LIBSOUP_2_29_91)
WebKitWebDataSource *source;
WebKitNetworkRequest *request;
SoupMessage *message;
@ -1549,7 +1544,6 @@ midori_view_ensure_link_uri (MidoriView* view,
{
g_return_if_fail (MIDORI_IS_VIEW (view));
#if WEBKIT_CHECK_VERSION (1, 1, 15)
if (view->web_view && gtk_widget_get_window (view->web_view))
{
GdkEventButton ev;
@ -1574,7 +1568,6 @@ midori_view_ensure_link_uri (MidoriView* view,
katze_assign (view->link_uri,
katze_object_get_string (view->hit_test, "link-uri"));
}
#endif
}
#define MIDORI_KEYS_MODIFIER_MASK (GDK_SHIFT_MASK | GDK_CONTROL_MASK \
@ -1634,7 +1627,6 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
else if (view->middle_click_opens_selection)
{
gboolean is_editable;
#if WEBKIT_CHECK_VERSION (1, 1, 15)
WebKitHitTestResult* result;
WebKitHitTestResultContext context;
@ -1642,9 +1634,6 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
context = katze_object_get_int (result, "context");
is_editable = context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
g_object_unref (result);
#else
is_editable = webkit_web_view_can_paste_clipboard (WEBKIT_WEB_VIEW (view->web_view));
#endif
if (is_editable)
return FALSE;
@ -1695,7 +1684,6 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
}
}
break;
#if WEBKIT_CHECK_VERSION (1, 1, 15)
case 3:
if (event->state & GDK_CONTROL_MASK)
{
@ -1707,7 +1695,6 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
return TRUE;
}
break;
#endif
case 8:
midori_view_go_back (view);
return TRUE;
@ -1898,7 +1885,6 @@ gtk_widget_scroll_event_cb (WebKitWebView* web_view,
return FALSE;
}
#if WEBKIT_CHECK_VERSION (1, 1, 15)
static void
midori_web_view_menu_new_window_activate_cb (GtkWidget* widget,
MidoriView* view)
@ -1990,7 +1976,6 @@ midori_web_view_menu_video_save_activate_cb (GtkWidget* widget,
g_signal_emit (view, signals[DOWNLOAD_REQUESTED], 0, download, &handled);
g_free (uri);
}
#endif
static void
midori_web_view_menu_new_tab_activate_cb (GtkWidget* widget,
@ -2021,7 +2006,6 @@ midori_web_view_menu_new_tab_activate_cb (GtkWidget* widget,
}
}
#if WEBKIT_CHECK_VERSION (1, 1, 15)
static void
midori_web_view_menu_background_tab_activate_cb (GtkWidget* widget,
MidoriView* view)
@ -2029,7 +2013,6 @@ midori_web_view_menu_background_tab_activate_cb (GtkWidget* widget,
g_signal_emit (view, signals[NEW_TAB], 0, view->link_uri,
!view->open_tabs_in_the_background);
}
#endif
static void
midori_web_view_menu_search_web_activate_cb (GtkWidget* widget,
@ -2052,14 +2035,12 @@ midori_web_view_menu_search_web_activate_cb (GtkWidget* widget,
g_free (uri);
}
#if WEBKIT_CHECK_VERSION (1, 1, 15)
static void
midori_web_view_menu_copy_activate_cb (GtkWidget* widget,
MidoriView* view)
{
sokoke_widget_copy_clipboard (widget, view->selected_text);
}
#endif
static void
midori_view_tab_label_menu_window_new_cb (GtkWidget* menuitem,
@ -2156,7 +2137,6 @@ midori_view_populate_popup (MidoriView* view,
GtkWidget* label;
guint i;
#if WEBKIT_CHECK_VERSION (1, 1, 15)
gint x, y;
WebKitHitTestResultContext context;
gboolean is_image;
@ -2171,38 +2151,6 @@ midori_view_populate_popup (MidoriView* view,
is_image = context & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE;
is_media = context & WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA;
is_document = !view->link_uri && !has_selection && !is_image && !is_media;
#else
/* There is no guarantee view->link_uri is correct in case
gtk-touchscreen-mode is enabled, nothing we can do. */
has_selection = midori_view_has_selection (view);
is_document = !view->link_uri && !has_selection;
/* Unfortunately inspecting the menu is the only way to
determine that the mouse is over a text area or selection. */
items = gtk_container_get_children (GTK_CONTAINER (menu));
menuitem = (GtkWidget*)g_list_nth_data (items, 0);
if (GTK_IS_IMAGE_MENU_ITEM (menuitem))
{
icon = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (menuitem));
gtk_image_get_stock (GTK_IMAGE (icon), &stock_id, NULL);
if (!strcmp (stock_id, GTK_STOCK_FIND))
{
gtk_widget_hide (menuitem);
gtk_widget_set_no_show_all (menuitem, TRUE);
menuitem = (GtkWidget*)g_list_nth_data (items, 1);
gtk_widget_hide (menuitem);
menuitem = (GtkWidget*)g_list_nth_data (items, 2);
icon = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (menuitem));
gtk_image_get_stock (GTK_IMAGE (icon), &stock_id, NULL);
}
is_editable = !strcmp (stock_id, GTK_STOCK_CUT);
if (is_document && !strcmp (stock_id, GTK_STOCK_OPEN))
is_document = FALSE;
}
else
is_editable = FALSE;
g_list_free (items);
#endif
if (is_editable)
{
@ -2293,7 +2241,6 @@ midori_view_populate_popup (MidoriView* view,
}
}
#if WEBKIT_CHECK_VERSION (1, 1, 15)
if (!is_document)
{
items = gtk_container_get_children (GTK_CONTAINER (menu));
@ -2357,31 +2304,6 @@ midori_view_populate_popup (MidoriView* view,
midori_view_insert_menu_item (menu_shell, -1, NULL, GTK_STOCK_COPY,
G_CALLBACK (midori_web_view_menu_copy_activate_cb), widget);
}
#else
if (view->link_uri)
{
items = gtk_container_get_children (GTK_CONTAINER (menu));
menuitem = (GtkWidget*)g_list_nth_data (items, 0);
/* hack to hide menu item */
gtk_widget_hide (menuitem);
midori_view_insert_menu_item (menu_shell, 1,
_("Open Link in New _Tab"), STOCK_TAB_NEW,
G_CALLBACK (midori_web_view_menu_new_tab_activate_cb), widget);
g_list_free (items);
items = gtk_container_get_children (GTK_CONTAINER (menu));
menuitem = (GtkWidget*)g_list_nth_data (items, 2);
/* hack to localize menu item */
label = gtk_bin_get_child (GTK_BIN (menuitem));
gtk_label_set_label (GTK_LABEL (label), _("Open Link in New _Window"));
menuitem = (GtkWidget*)g_list_nth_data (items, 3);
g_list_free (items);
/* hack to localize menu item */
label = gtk_bin_get_child (GTK_BIN (menuitem));
GtkStockItem stock_item;
if (gtk_stock_lookup (GTK_STOCK_SAVE_AS, &stock_item))
gtk_label_set_label (GTK_LABEL (label), stock_item.label);
}
#endif
if (!view->link_uri && has_selection)
{
@ -2431,11 +2353,9 @@ midori_view_populate_popup (MidoriView* view,
}
g_object_unref (search_engines);
}
#if WEBKIT_CHECK_VERSION (1, 1, 15)
midori_view_insert_menu_item (menu_shell, 0,
_("_Search the Web"), GTK_STOCK_FIND,
G_CALLBACK (midori_web_view_menu_search_web_activate_cb), widget);
#else
items = gtk_container_get_children (GTK_CONTAINER (menu));
menuitem = (GtkWidget*)g_list_nth_data (items, 0);
/* hack to localize menu item */
@ -2445,7 +2365,6 @@ midori_view_populate_popup (MidoriView* view,
g_signal_connect (menuitem, "activate",
G_CALLBACK (midori_web_view_menu_search_web_activate_cb), view);
g_list_free (items);
#endif
g_strstrip (view->selected_text);
if (view->selected_text && !strchr (view->selected_text, ' ')
@ -2517,18 +2436,6 @@ midori_view_populate_popup (MidoriView* view,
g_signal_connect (menuitem, "activate",
G_CALLBACK (midori_view_tab_label_menu_window_new_cb), view);
#if WEBKIT_CHECK_VERSION (1, 1, 15)
/* if (webkit_web_view_get_main_frame (web_view) != frame_under_mouse)
{
midori_view_insert_menu_item (menu_shell, -1,
_("Open _Frame in New Tab"), NULL,
G_CALLBACK (midori_web_view_menu_frame_new_tab_activate_cb), widget);
midori_view_insert_menu_item (menu_shell, -1,
_("Open _Frame in New Window"), NULL,
G_CALLBACK (midori_web_view_menu_frame_new_window_activate_cb), widget);
} */
#endif
#if !HAVE_HILDON
menuitem = sokoke_action_create_popup_menu_item (
gtk_action_group_get_action (actions, "ZoomIn"));
@ -3027,9 +2934,7 @@ midori_view_init (MidoriView* view)
view->load_status = MIDORI_LOAD_FINISHED;
view->minimized = FALSE;
view->statusbar_text = NULL;
#if WEBKIT_CHECK_VERSION (1, 1, 15)
view->hit_test = NULL;
#endif
view->link_uri = NULL;
view->selected_text = NULL;
view->news_feeds = katze_array_new (KATZE_TYPE_ITEM);

View file

@ -747,7 +747,6 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
_("Whether to enable HTML5 local storage support"),
FALSE,
flags));
#if WEBKIT_CHECK_VERSION (1, 1, 13)
g_object_class_install_property (gobject_class,
PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
g_param_spec_boolean ("enable-offline-web-application-cache",
@ -755,7 +754,6 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
_("Whether to enable offline web application cache"),
FALSE,
flags));
#endif
#if WEBKIT_CHECK_VERSION (1, 1, 18)
g_object_class_install_property (gobject_class,
PROP_ENABLE_PAGE_CACHE,
@ -1565,12 +1563,10 @@ midori_web_settings_get_property (GObject* object,
g_value_set_boolean (value, katze_object_get_boolean (web_settings,
"WebKitWebSettings::enable-html5-local-storage"));
break;
#if WEBKIT_CHECK_VERSION (1, 1, 13)
case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
g_value_set_boolean (value, katze_object_get_boolean (web_settings,
"WebKitWebSettings::enable-offline-web-application-cache"));
break;
#endif
#if WEBKIT_CHECK_VERSION (1, 1, 18)
case PROP_ENABLE_PAGE_CACHE:
g_value_set_boolean (value, katze_object_get_boolean (web_settings,

View file

@ -66,9 +66,7 @@ typedef enum
MIDORI_STARTUP_BLANK_PAGE, /* One blank tab or speed dial is opened */
MIDORI_STARTUP_HOMEPAGE, /* One homepage tab is opened */
MIDORI_STARTUP_LAST_OPEN_PAGES, /* The session is loaded and saved */
#if WEBKIT_CHECK_VERSION (1, 1, 6)
MIDORI_STARTUP_DELAYED_PAGES /* The session is saved, loading pages is delayed */
#endif
} MidoriStartup;
GType

View file

@ -1766,101 +1766,6 @@ sokoke_get_argv (gchar** argument_vector)
return stored_argv;
}
#if !WEBKIT_CHECK_VERSION (1, 1, 14)
static void
res_server_handler_cb (SoupServer* res_server,
SoupMessage* msg,
const gchar* path,
GHashTable* query,
SoupClientContext* client,
gpointer data)
{
if (g_str_has_prefix (path, "/res"))
{
gchar* filename = g_build_filename ("midori", path, NULL);
gchar* filepath = sokoke_find_data_filename (filename);
gchar* contents;
gsize length;
g_free (filename);
if (g_file_get_contents (filepath, &contents, &length, NULL))
{
gchar* content_type = g_content_type_guess (filepath, (guchar*)contents,
length, NULL);
gchar* mime_type = g_content_type_get_mime_type (content_type);
g_free (content_type);
soup_message_set_response (msg, mime_type, SOUP_MEMORY_TAKE,
contents, length);
g_free (mime_type);
soup_message_set_status (msg, 200);
}
else
soup_message_set_status (msg, 404);
g_free (filepath);
}
else if (g_str_has_prefix (path, "/stock/"))
{
GtkIconTheme* icon_theme = gtk_icon_theme_get_default ();
const gchar* icon_name = &path[7] ? &path[7] : "";
gint icon_size = 22;
GdkPixbuf* icon;
gchar* contents;
gsize length;
if (g_ascii_isalpha (icon_name[0]))
icon_size = strstr (icon_name, "dialog") ? 48 : 22;
else if (g_ascii_isdigit (icon_name[0]))
{
guint i = 0;
while (icon_name[i])
if (icon_name[i++] == '/')
{
gchar* size = g_strndup (icon_name, i - 1);
icon_size = atoi (size);
g_free (size);
icon_name = &icon_name[i];
}
}
icon = gtk_icon_theme_load_icon (icon_theme, icon_name,
icon_size, 0, NULL);
if (!icon)
icon = gtk_icon_theme_load_icon (icon_theme, "gtk-missing-image",
icon_size, 0, NULL);
gdk_pixbuf_save_to_buffer (icon, &contents, &length, "png", NULL, NULL);
g_object_unref (icon);
soup_message_set_response (msg, "image/png", SOUP_MEMORY_TAKE,
contents, length);
soup_message_set_status (msg, 200);
}
else
{
soup_message_set_status (msg, 404);
}
}
SoupServer*
sokoke_get_res_server (void)
{
static SoupServer* res_server = NULL;
SoupAddress* addr = NULL;
if (G_UNLIKELY (!res_server))
{
addr = soup_address_new ("localhost", SOUP_ADDRESS_ANY_PORT);
soup_address_resolve_sync (addr, NULL);
res_server = soup_server_new ("interface", addr, NULL);
g_object_unref (addr);
soup_server_add_handler (res_server, "/",
res_server_handler_cb, NULL, NULL);
soup_server_run_async (res_server);
}
return res_server;
}
#endif
gchar*
sokoke_replace_variables (const gchar* template,
const gchar* variable_first, ...)

View file

@ -231,11 +231,6 @@ sokoke_find_data_filename (const gchar* filename);
gchar**
sokoke_get_argv (gchar** argument_vector);
#if !WEBKIT_CHECK_VERSION (1, 1, 14)
SoupServer*
sokoke_get_res_server (void);
#endif
gchar*
sokoke_replace_variables (const gchar* template,
const gchar* variable_first, ...);

View file

@ -103,7 +103,6 @@ midori_transfers_button_clear_clicked_cb (GtkToolItem* toolitem,
gint n = 0;
while ((gtk_tree_model_iter_nth_child (model, &iter, NULL, n++)))
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
WebKitDownloadStatus status;
@ -117,7 +116,6 @@ midori_transfers_button_clear_clicked_cb (GtkToolItem* toolitem,
n--; /* Decrement n since we just removed it */
}
g_object_unref (download);
#endif
}
}
@ -161,7 +159,6 @@ midori_transfers_viewable_iface_init (MidoriViewableIface* iface)
iface->get_toolbar = midori_transfers_get_toolbar;
}
#if WEBKIT_CHECK_VERSION (1, 1, 3)
static void
midori_transfers_download_notify_progress_cb (WebKitDownload* download,
GParamSpec* pspec,
@ -198,7 +195,6 @@ midori_transfers_browser_add_download_cb (MidoriBrowser* browser,
g_signal_connect (download, "notify::status",
G_CALLBACK (midori_transfers_download_notify_status_cb), transfers);
}
#endif
static void
midori_transfers_set_property (GObject* object,
@ -257,7 +253,6 @@ midori_transfers_treeview_render_text_cb (GtkTreeViewColumn* column,
GtkTreeIter* iter,
GtkWidget* treeview)
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
gchar* current;
gchar* total;
@ -286,7 +281,6 @@ midori_transfers_treeview_render_text_cb (GtkTreeViewColumn* column,
"xpad", 1, "ypad", 6, NULL);
g_free (text);
g_object_unref (download);
#endif
}
static void
@ -296,7 +290,6 @@ midori_transfers_treeview_render_button_cb (GtkTreeViewColumn* column,
GtkTreeIter* iter,
GtkWidget* treeview)
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
const gchar* stock_id;
@ -317,7 +310,6 @@ midori_transfers_treeview_render_button_cb (GtkTreeViewColumn* column,
"stock-size", GTK_ICON_SIZE_MENU, NULL);
g_object_unref (download);
#endif
}
static void
@ -330,7 +322,6 @@ midori_transfers_treeview_row_activated_cb (GtkTreeView* treeview,
GtkTreeIter iter;
if (gtk_tree_model_get_iter (model, &iter, path))
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
gtk_tree_model_get (model, &iter, 1, &download, -1);
@ -355,7 +346,6 @@ midori_transfers_treeview_row_activated_cb (GtkTreeView* treeview,
break;
}
g_object_unref (download);
#endif
}
}
@ -363,7 +353,6 @@ static void
midori_transfers_hierarchy_changed_cb (MidoriTransfers* transfers,
GtkWidget* old_parent)
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (transfers));
if (MIDORI_IS_BROWSER (browser))
g_signal_connect (browser, "add-download",
@ -371,10 +360,8 @@ midori_transfers_hierarchy_changed_cb (MidoriTransfers* transfers,
if (old_parent)
g_signal_handlers_disconnect_by_func (old_parent,
midori_transfers_browser_add_download_cb, transfers);
#endif
}
#if WEBKIT_CHECK_VERSION (1, 1, 3)
static GtkWidget*
midori_transfers_popup_menu_item (GtkMenu* menu,
const gchar* stock_id,
@ -486,7 +473,6 @@ midori_transfers_popup (GtkWidget* widget,
katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR);
}
#endif
static gboolean
midori_transfers_popup_menu_cb (GtkWidget* widget,
@ -497,7 +483,6 @@ midori_transfers_popup_menu_cb (GtkWidget* widget,
if (katze_tree_view_get_selected_iter (GTK_TREE_VIEW (widget), &model, &iter))
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
gtk_tree_model_get (model, &iter, 1, &download, -1);
@ -505,7 +490,6 @@ midori_transfers_popup_menu_cb (GtkWidget* widget,
midori_transfers_popup (widget, NULL, download, transfers);
g_object_unref (download);
return TRUE;
#endif
}
return FALSE;
}
@ -523,7 +507,6 @@ midori_transfers_button_release_event_cb (GtkWidget* widget,
if (katze_tree_view_get_selected_iter (GTK_TREE_VIEW (widget), &model, &iter))
{
#if WEBKIT_CHECK_VERSION (1, 1, 3)
WebKitDownload* download;
gtk_tree_model_get (model, &iter, 1, &download, -1);
@ -531,7 +514,6 @@ midori_transfers_button_release_event_cb (GtkWidget* widget,
midori_transfers_popup (widget, NULL, download, transfers);
g_object_unref (download);
return TRUE;
#endif
}
return FALSE;
}

View file

@ -37,7 +37,6 @@ midori_transferbar_class_init (MidoriTransferbarClass* class)
/* Nothing to do */
}
#if WEBKIT_CHECK_VERSION (1, 1, 3)
typedef struct
{
WebKitDownload* download;
@ -112,9 +111,7 @@ midori_transferbar_download_notify_status_cb (WebKitDownload* download,
case WEBKIT_DOWNLOAD_STATUS_FINISHED:
{
MidoriBrowser* browser = midori_browser_get_for_widget (button);
#if WEBKIT_CHECK_VERSION (1, 1, 14)
WebKitNetworkRequest* request;
#endif
const gchar* original_uri;
gchar** fingerprint;
@ -137,11 +134,9 @@ midori_transferbar_download_notify_status_cb (WebKitDownload* download,
}
/* Link Fingerprint */
#if WEBKIT_CHECK_VERSION (1, 1, 14)
request = webkit_download_get_network_request (download);
original_uri = g_object_get_data (G_OBJECT (request), "midori-original-uri");
if (!original_uri)
#endif
original_uri = webkit_download_get_uri (download);
fingerprint = g_strsplit (original_uri, "#!md5!", 2);
if (fingerprint && fingerprint[0] && fingerprint[1])
@ -315,7 +310,6 @@ midori_transferbar_clear_clicked_cb (GtkWidget* button,
}
}
}
#endif
static void
midori_transferbar_init (MidoriTransferbar* transferbar)
@ -326,10 +320,8 @@ midori_transferbar_init (MidoriTransferbar* transferbar)
transferbar->clear = gtk_tool_button_new_from_stock (GTK_STOCK_CLEAR);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (transferbar->clear), _("Clear All"));
gtk_tool_item_set_is_important (transferbar->clear, TRUE);
#if WEBKIT_CHECK_VERSION (1, 1, 3)
g_signal_connect (transferbar->clear, "clicked",
G_CALLBACK (midori_transferbar_clear_clicked_cb), transferbar);
#endif
gtk_toolbar_insert (GTK_TOOLBAR (transferbar), transferbar->clear, -1);
transferbar->infos = NULL;
@ -340,7 +332,6 @@ midori_transferbar_confirm_delete (MidoriTransferbar* transferbar)
{
GtkWidget* dialog = NULL;
gboolean cancel = FALSE;
#if WEBKIT_CHECK_VERSION (1, 1, 3)
GList* list;
gboolean all_done = TRUE;
@ -359,9 +350,6 @@ midori_transferbar_confirm_delete (MidoriTransferbar* transferbar)
}
if (!all_done)
#else
if (transferbar->infos || g_list_nth_data (transferbar->infos, 0))
#endif
{
GtkWidget* widget = gtk_widget_get_toplevel (GTK_WIDGET (transferbar));
dialog = gtk_message_dialog_new (GTK_WINDOW (widget),