diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-23 19:03:09 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-23 19:03:09 +0800 |
commit | 54b0b2121cb06e2cd0483a7adf8c4aac86308daf (patch) | |
tree | 632f8a5e6ca40b83e52cb9e6bfcbaeb784060102 /addressbook/gui/minicard | |
parent | cb227b68b34052c2198cddfece3ee6da81a5e13e (diff) | |
download | gsoc2013-evolution-54b0b2121cb06e2cd0483a7adf8c4aac86308daf.tar.gz gsoc2013-evolution-54b0b2121cb06e2cd0483a7adf8c4aac86308daf.tar.zst gsoc2013-evolution-54b0b2121cb06e2cd0483a7adf8c4aac86308daf.zip |
Added e-contact-editor-save-as.c and e-contact-editor-save-as.h.
2000-05-23 Christopher James Lahey <clahey@helixcode.com>
* contact-editor/Makefile.am: Added e-contact-editor-save-as.c and
e-contact-editor-save-as.h.
* contact-editor/e-contact-save-as.c,
contact-editor/e-contact-save-as.h: New files that display a save
as dialog and then save the given card to that file.
* gui/minicard/e-minicard.c: Call e_contact_save_as in a right
click menu.
svn path=/trunk/; revision=3182
Diffstat (limited to 'addressbook/gui/minicard')
-rw-r--r-- | addressbook/gui/minicard/e-minicard.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/gui/minicard/e-minicard.c b/addressbook/gui/minicard/e-minicard.c index 0089adb5dd..7831b3152d 100644 --- a/addressbook/gui/minicard/e-minicard.c +++ b/addressbook/gui/minicard/e-minicard.c @@ -29,7 +29,9 @@ #include <e-util/e-canvas.h> #include <e-util/e-util.h> #include <e-util/e-canvas-utils.h> +#include <e-util/e-popup-menu.h> #include "e-contact-editor.h" +#include "e-contact-save-as.h" #include "e-minicard-view.h" static void e_minicard_init (EMinicard *card); @@ -314,6 +316,13 @@ card_changed_cb (EBook* book, EBookStatus status, gpointer user_data) g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status); } +static void +save_as (GtkWidget *widget, EMinicard *minicard) +{ + e_card_simple_sync_card(minicard->simple); + e_contact_save_as(_("Save as VCard"), minicard->card); +} + static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) { @@ -367,6 +376,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_BUTTON_PRESS: if (event->button.button == 1) { e_canvas_item_grab_focus(item); + } else if (event->button.button == 3) { + EPopupMenu menu[] = { {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), 0}, {NULL, NULL, NULL, 0} }; + e_popup_menu_run (menu, (GdkEventButton *)event, 0, e_minicard); } break; case GDK_2BUTTON_PRESS: |