diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-06-06 13:51:46 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-06-06 13:51:46 +0800 |
commit | 315fea41788c87515239ef8b9d26c7bdbd23d1d1 (patch) | |
tree | 464166efc1fe0dbcad91406aa5794ca8abcfdf8c | |
parent | 06978bc7368680efabec6a2cde14c74ca5201d04 (diff) | |
download | gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar.gz gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar.bz2 gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar.lz gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar.xz gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.tar.zst gsoc2013-evolution-315fea41788c87515239ef8b9d26c7bdbd23d1d1.zip |
Bind right click on the ETable to "Save to VCard."
2000-06-06 Christopher James Lahey <clahey@helixcode.com>
* gui/component/addressbook.c: Bind right click on the ETable to
"Save to VCard."
svn path=/trunk/; revision=3438
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 9e1df5ca82..2b1f8ab0b6 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2000-06-06 Christopher James Lahey <clahey@helixcode.com> + + * gui/component/addressbook.c: Bind right click on the ETable to + "Save to VCard." + 2000-06-02 Christopher James Lahey <clahey@helixcode.com> * contact-editor/e-contact-editor.c: Made phone/email/address diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 779b4bc147..f98ec6eb51 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -19,6 +19,7 @@ #include <ebook/e-book.h> #include <e-util/e-canvas.h> #include <e-util/e-util.h> +#include <e-util/e-popup-menu.h> #include "e-minicard-view.h" #include <e-table.h> @@ -26,6 +27,7 @@ #include <e-addressbook-model.h> #include "e-contact-editor.h" +#include "e-contact-save-as.h" #include "e-ldap-server-dialog.h" #include <addressbook/printing/e-contact-print.h> @@ -858,6 +860,23 @@ table_double_click(ETable *table, gint row, AddressbookView *view) } static void +save_as (GtkWidget *widget, ECard *card) +{ + e_contact_save_as(_("Save as VCard"), card); +} + +static gint +table_right_click(ETable *table, gint row, gint col, GdkEvent *event, AddressbookView *view) +{ + ECard *card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(view->model), row); + EPopupMenu menu[] = { {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), 0}, {NULL, NULL, NULL, 0} }; + + e_popup_menu_run (menu, (GdkEventButton *)event, 0, card); + + return TRUE; +} + +static void create_table_view (AddressbookView *view, char *initial_query) { ECell *cell_left_just; @@ -906,6 +925,8 @@ create_table_view (AddressbookView *view, char *initial_query) gtk_signal_connect(GTK_OBJECT(view->table), "double_click", GTK_SIGNAL_FUNC(table_double_click), view); + gtk_signal_connect(GTK_OBJECT(view->table), "right_click", + GTK_SIGNAL_FUNC(table_right_click), view); gtk_box_pack_start(GTK_BOX(view->vbox), view->table, TRUE, TRUE, 0); |