evolution r36392 - in branches/kill-bonobo: addressbook/gui/component doc/reference/shell shell widgets/misc



Author: mbarnes
Date: Fri Sep 19 18:21:06 2008
New Revision: 36392
URL: http://svn.gnome.org/viewvc/evolution?rev=36392&view=rev

Log:
Fix some miscellaneous address book bugs.
Kill e-shell-constants.h.


Removed:
   branches/kill-bonobo/shell/e-shell-constants.h
Modified:
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
   branches/kill-bonobo/doc/reference/shell/Makefile.am
   branches/kill-bonobo/shell/Makefile.am
   branches/kill-bonobo/shell/e-shell-common.h
   branches/kill-bonobo/shell/e-shell-importer.c
   branches/kill-bonobo/shell/e-shell-window-private.c
   branches/kill-bonobo/widgets/misc/e-menu-tool-button.c

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	Fri Sep 19 18:21:06 2008
@@ -200,7 +200,7 @@
 	if (strcmp (action_name, "contact-new") == 0)
 		eab_show_contact_editor (book, contact, TRUE, TRUE);
 
-	if (strcmp (action_name, "contact-list-new") == 0)
+	if (strcmp (action_name, "contact-new-list") == 0)
 		eab_show_contact_list_editor (book, contact, TRUE, TRUE);
 
 	g_object_unref (contact);
@@ -256,14 +256,14 @@
 	{ "contact-new",
 	  "contact-new",
 	  N_("_Contact"),  /* XXX Need C_() here */
-	  "<Control>c",
+	  "<Shift><Control>c",
 	  N_("Create a new contact"),
 	  G_CALLBACK (action_contact_new_cb) },
 
 	{ "contact-new-list",
 	  "stock_contact-list",
 	  N_("Contact _List"),
-	  "<Control>l",
+	  "<Shift><Control>l",
 	  N_("Create a new contact list"),
 	  G_CALLBACK (action_contact_new_cb) }
 };

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	Fri Sep 19 18:21:06 2008
@@ -280,11 +280,19 @@
 action_contact_new_cb (GtkAction *action,
                        EBookShellView *book_shell_view)
 {
+	EAddressbookView *view;
+	EAddressbookModel *model;
 	EContact *contact;
 	EBook *book;
 
+	view = e_book_shell_view_get_current_view (book_shell_view);
+	g_return_if_fail (view != NULL);
+
+	model = e_addressbook_view_get_model (view);
+	book = e_addressbook_model_get_book (model);
+	g_return_if_fail (book != NULL);
+
 	contact = e_contact_new ();
-	book = book_shell_view->priv->book;
 	eab_show_contact_editor (book, contact, TRUE, TRUE);
 	g_object_unref (contact);
 }
@@ -293,11 +301,19 @@
 action_contact_new_list_cb (GtkAction *action,
                             EBookShellView *book_shell_view)
 {
+	EAddressbookView *view;
+	EAddressbookModel *model;
 	EContact *contact;
 	EBook *book;
 
+	view = e_book_shell_view_get_current_view (book_shell_view);
+	g_return_if_fail (view != NULL);
+
+	model = e_addressbook_view_get_model (view);
+	book = e_addressbook_model_get_book (model);
+	g_return_if_fail (book != NULL);
+
 	contact = e_contact_new ();
-	book = book_shell_view->priv->book;
 	eab_show_contact_list_editor (book, contact, TRUE, TRUE);
 	g_object_unref (contact);
 }

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c	Fri Sep 19 18:21:06 2008
@@ -507,8 +507,6 @@
 
 	g_hash_table_remove_all (priv->uid_to_view);
 	g_hash_table_remove_all (priv->uid_to_editor);
-
-	DISPOSE (priv->book);
 }
 
 void
@@ -518,8 +516,6 @@
 
 	g_hash_table_destroy (priv->uid_to_view);
 	g_hash_table_destroy (priv->uid_to_editor);
-
-	g_free (priv->password);
 }
 
 EAddressbookView *

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h	Fri Sep 19 18:21:06 2008
@@ -95,9 +95,6 @@
 
 	GHashTable *uid_to_view;
 	GHashTable *uid_to_editor;
-
-	EBook *book;
-	gchar *password;
 };
 
 void		e_book_shell_view_private_init

