Added glade files.
2000-06-11 Christopher James Lahey <clahey@helixcode.com> * gui/component/Makefile.am: Added glade files. * gui/component/addressbook.c: Added a test of the Select Names functionality. * gui/component/e-addressbook-model.c: Made this class_init function a bit cleaner. * gui/component/e-select-names.c: Tested this and fixed some obvious errors. * gui/component/select-names.glade: The main window shouldn't be visible by default. svn path=/trunk/; revision=3518
This commit is contained in:
committed by
Chris Lahey
parent
86e45230bd
commit
835ec00d01
@ -1,3 +1,19 @@
|
||||
2000-06-11 Christopher James Lahey <clahey@helixcode.com>
|
||||
|
||||
* gui/component/Makefile.am: Added glade files.
|
||||
|
||||
* gui/component/addressbook.c: Added a test of the Select Names
|
||||
functionality.
|
||||
|
||||
* gui/component/e-addressbook-model.c: Made this class_init
|
||||
function a bit cleaner.
|
||||
|
||||
* gui/component/e-select-names.c: Tested this and fixed some
|
||||
obvious errors.
|
||||
|
||||
* gui/component/select-names.glade: The main window shouldn't be
|
||||
visible by default.
|
||||
|
||||
2000-06-11 Ettore Perazzoli <ettore@helixcode.com>
|
||||
|
||||
* contact-editor/Makefile.am (contact_editor_test_LDADD): Link
|
||||
|
||||
@ -74,13 +74,14 @@ gnorba_DATA = addressbook.gnorba
|
||||
endif
|
||||
|
||||
gladedir = $(datadir)/evolution/glade
|
||||
glade_DATA = ldap-server-dialog.glade ldap-server-dialog.glade.h alphabet.glade
|
||||
glade_DATA = ldap-server-dialog.glade ldap-server-dialog.glade.h alphabet.glade select-names.glade
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(glade_DATA) \
|
||||
addressbook.gnorba \
|
||||
addressbook.oafinfo \
|
||||
alphabet.glade.h
|
||||
alphabet.glade.h \
|
||||
select-names.glade.h
|
||||
|
||||
if ENABLE_PURIFY
|
||||
PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include <e-cell-text.h>
|
||||
|
||||
#include <e-addressbook-model.h>
|
||||
#include <e-select-names.h>
|
||||
#include "e-contact-editor.h"
|
||||
#include "e-contact-save-as.h"
|
||||
#include "e-ldap-server-dialog.h"
|
||||
@ -76,6 +77,7 @@ control_deactivate (BonoboControl *control, BonoboUIHandler *uih)
|
||||
{
|
||||
/* how to remove a menu item */
|
||||
bonobo_ui_handler_menu_remove (uih, "/File/Print");
|
||||
bonobo_ui_handler_menu_remove (uih, "/File/TestSelectNames");
|
||||
bonobo_ui_handler_menu_remove (uih, "/View/<sep>");
|
||||
bonobo_ui_handler_menu_remove (uih, "/View/Toggle View");
|
||||
bonobo_ui_handler_menu_remove (uih, "/Actions/New Contact");
|
||||
@ -407,6 +409,17 @@ print_cb (BonoboUIHandler *uih, void *user_data, const char *path)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_select_names_cb (BonoboUIHandler *uih, void *user_data, const char *path)
|
||||
{
|
||||
ESelectNames *names = E_SELECT_NAMES(e_select_names_new());
|
||||
|
||||
e_select_names_add_section(names, _("To"), "to");
|
||||
e_select_names_add_section(names, _("From"), "from");
|
||||
e_select_names_add_section(names, _("Cc"), "cc");
|
||||
gtk_widget_show(GTK_WIDGET(names));
|
||||
}
|
||||
|
||||
static GnomeUIInfo gnome_toolbar [] = {
|
||||
GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new contact"), new_contact_cb, GNOME_STOCK_PIXMAP_NEW),
|
||||
|
||||
@ -486,6 +499,13 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
|
||||
0, 0, print_cb,
|
||||
(gpointer) view);
|
||||
|
||||
bonobo_ui_handler_menu_new_item (uih, "/File/TestSelectNames",
|
||||
N_("Test Select Names"),
|
||||
NULL, -1,
|
||||
BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
|
||||
0, 0, test_select_names_cb,
|
||||
(gpointer) view);
|
||||
|
||||
bonobo_ui_handler_menu_new_item (uih, "/View/Toggle View",
|
||||
N_("As _Table"),
|
||||
NULL, -1,
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
#include <gnome.h>
|
||||
|
||||
#define PARENT_TYPE e_table_model_get_type()
|
||||
ETableModelClass *parent_class;
|
||||
|
||||
/*
|
||||
* EAddressbookModel callbacks
|
||||
* These are the callbacks that define the behavior of our custom model.
|
||||
@ -197,15 +199,17 @@ e_addressbook_model_class_init (GtkObjectClass *object_class)
|
||||
{
|
||||
ETableModelClass *model_class = (ETableModelClass *) object_class;
|
||||
|
||||
parent_class = gtk_type_class (PARENT_TYPE);
|
||||
|
||||
object_class->destroy = addressbook_destroy;
|
||||
object_class->set_arg = e_addressbook_model_set_arg;
|
||||
object_class->get_arg = e_addressbook_model_get_arg;
|
||||
|
||||
gtk_object_add_arg_type ("EAddressbookModel::book", GTK_TYPE_OBJECT,
|
||||
GTK_ARG_READWRITE, ARG_BOOK);
|
||||
gtk_object_add_arg_type ("EAddressbookModel::query", GTK_TYPE_STRING,
|
||||
GTK_ARG_READWRITE, ARG_QUERY);
|
||||
|
||||
object_class->destroy = addressbook_destroy;
|
||||
object_class->set_arg = e_addressbook_model_set_arg;
|
||||
object_class->get_arg = e_addressbook_model_get_arg;
|
||||
|
||||
model_class->column_count = addressbook_col_count;
|
||||
model_class->row_count = addressbook_row_count;
|
||||
model_class->value_at = addressbook_value_at;
|
||||
|
||||
@ -36,6 +36,7 @@ static void e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id
|
||||
static void e_select_names_destroy (GtkObject *object);
|
||||
|
||||
static GnomeDialogClass *parent_class = NULL;
|
||||
#define PARENT_TYPE gnome_dialog_get_type()
|
||||
|
||||
/* The arguments we take */
|
||||
enum {
|
||||
@ -68,7 +69,7 @@ e_select_names_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
type = gtk_type_unique (gtk_vbox_get_type (), &info);
|
||||
type = gtk_type_unique (PARENT_TYPE, &info);
|
||||
}
|
||||
|
||||
return type;
|
||||
@ -81,11 +82,11 @@ e_select_names_class_init (ESelectNamesClass *klass)
|
||||
|
||||
object_class = (GtkObjectClass*) klass;
|
||||
|
||||
parent_class = gtk_type_class (gnome_dialog_get_type ());
|
||||
parent_class = gtk_type_class (PARENT_TYPE);
|
||||
|
||||
gtk_object_add_arg_type ("EAddressbookModel::book", GTK_TYPE_OBJECT,
|
||||
gtk_object_add_arg_type ("ESelectNames::book", GTK_TYPE_OBJECT,
|
||||
GTK_ARG_READWRITE, ARG_BOOK);
|
||||
gtk_object_add_arg_type ("EAddressbookModel::query", GTK_TYPE_STRING,
|
||||
gtk_object_add_arg_type ("ESelectNames::query", GTK_TYPE_STRING,
|
||||
GTK_ARG_READWRITE, ARG_QUERY);
|
||||
|
||||
object_class->set_arg = e_select_names_set_arg;
|
||||
@ -261,7 +262,7 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id)
|
||||
return;
|
||||
}
|
||||
|
||||
table = GTK_TABLE(glade_xml_get_widget (e_select_names->gui, "recipient-table"));
|
||||
table = GTK_TABLE(glade_xml_get_widget (e_select_names->gui, "table-recipients"));
|
||||
|
||||
child = g_new(ESelectNamesChild, 1);
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>dialog-top</name>
|
||||
<visible>False</visible>
|
||||
<title>Select Names</title>
|
||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
#include <gnome.h>
|
||||
|
||||
#define PARENT_TYPE e_table_model_get_type()
|
||||
ETableModelClass *parent_class;
|
||||
|
||||
/*
|
||||
* EAddressbookModel callbacks
|
||||
* These are the callbacks that define the behavior of our custom model.
|
||||
@ -197,15 +199,17 @@ e_addressbook_model_class_init (GtkObjectClass *object_class)
|
||||
{
|
||||
ETableModelClass *model_class = (ETableModelClass *) object_class;
|
||||
|
||||
parent_class = gtk_type_class (PARENT_TYPE);
|
||||
|
||||
object_class->destroy = addressbook_destroy;
|
||||
object_class->set_arg = e_addressbook_model_set_arg;
|
||||
object_class->get_arg = e_addressbook_model_get_arg;
|
||||
|
||||
gtk_object_add_arg_type ("EAddressbookModel::book", GTK_TYPE_OBJECT,
|
||||
GTK_ARG_READWRITE, ARG_BOOK);
|
||||
gtk_object_add_arg_type ("EAddressbookModel::query", GTK_TYPE_STRING,
|
||||
GTK_ARG_READWRITE, ARG_QUERY);
|
||||
|
||||
object_class->destroy = addressbook_destroy;
|
||||
object_class->set_arg = e_addressbook_model_set_arg;
|
||||
object_class->get_arg = e_addressbook_model_get_arg;
|
||||
|
||||
model_class->column_count = addressbook_col_count;
|
||||
model_class->row_count = addressbook_row_count;
|
||||
model_class->value_at = addressbook_value_at;
|
||||
|
||||
Reference in New Issue
Block a user