diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-09-13 18:24:56 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-09-13 18:24:56 +0800 |
commit | 2606279995f614634062e0aeb9833c482db5d083 (patch) | |
tree | 625e6ae5d03052e753c3322397b41f4174ca3926 /src/ephy-tabs-menu.c | |
parent | 79ec35d68d698710604fd4e9682188ae28ba1ae0 (diff) | |
download | gsoc2013-epiphany-2606279995f614634062e0aeb9833c482db5d083.tar.gz gsoc2013-epiphany-2606279995f614634062e0aeb9833c482db5d083.tar.zst gsoc2013-epiphany-2606279995f614634062e0aeb9833c482db5d083.zip |
Merging pre-gnome-2-10 branch to HEAD.
2004-09-13 Christian Persch <chpe@cvs.gnome.org>
Merging pre-gnome-2-10 branch to HEAD.
Splitting ChangeLog.
Diffstat (limited to 'src/ephy-tabs-menu.c')
-rw-r--r-- | src/ephy-tabs-menu.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c index 1ab5d1c1a..c780144ea 100644 --- a/src/ephy-tabs-menu.c +++ b/src/ephy-tabs-menu.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2003 David Bordoley + * Copyright (C) 2003-2004 Christian Persch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +29,8 @@ #include "ephy-shell.h" #include "ephy-debug.h" +#include <gtk/gtklabel.h> +#include <gtk/gtkmenuitem.h> #include <gtk/gtkaccelmap.h> #include <gtk/gtkaction.h> #include <gtk/gtkradioaction.h> @@ -123,6 +126,19 @@ tabs_reordered_cb (EphyNotebook *notebook, EphyTabsMenu *menu) } static void +connect_proxy_cb (GtkActionGroup *action_group, + GtkAction *action, + GtkWidget *proxy, + gpointer dummy) +{ + if (GTK_IS_MENU_ITEM (proxy)) + { + gtk_label_set_ellipsize (GTK_LABEL (GTK_BIN (proxy)->child), + PANGO_ELLIPSIZE_END); + } +} + +static void ephy_tabs_menu_set_window (EphyTabsMenu *menu, EphyWindow *window) { GtkWidget *notebook; @@ -132,9 +148,12 @@ ephy_tabs_menu_set_window (EphyTabsMenu *menu, EphyWindow *window) merge = GTK_UI_MANAGER (window->ui_merge); menu->priv->action_group = gtk_action_group_new ("TabsActions"); - gtk_ui_manager_insert_action_group (merge, menu->priv->action_group, 0); + gtk_ui_manager_insert_action_group (merge, menu->priv->action_group, -1); g_object_unref (menu->priv->action_group); + g_signal_connect (menu->priv->action_group, "connect-proxy", + G_CALLBACK (connect_proxy_cb), NULL); + notebook = ephy_window_get_notebook (window); g_signal_connect_object (notebook, "tab_added", G_CALLBACK (tab_added_cb), menu, 0); @@ -187,8 +206,8 @@ ephy_tabs_menu_class_init (EphyTabsMenuClass *klass) g_object_class_install_property (object_class, PROP_WINDOW, - g_param_spec_object ("EphyWindow", - "EphyWindow", + g_param_spec_object ("window", + "Window", "Parent window", EPHY_TYPE_WINDOW, G_PARAM_READWRITE | @@ -224,7 +243,7 @@ EphyTabsMenu * ephy_tabs_menu_new (EphyWindow *window) { return EPHY_TABS_MENU (g_object_new (EPHY_TYPE_TABS_MENU, - "EphyWindow", window, + "window", window, NULL)); } |