Modified: branches/kill-bonobo/doc/reference/shell/Makefile.am
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/Makefile.am	(original)
+++ branches/kill-bonobo/doc/reference/shell/Makefile.am	Fri Sep 19 18:21:06 2008
@@ -125,7 +125,6 @@
 	$(top_builddir)/widgets/misc/.libs/e-popup-menu.o		\
 	$(top_builddir)/widgets/misc/.libs/e-preferences-window.o	\
 	$(top_builddir)/widgets/misc/.libs/e-spinner.o			\
-	$(top_builddir)/widgets/misc/.libs/e-task-widget.o		\
 	$(top_builddir)/widgets/misc/.libs/e-unicode.o			\
 	-ledataserver-1.2						\
 	-ledataserverui-1.2						\

Modified: branches/kill-bonobo/shell/Makefile.am
==============================================================================
--- branches/kill-bonobo/shell/Makefile.am	(original)
+++ branches/kill-bonobo/shell/Makefile.am	Fri Sep 19 18:21:06 2008
@@ -98,7 +98,6 @@
 	e-config-upgrade.h			\
 	e-shell.c				\
 	e-shell.h				\
-	e-shell-constants.h			\
 	e-shell-importer.c			\
 	e-shell-importer.h			\
 	e-shell-window-private.c		\

Modified: branches/kill-bonobo/shell/e-shell-common.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-common.h	(original)
+++ branches/kill-bonobo/shell/e-shell-common.h	Fri Sep 19 18:21:06 2008
@@ -27,5 +27,6 @@
 
 #include <gio/gio.h>
 #include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
 
 #endif /* E_SHELL_COMMON_H */

Modified: branches/kill-bonobo/shell/e-shell-importer.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-importer.c	(original)
+++ branches/kill-bonobo/shell/e-shell-importer.c	Fri Sep 19 18:21:06 2008
@@ -48,7 +48,6 @@
 
 #include "e-shell.h"
 #include "e-shell-window.h"
-#include "e-shell-constants.h"
 
 #include "e-shell-importer.h"
 

Modified: branches/kill-bonobo/shell/e-shell-window-private.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-private.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window-private.c	Fri Sep 19 18:21:06 2008
@@ -244,6 +244,10 @@
 
 	item = e_menu_tool_button_new (_("New"));
 	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
+	gtk_widget_add_accelerator (
+		GTK_WIDGET (item), "clicked",
+		gtk_ui_manager_get_accel_group (priv->ui_manager),
+		GDK_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
 	gtk_toolbar_insert (GTK_TOOLBAR (widget), item, 0);
 	priv->menu_tool_button = g_object_ref (item);
 	gtk_widget_show (GTK_WIDGET (item));

Modified: branches/kill-bonobo/widgets/misc/e-menu-tool-button.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-menu-tool-button.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-menu-tool-button.c	Fri Sep 19 18:21:06 2008
@@ -58,12 +58,14 @@
 }
 
 static void
-menu_tool_button_update_icon (GtkToolButton *tool_button)
+menu_tool_button_update_button (GtkToolButton *tool_button)
 {
 	GtkMenuItem *menu_item;
 	GtkMenuToolButton *menu_tool_button;
 	GtkImageMenuItem *image_menu_item;
+	GtkAction *action;
 	GtkWidget *image;
+	gchar *tooltip = NULL;
 
 	menu_tool_button = GTK_MENU_TOOL_BUTTON (tool_button);
 	menu_item = menu_tool_button_get_first_menu_item (menu_tool_button);
@@ -78,6 +80,14 @@
 	image = menu_tool_button_clone_image (image);
 	gtk_tool_button_set_icon_widget (tool_button, image);
 	gtk_widget_show (image);
+
+	/* If the menu item is a proxy for a GtkAction, extract
+	 * the action's tooltip and use it as our own tooltip. */
+	action = gtk_widget_get_action (GTK_WIDGET (menu_item));
+	if (action != NULL)
+		g_object_get (action, "tooltip", &tooltip, NULL);
+	gtk_widget_set_tooltip_text (GTK_WIDGET (tool_button), tooltip);
+	g_free (tooltip);
 }
 
 static void
@@ -109,7 +119,7 @@
 {
 	g_signal_connect (
 		button, "notify::menu",
-		G_CALLBACK (menu_tool_button_update_icon), NULL);
+		G_CALLBACK (menu_tool_button_update_button), NULL);
 }
 
 GType



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]