aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-04-18 06:29:56 +0800
committerChris Lahey <clahey@src.gnome.org>2002-04-18 06:29:56 +0800
commitc2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1 (patch)
treefa30eef3dba8dfc871dad0aecf14df1156ed6572 /addressbook
parenta35bc80a53e50752c52f20e21765b95a55f27331 (diff)
downloadgsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar.gz
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar.bz2
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar.lz
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar.xz
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.tar.zst
gsoc2013-evolution-c2ee47d180f472cdcc2c9c35e6e7d9400ab2d6c1.zip
Bumped required gal version number to 0.19.99.11.
2002-04-17 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped required gal version number to 0.19.99.11. From addressbook/ChangeLog: 2002-04-17 Christopher James Lahey <clahey@ximian.com> * gui/component/select-names/e-select-names.c (e_select_names_create_categories): Changed this to use ECategoriesMasterListOptionMenu. * gui/component/select-names/e-select-names.c (section_right_click_cb), gui/widgets/e-addressbook-reflow-adapter.c, gui/widgets/e-addressbook-view.c: Updated these to match the new EPopupMenu. From calendar/ChangeLog: 2002-04-17 Christopher James Lahey <clahey@ximian.com> * gui/e-calendar-table.c, gui/e-day-view.c, gui/e-week-view.c, gui/dialogs/meeting-page.c: Updated these to match the new EPopupMenu. From mail/ChangeLog: 2002-04-17 Christopher James Lahey <clahey@ximian.com> * folder-browser.c, mail-display.c: Updated these to match the new EPopupMenu. From shell/ChangeLog: 2002-04-17 Christopher James Lahey <clahey@ximian.com> * e-activity-handler.c: Updated this to match the new EPopupMenu. svn path=/trunk/; revision=16498
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog12
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c36
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c34
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c32
4 files changed, 65 insertions, 49 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 994aec5ec6..f8195e4d70 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,15 @@
+2002-04-17 Christopher James Lahey <clahey@ximian.com>
+
+ * gui/component/select-names/e-select-names.c
+ (e_select_names_create_categories): Changed this to use
+ ECategoriesMasterListOptionMenu.
+
+ * gui/component/select-names/e-select-names.c
+ (section_right_click_cb),
+ gui/widgets/e-addressbook-reflow-adapter.c,
+ gui/widgets/e-addressbook-view.c: Updated these to match the new
+ EPopupMenu.
+
2002-04-11 Christopher James Lahey <clahey@ximian.com>
* gui/component/addressbook-component.c: Include
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index 559e0eef58..b3d3891595 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -43,7 +43,7 @@
#include "e-select-names.h"
#include <addressbook/backend/ebook/e-card-simple.h>
#include "e-select-names-text-model.h"
-#include <gal/widgets/e-categories-master-list-combo.h>
+#include <gal/widgets/e-categories-master-list-option-menu.h>
#include <gal/widgets/e-unicode.h>
#include <gal/e-text/e-entry.h>
#include <e-util/e-categories-master-list-wombat.h>
@@ -53,7 +53,7 @@ static void e_select_names_class_init (ESelectNamesClass *klass);
static void e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
static void e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void e_select_names_destroy (GtkObject *object);
-static void update_query (GtkWidget *button, ESelectNames *e_select_names);
+static void update_query (GtkWidget *widget, ESelectNames *e_select_names);
static GnomeDialogClass *parent_class = NULL;
#define PARENT_TYPE gnome_dialog_get_type()
@@ -465,15 +465,15 @@ removed_folder (EvolutionStorageListener *storage_listener,
}
static void
-update_query (GtkWidget *button, ESelectNames *e_select_names)
+update_query (GtkWidget *widget, ESelectNames *e_select_names)
{
char *category = "";
char *search = "";
char *query;
char *q_array[4];
int i;
- if (e_select_names->categories_entry) {
- category = gtk_entry_get_text (GTK_ENTRY (e_select_names->categories_entry));
+ if (e_select_names->categories) {
+ category = e_categories_master_list_option_menu_get_category (E_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories));
}
if (e_select_names->search_entry) {
search = gtk_entry_get_text (GTK_ENTRY (e_select_names->search_entry));
@@ -505,6 +505,12 @@ update_query (GtkWidget *button, ESelectNames *e_select_names)
}
static void
+categories_changed (GtkWidget *widget, gint value, ESelectNames *e_select_names)
+{
+ update_query (widget, e_select_names);
+}
+
+static void
hookup_listener (ESelectNames *e_select_names,
GNOME_Evolution_Storage storage,
EvolutionStorageListener *listener,
@@ -653,13 +659,13 @@ e_select_names_create_categories (gchar *name,
gint int1, gint int2)
{
ECategoriesMasterList *ecml;
- GtkWidget *combo;
+ GtkWidget *option_menu;
ecml = e_categories_master_list_wombat_new ();
- combo = e_categories_master_list_combo_new (ecml);
+ option_menu = e_categories_master_list_option_menu_new (ecml);
gtk_object_unref (GTK_OBJECT (ecml));
- return combo;
+ return option_menu;
}
static void
@@ -699,21 +705,17 @@ e_select_names_init (ESelectNames *e_select_names)
e_select_names->without = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "without");
e_select_names->categories = glade_xml_get_widget (gui, "custom-categories");
- if (e_select_names->categories && !GTK_IS_COMBO (e_select_names->categories))
+ if (e_select_names->categories && !E_IS_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories))
e_select_names->categories = NULL;
- if (e_select_names->categories) {
- e_select_names->categories_entry = GTK_COMBO (e_select_names->categories)->entry;
- } else
- e_select_names->categories_entry = NULL;
e_select_names->search_entry = glade_xml_get_widget (gui, "entry-find");
if (e_select_names->search_entry && !GTK_IS_ENTRY (e_select_names->search_entry))
e_select_names->search_entry = NULL;
if (e_select_names->search_entry)
gtk_signal_connect(GTK_OBJECT(e_select_names->search_entry), "activate",
GTK_SIGNAL_FUNC(update_query), e_select_names);
- if (e_select_names->categories_entry)
- gtk_signal_connect(GTK_OBJECT(e_select_names->categories_entry), "changed",
- GTK_SIGNAL_FUNC(update_query), e_select_names);
+ if (e_select_names->categories)
+ gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "changed",
+ GTK_SIGNAL_FUNC(categories_changed), e_select_names);
button = glade_xml_get_widget (gui, "button-find");
if (button)
@@ -849,7 +851,7 @@ static void
section_right_click_cb (EText *text, GdkEventButton *ev, gint pos, ESelectNamesChild *child)
{
EPopupMenu right_click_menu[] = {
- { N_("Remove"), NULL, GTK_SIGNAL_FUNC (remove_cb), NULL, NULL, 0 },
+ E_POPUP_ITEM (N_("Remove"), GTK_SIGNAL_FUNC (remove_cb), 0),
E_POPUP_TERMINATOR
};
gint index;
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 895489863a..793a9a4bc5 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -311,24 +311,24 @@ e_addressbook_reflow_adapter_right_click (EAddressbookReflowAdapter *adapter, Gd
ModelAndSelection *mns = g_new(ModelAndSelection, 1);
GtkMenu *popup;
EPopupMenu menu[] = {
- { N_("Open"), NULL, GTK_SIGNAL_FUNC(open_card), NULL, NULL, 0 },
- { N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, NULL, 0 },
- { N_("Forward Contact"), NULL, GTK_SIGNAL_FUNC(send_as), NULL, NULL, 0 },
- { N_("Send Message to Contact"), NULL, GTK_SIGNAL_FUNC(send_to), NULL, NULL, 0 },
- { N_("Print"), NULL, GTK_SIGNAL_FUNC(print), NULL, NULL, 0 },
+ E_POPUP_ITEM (N_("Open"), GTK_SIGNAL_FUNC(open_card), 0),
+ E_POPUP_ITEM (N_("Save as VCard"), GTK_SIGNAL_FUNC(save_as), 0),
+ E_POPUP_ITEM (N_("Forward Contact"), GTK_SIGNAL_FUNC(send_as), 0),
+ E_POPUP_ITEM (N_("Send Message to Contact"), GTK_SIGNAL_FUNC(send_to), 0),
+ E_POPUP_ITEM (N_("Print"), GTK_SIGNAL_FUNC(print), 0),
#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- { N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, NULL, 0 },
+ E_POPUP_ITEM (N_("Print Envelope"), GTK_SIGNAL_FUNC(print_envelope), 0),
#endif
E_POPUP_SEPARATOR,
-
- { N_("Copy to folder..."), NULL, GTK_SIGNAL_FUNC(copy_to_folder), NULL, NULL, 0 },
- { N_("Move to folder..."), NULL, GTK_SIGNAL_FUNC(move_to_folder), NULL, NULL, POPUP_READONLY_MASK },
+
+ E_POPUP_ITEM (N_("Copy to folder..."), GTK_SIGNAL_FUNC(copy_to_folder), 0),
+ E_POPUP_ITEM (N_("Move to folder..."), GTK_SIGNAL_FUNC(move_to_folder), POPUP_READONLY_MASK),
E_POPUP_SEPARATOR,
-
- { N_("Cut"), NULL, GTK_SIGNAL_FUNC (cut), NULL, NULL, POPUP_READONLY_MASK },
- { N_("Copy"), NULL, GTK_SIGNAL_FUNC (copy), NULL, NULL, 0 },
- { N_("Paste"), NULL, GTK_SIGNAL_FUNC (paste), NULL, NULL, POPUP_READONLY_MASK },
- { N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, NULL, POPUP_READONLY_MASK},
+
+ E_POPUP_ITEM (N_("Cut"), GTK_SIGNAL_FUNC (cut), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("Copy"), GTK_SIGNAL_FUNC (copy), 0),
+ E_POPUP_ITEM (N_("Paste"), GTK_SIGNAL_FUNC (paste), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("Delete"), GTK_SIGNAL_FUNC (delete), POPUP_READONLY_MASK),
E_POPUP_TERMINATOR
};
@@ -375,10 +375,10 @@ e_addressbook_reflow_adapter_base_right_click (EAddressbookReflowAdapter *adapte
ModelAndSelection *mns = g_new(ModelAndSelection, 1);
GtkMenu *popup;
EPopupMenu menu[] = {
- { N_("New Contact..."), NULL, GTK_SIGNAL_FUNC(new_card), NULL, NULL, POPUP_READONLY_MASK },
- { N_("New Contact List..."), NULL, GTK_SIGNAL_FUNC(new_list), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("New Contact..."), GTK_SIGNAL_FUNC(new_card), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("New Contact List..."), GTK_SIGNAL_FUNC(new_list), POPUP_READONLY_MASK),
E_POPUP_SEPARATOR,
- { N_("Paste"), NULL, GTK_SIGNAL_FUNC (paste), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("Paste"), GTK_SIGNAL_FUNC (paste), POPUP_READONLY_MASK),
E_POPUP_TERMINATOR
};
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 119b8a4147..070e1b49e0 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -69,6 +69,8 @@
#define SHOW_ALL_SEARCH "(contains \"x-evolution-any-field\" \"\")"
+#define d(x)
+
static void e_addressbook_view_init (EAddressbookView *card);
static void e_addressbook_view_class_init (EAddressbookViewClass *klass);
static void e_addressbook_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
@@ -771,7 +773,7 @@ minicard_selection_change (EMinicardViewWidget *widget, EAddressbookView *view)
static void
minicard_button_press (GtkWidget *widget, GdkEventButton *event, EAddressbookView *view)
{
- g_print ("Button %d pressed with event type %d\n", event->button, event->type);
+ d(g_print ("Button %d pressed with event type %d\n", event->button, event->type));
}
static void
@@ -1019,23 +1021,23 @@ table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EA
GtkMenu *popup;
EPopupMenu menu[] = {
- { N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, NULL, 0 },
- { N_("Forward Contact"), NULL, GTK_SIGNAL_FUNC(send_as), NULL, NULL, 0 },
- { N_("Send Message to Contact"), NULL, GTK_SIGNAL_FUNC(send_to), NULL, NULL, 0 },
- { N_("Print"), NULL, GTK_SIGNAL_FUNC(print), NULL, NULL, 0 },
+ E_POPUP_ITEM (N_("Save as VCard"), GTK_SIGNAL_FUNC(save_as), 0),
+ E_POPUP_ITEM (N_("Forward Contact"), GTK_SIGNAL_FUNC(send_as), 0),
+ E_POPUP_ITEM (N_("Send Message to Contact"), GTK_SIGNAL_FUNC(send_to), 0),
+ E_POPUP_ITEM (N_("Print"), GTK_SIGNAL_FUNC(print), 0),
#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- { N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, NULL, 0 },
+ E_POPUP_ITEM (N_("Print Envelope"), GTK_SIGNAL_FUNC(print_envelope), 0),
#endif
E_POPUP_SEPARATOR,
- { N_("Copy to folder..."), NULL, GTK_SIGNAL_FUNC(copy_to_folder), NULL, NULL, 0 },
- { N_("Move to folder..."), NULL, GTK_SIGNAL_FUNC(move_to_folder), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("Copy to folder..."), GTK_SIGNAL_FUNC(copy_to_folder), 0),
+ E_POPUP_ITEM (N_("Move to folder..."), GTK_SIGNAL_FUNC(move_to_folder), POPUP_READONLY_MASK),
E_POPUP_SEPARATOR,
- { N_("Cut"), NULL, GTK_SIGNAL_FUNC (cut), NULL, NULL, POPUP_READONLY_MASK },
- { N_("Copy"), NULL, GTK_SIGNAL_FUNC (copy), NULL, NULL, 0 },
- { N_("Paste"), NULL, GTK_SIGNAL_FUNC (paste), NULL, NULL, POPUP_READONLY_MASK },
- { N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("Cut"), GTK_SIGNAL_FUNC (cut), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("Copy"), GTK_SIGNAL_FUNC (copy), 0),
+ E_POPUP_ITEM (N_("Paste"), GTK_SIGNAL_FUNC (paste), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("Delete"), GTK_SIGNAL_FUNC(delete), POPUP_READONLY_MASK),
E_POPUP_TERMINATOR
};
@@ -1085,10 +1087,10 @@ table_white_space_event(ETableScrolled *table, GdkEvent *event, EAddressbookView
GtkMenu *popup;
EPopupMenu menu[] = {
- { N_("New Contact..."), NULL, GTK_SIGNAL_FUNC(new_card), NULL, NULL, POPUP_READONLY_MASK },
- { N_("New Contact List..."), NULL, GTK_SIGNAL_FUNC(new_list), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("New Contact..."), GTK_SIGNAL_FUNC(new_card), POPUP_READONLY_MASK),
+ E_POPUP_ITEM (N_("New Contact List..."), GTK_SIGNAL_FUNC(new_list), POPUP_READONLY_MASK),
E_POPUP_SEPARATOR,
- { N_("Paste"), NULL, GTK_SIGNAL_FUNC (paste), NULL, NULL, POPUP_READONLY_MASK },
+ E_POPUP_ITEM (N_("Paste"), GTK_SIGNAL_FUNC (paste), POPUP_READONLY_MASK),
E_POPUP_TERMINATOR
};