diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-03-01 02:34:48 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-03-01 02:34:48 +0800 |
commit | 30268048c1a62294bfe663d95830eeffb594aaf4 (patch) | |
tree | 50bf47aa2590b520a36c01089619c3a3e69441ac /lib | |
parent | f622f8192547ed09c59f09416a4b532c5541a372 (diff) | |
download | gsoc2013-epiphany-30268048c1a62294bfe663d95830eeffb594aaf4.tar.gz gsoc2013-epiphany-30268048c1a62294bfe663d95830eeffb594aaf4.tar.zst gsoc2013-epiphany-30268048c1a62294bfe663d95830eeffb594aaf4.zip |
Remove old toolbar editor ui
2003-02-28 Marco Pesenti Gritti <marco@it.gnome.org>
* data/glade/Makefile.am:
* data/glade/toolbar-editor.glade:
Remove old toolbar editor ui
* lib/ephy-autocompletion.c: (ephy_autocompletion_update_matches):
Remove an obsolete FIXME
* lib/ephy-gui.c:
* lib/ephy-gui.h:
Remove some functions that was used only in galeon bookmarks
* lib/widgets/ephy-autocompletion-window.c:
(hack_tree_view_move_selection),
(ephy_autocompletion_window_key_press_hack):
* lib/widgets/ephy-location-entry.c:
(ephy_location_entry_autocompletion_window_url_selected_cb):
Up on the top border of the autocompl window goes back to the entry
* src/appearance-prefs.c: (setup_font_menu):
Free fonts list
* src/ephy-tab.c: (ephy_tab_parent_set_cb),
(ephy_tab_set_visibility):
* src/window-commands.c: (window_cmd_tabs_move_left),
(window_cmd_tabs_move_right):
Implement tabs moving
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-autocompletion.c | 1 | ||||
-rw-r--r-- | lib/ephy-gui.c | 114 | ||||
-rw-r--r-- | lib/ephy-gui.h | 26 | ||||
-rw-r--r-- | lib/widgets/ephy-autocompletion-window.c | 29 | ||||
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 10 |
5 files changed, 29 insertions, 151 deletions
diff --git a/lib/ephy-autocompletion.c b/lib/ephy-autocompletion.c index 24578f126..5a67be64c 100644 --- a/lib/ephy-autocompletion.c +++ b/lib/ephy-autocompletion.c @@ -325,7 +325,6 @@ ephy_autocompletion_update_matches (EphyAutocompletion *ac) } if (p->status == GAS_NEEDS_REFINE) { - /* FIXME we do full update for now */ ephy_autocompletion_refine_matches (ac); } diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index 90d282b3d..01500e1e6 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -120,120 +120,6 @@ ephy_gui_gtk_radio_button_set (GtkRadioButton *radio_button, gint index) } } -GtkWidget * -ephy_gui_append_new_menuitem (GtkWidget *menu, - const char *mnemonic, - GCallback callback, - gpointer data) -{ - GtkWidget *menu_item; - - menu_item = gtk_menu_item_new_with_mnemonic (mnemonic); - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - menu_item); - - if (callback) - { - g_signal_connect (G_OBJECT (menu_item), - "activate", - callback, data); - } - - return menu_item; -} - -GtkWidget * -ephy_gui_append_new_menuitem_stock (GtkWidget *menu, - const char *stock_id, - GCallback callback, - gpointer data) -{ - GtkWidget *menu_item; - - menu_item = gtk_image_menu_item_new_from_stock (stock_id, NULL); - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - menu_item); - - if (callback) - { - g_signal_connect (G_OBJECT (menu_item), - "activate", - callback, data); - } - - return menu_item; -} - -GtkWidget * -ephy_gui_append_new_menuitem_stock_icon (GtkWidget *menu, - const char *stock_id, - const char *mnemonic, - GCallback callback, - gpointer data) -{ - GtkWidget *menu_item; - GtkWidget *image; - - menu_item = gtk_image_menu_item_new_with_mnemonic (mnemonic); - image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); - gtk_widget_show (image); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image); - - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - menu_item); - - if (callback) - { - g_signal_connect (G_OBJECT (menu_item), - "activate", - callback, data); - } - - return menu_item; -} - -GtkWidget * -ephy_gui_append_new_check_menuitem (GtkWidget *menu, - const char *mnemonic, - gboolean value, - GCallback callback, - gpointer data) -{ - GtkWidget *menu_item; - - menu_item = gtk_check_menu_item_new_with_mnemonic (mnemonic); - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - menu_item); - - gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), value); - - if (callback) - { - g_signal_connect (G_OBJECT (menu_item), - "activate", - callback, data); - } - - return menu_item; -} - -GtkWidget * -ephy_gui_append_separator (GtkWidget *menu) -{ - GtkWidget *menu_item; - - menu_item = gtk_menu_item_new (); - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - menu_item); - - return menu_item; -} - gboolean ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename) { diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 0d736592f..75fc0164b 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -38,32 +38,6 @@ gint ephy_gui_gtk_radio_button_get (GtkRadioButton *radio_button); void ephy_gui_gtk_radio_button_set (GtkRadioButton *radio_button, gint index); -GList *ephy_gui_treeview_get_selection_refs (GtkTreeView *treeview); - -GtkWidget *ephy_gui_append_new_menuitem (GtkWidget *menu, - const char *mnemonic, - GCallback callback, - gpointer data); - -GtkWidget *ephy_gui_append_new_menuitem_stock (GtkWidget *menu, - const char *stock_id, - GCallback callback, - gpointer data); - -GtkWidget *ephy_gui_append_new_menuitem_stock_icon (GtkWidget *menu, - const char *stock_id, - const char *mnemonic, - GCallback callback, - gpointer data); - -GtkWidget *ephy_gui_append_new_check_menuitem (GtkWidget *menu, - const char *mnemonic, - gboolean value, - GCallback callback, - gpointer data); - -GtkWidget *ephy_gui_append_separator (GtkWidget *menu); - gboolean ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename); diff --git a/lib/widgets/ephy-autocompletion-window.c b/lib/widgets/ephy-autocompletion-window.c index e57735438..bd3019632 100644 --- a/lib/widgets/ephy-autocompletion-window.c +++ b/lib/widgets/ephy-autocompletion-window.c @@ -611,7 +611,8 @@ ephy_autocompletion_window_button_press_event_cb (GtkWidget *widget, } static GtkTreeView * -hack_tree_view_move_selection (GtkTreeView *tv, GtkTreeView *alternate, int dir) +hack_tree_view_move_selection (EphyAutocompletionWindow *aw, GtkTreeView *tv, + GtkTreeView *alternate, int dir) { GtkTreeSelection *ts = gtk_tree_view_get_selection (tv); GtkTreeModel *model; @@ -632,6 +633,8 @@ hack_tree_view_move_selection (GtkTreeView *tv, GtkTreeView *alternate, int dir) { GtkTreePath *p = selected->data; int i; + gboolean exit = FALSE; + if (dir > 0) { for (i = 0; i < dir; ++i) @@ -652,10 +655,18 @@ hack_tree_view_move_selection (GtkTreeView *tv, GtkTreeView *alternate, int dir) gtk_tree_selection_select_path (ts, p); gtk_tree_view_scroll_to_cell (tv, p, NULL, FALSE, 0, 0); } - } + else + { + g_signal_emit (aw, EphyAutocompletionWindowSignals + [SELECTED], 0, NULL, FALSE); + exit = TRUE; + } - g_list_foreach (selected, (GFunc) gtk_tree_path_free, NULL); - g_list_free (selected); + g_list_foreach (selected, (GFunc) gtk_tree_path_free, NULL); + g_list_free (selected); + + if (exit) return NULL; + } if (!prev_result) { @@ -680,7 +691,7 @@ hack_tree_view_move_selection (GtkTreeView *tv, GtkTreeView *alternate, int dir) } else if (gtk_tree_selection_count_selected_rows (ts) == 0) { - hack_tree_view_move_selection (alternate, tv, dir); + hack_tree_view_move_selection (aw, alternate, tv, dir); return alternate; } @@ -704,19 +715,19 @@ ephy_autocompletion_window_key_press_hack (EphyAutocompletionWindow *aw, { case GDK_Up: p->active_tree_view = hack_tree_view_move_selection - (tree_view, alt, -1); + (aw, tree_view, alt, -1); break; case GDK_Down: p->active_tree_view = hack_tree_view_move_selection - (tree_view, alt, +1); + (aw, tree_view, alt, +1); break; case GDK_Page_Down: p->active_tree_view = hack_tree_view_move_selection - (tree_view, alt, +5); + (aw, tree_view, alt, +5); break; case GDK_Page_Up: p->active_tree_view = hack_tree_view_move_selection - (tree_view, alt, -5); + (aw, tree_view, alt, -5); break; case GDK_Return: case GDK_space: diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 57fb89485..15bcac979 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -478,7 +478,15 @@ ephy_location_entry_autocompletion_window_url_selected_cb (EphyAutocompletionWin int action, EphyLocationEntry *w) { - real_entry_set_location (w, action ? w->priv->before_completion : target); + if (target) + { + real_entry_set_location (w, action ? w->priv->before_completion : target); + } + else + { + real_entry_set_location (w, w->priv->before_completion); + gtk_editable_set_position (GTK_EDITABLE (w->priv->entry), -1); + } } void |