Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
Squashed commit of the following:
commit 6e066374da45dd602ee1ca3c9bc5f77b9411b6f4
Author: Eric Gregory <eric@yorba.org>
Date: Tue Jan 15 11:36:32 2013 -0800
Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
This commit is contained in:
parent
03b88277ba
commit
3467c72035
18 changed files with 27346 additions and 9 deletions
27333
bindings/gir/WebKit-3.0.gir
Normal file
27333
bindings/gir/WebKit-3.0.gir
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -7,4 +7,5 @@ WebView.entering_fullscreen#signal name="entering_fullscreen_signal"
|
|||
WebView.leaving_fullscreen#signal name="leaving_fullscreen_signal"
|
||||
|
||||
WebView.move_cursor#virtual_method name="leaving_fullscreen_method"
|
||||
WebSettings.enable_default_context_menu#property deprecated=false
|
||||
|
||||
|
|
@ -413,8 +413,9 @@ link_directories(${LIB_PATHS})
|
|||
add_definitions(${CFLAGS})
|
||||
|
||||
set(VALAC_OPTIONS
|
||||
--vapidir=${CMAKE_SOURCE_DIR}/vapi
|
||||
--metadatadir=${CMAKE_SOURCE_DIR}/metadata
|
||||
--vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi
|
||||
--metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata
|
||||
--girdir=${CMAKE_SOURCE_DIR}/bindings/gir
|
||||
--target-glib=${TARGET_GLIB}
|
||||
--thread
|
||||
--enable-checking
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ public class ComposerWindow : Gtk.Window {
|
|||
editor.editable = true;
|
||||
editor.load_finished.connect(on_load_finished);
|
||||
editor.hovering_over_link.connect(on_hovering_over_link);
|
||||
editor.context_menu.connect(on_context_menu);
|
||||
editor.button_press_event.connect(on_button_press_event);
|
||||
editor.move_focus.connect(update_actions);
|
||||
editor.copy_clipboard.connect(update_actions);
|
||||
editor.cut_clipboard.connect(update_actions);
|
||||
|
|
@ -317,6 +317,7 @@ public class ComposerWindow : Gtk.Window {
|
|||
s.enable_scripts = false;
|
||||
s.enable_java_applet = false;
|
||||
s.enable_plugins = false;
|
||||
s.enable_default_context_menu = false; // Deprecated, still needed for Precise
|
||||
editor.settings = s;
|
||||
|
||||
scroll.add(editor);
|
||||
|
|
@ -935,8 +936,9 @@ public class ComposerWindow : Gtk.Window {
|
|||
return base.key_press_event(event);
|
||||
}
|
||||
|
||||
private bool on_context_menu(Gtk.Widget default_menu, WebKit.HitTestResult hit_test_result,
|
||||
bool keyboard_triggered) {
|
||||
private bool on_button_press_event(Gdk.EventButton event) {
|
||||
if (event.button != 3)
|
||||
return true;
|
||||
|
||||
context_menu = new Gtk.Menu();
|
||||
|
||||
|
|
@ -985,11 +987,11 @@ public class ComposerWindow : Gtk.Window {
|
|||
context_menu.append(select_all_item);
|
||||
|
||||
context_menu.show_all();
|
||||
context_menu.popup(null, null, null, 0, Gtk.get_current_event_time());
|
||||
context_menu.popup(null, null, null, event.button, event.time);
|
||||
|
||||
update_actions();
|
||||
|
||||
return true; // Suppress default context menu.
|
||||
return false;
|
||||
}
|
||||
|
||||
private void update_actions() {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ public class ConversationViewer : Gtk.Box {
|
|||
web_view = new ConversationWebView();
|
||||
|
||||
web_view.hovering_over_link.connect(on_hovering_over_link);
|
||||
web_view.context_menu.connect(() => { return true; }); // Suppress default context menu.
|
||||
|
||||
web_view.image_load_requested.connect(on_image_load_requested);
|
||||
web_view.link_selected.connect((link) => { link_selected(link); });
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ public class ConversationWebView : WebKit.WebView {
|
|||
config.enable_scripts = false;
|
||||
config.enable_java_applet = false;
|
||||
config.enable_plugins = false;
|
||||
config.enable_default_context_menu = false; // Deprecated, still needed for Precise
|
||||
settings = config;
|
||||
|
||||
// Hook up signals.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue