diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-02-23 10:20:51 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-02-23 10:20:51 +0800 |
commit | db0e48d09abcc0134efac3ce2717c42a216b18e3 (patch) | |
tree | b44b835ecd180d5efc0d3822613837c0c95131a5 /lib/widgets/ephy-autocompletion-window.c | |
parent | 6fb4ac671cbcfdd90fffb7752f3fdce8f80cc30e (diff) | |
download | gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar.gz gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar.bz2 gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar.lz gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar.xz gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.tar.zst gsoc2013-epiphany-db0e48d09abcc0134efac3ce2717c42a216b18e3.zip |
Update location entry with the urls selected on the drop down. Implement
2003-02-23 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/widgets/ephy-autocompletion-window.c:
(ephy_autocompletion_window_class_init),
(ephy_autocompletion_window_key_press_hack):
* lib/widgets/ephy-autocompletion-window.h:
* lib/widgets/ephy-editable-toolbar.c: (drag_data_delete_cb),
(drag_data_get_cb), (connect_toolbar_drag_source),
(disconnect_toolbar_drag_source), (do_merge), (editor_close_cb),
(button_press_cb), (ephy_editable_toolbar_edit):
* lib/widgets/ephy-location-entry.c: (location_focus_out_cb),
(ephy_location_entry_init), (real_entry_set_location),
(ephy_location_entry_key_press_event_cb),
(ephy_location_entry_activate_cb),
(ephy_location_entry_set_location),
(ephy_location_entry_autocompletion_window_url_selected_cb),
(ephy_location_entry_set_autocompletion),
(ephy_location_entry_autocompletion_window_url_activated_cb),
(ephy_location_entry_autocompletion_window_hidden_cb),
(ephy_location_entry_edit):
* lib/widgets/ephy-location-entry.h:
* src/ephy-shell.c: (ephy_shell_new_tab):
* src/ephy-window.c: (add_widget):
* src/toolbar.c: (toolbar_edit_location):
* src/toolbar.h:
Update location entry with the urls selected on the drop down.
Implement editing mode in location entry == when the user is typing
an url try to do not disturb (mozilla still grab the focus damnit).
Dont put the homepage url in the location. I'm not sure if this is
a good behavior for normal urls (I dont see problems, but please
prove me wrong), but for about:blank it's needed.
Diffstat (limited to 'lib/widgets/ephy-autocompletion-window.c')
-rw-r--r-- | lib/widgets/ephy-autocompletion-window.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/widgets/ephy-autocompletion-window.c b/lib/widgets/ephy-autocompletion-window.c index 2eba9da66..8921c93f1 100644 --- a/lib/widgets/ephy-autocompletion-window.c +++ b/lib/widgets/ephy-autocompletion-window.c @@ -95,6 +95,7 @@ static gpointer g_object_class; enum EphyAutocompletionWindowSignalsEnum { ACTIVATED, + SELECTED, EPHY_AUTOCOMPLETION_WINDOW_HIDDEN, EPHY_AUTOCOMPLETION_WINDOW_LAST_SIGNAL }; @@ -125,6 +126,17 @@ ephy_autocompletion_window_class_init (EphyAutocompletionWindowClass *klass) G_TYPE_STRING, G_TYPE_INT); + EphyAutocompletionWindowSignals[SELECTED] = g_signal_new ( + "selected", G_OBJECT_CLASS_TYPE (klass), + G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST | G_SIGNAL_RUN_CLEANUP, + G_STRUCT_OFFSET (EphyAutocompletionWindowClass, selected), + NULL, NULL, + ephy_marshal_VOID__STRING_INT, + G_TYPE_NONE, + 2, + G_TYPE_STRING, + G_TYPE_INT); + EphyAutocompletionWindowSignals[EPHY_AUTOCOMPLETION_WINDOW_HIDDEN] = g_signal_new ( "hidden", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST | G_SIGNAL_RUN_CLEANUP, @@ -718,6 +730,23 @@ ephy_autocompletion_window_key_press_hack (EphyAutocompletionWindow *aw, g_warning ("Unexpected keyval"); break; } + + switch (keyval) + { + case GDK_Up: + case GDK_Down: + case GDK_Page_Down: + case GDK_Page_Up: + if (aw->priv->selected) + { + g_signal_emit (aw, EphyAutocompletionWindowSignals + [SELECTED], 0, aw->priv->selected, action); + } + break; + default: + break; + } + return TRUE; } |