aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog14
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c14
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.h5
3 files changed, 28 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 6a49145d83..893ae88b9d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,17 @@
+2001-05-15 Chris Toshok <toshok@ximian.com>
+
+ * gui/search/e-addressbook-search-dialog.c
+ (e_addressbook_search_dialog_init): initialize the model and
+ adapter.
+ (button_press): set on the model.
+ (e_addressbook_search_dialog_new): same.
+ (e_addressbook_search_dialog_set_arg): same.
+ (e_addressbook_search_dialog_destroy): unref the model and
+ adapter.
+
+ * gui/search/e-addressbook-search-dialog.h (struct
+ _EAddressbookSearchDialog): add our model and reflow adapter.
+
2001-05-16 Christopher James Lahey <clahey@ximian.com>
* gui/widgets/e-minicard-view.c: (e_minicard_view_destroy): Fixed
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.c b/addressbook/gui/search/e-addressbook-search-dialog.c
index 0e760e7b47..3457d349ed 100644
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ b/addressbook/gui/search/e-addressbook-search-dialog.c
@@ -134,7 +134,7 @@ button_press (GtkWidget *widget, int button, EAddressbookSearchDialog *dialog)
if (button == 0) {
query = get_query(dialog);
- gtk_object_set(GTK_OBJECT(dialog->view),
+ gtk_object_set(GTK_OBJECT(dialog->model),
"query", query,
NULL);
g_free(query);
@@ -163,7 +163,9 @@ e_addressbook_search_dialog_init (EAddressbookSearchDialog *view)
gtk_signal_connect(GTK_OBJECT(dialog), "clicked",
GTK_SIGNAL_FUNC(button_press), view);
- view->view = e_minicard_view_widget_new();
+ view->model = e_addressbook_model_new ();
+ view->adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(e_addressbook_reflow_adapter_new (view->model));
+ view->view = e_minicard_view_widget_new(view->adapter);
gtk_widget_show(view->view);
view->scrolled_window = e_scroll_frame_new(NULL, NULL);
@@ -180,7 +182,7 @@ GtkWidget *
e_addressbook_search_dialog_new (EBook *book)
{
EAddressbookSearchDialog *view = gtk_type_new (e_addressbook_search_dialog_get_type ());
- gtk_object_set(GTK_OBJECT(view->view),
+ gtk_object_set(GTK_OBJECT(view->model),
"book", book,
NULL);
return GTK_WIDGET(view);
@@ -195,7 +197,7 @@ e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
switch (arg_id){
case ARG_BOOK:
- gtk_object_set(GTK_OBJECT(emvw->view),
+ gtk_object_set(GTK_OBJECT(emvw->model),
"book", GTK_VALUE_OBJECT (*arg),
NULL);
break;
@@ -211,7 +213,7 @@ e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_i
switch (arg_id) {
case ARG_BOOK:
- gtk_object_get(GTK_OBJECT(emvw->view),
+ gtk_object_get(GTK_OBJECT(emvw->model),
"book", &(GTK_VALUE_OBJECT (*arg)),
NULL);
break;
@@ -228,6 +230,8 @@ e_addressbook_search_dialog_destroy (GtkObject *object)
view = E_ADDRESSBOOK_SEARCH_DIALOG (object);
+ gtk_object_unref((GtkObject *)view->model);
+ gtk_object_unref((GtkObject *)view->adapter);
gtk_object_unref((GtkObject *)view->context);
gtk_object_unref((GtkObject *)view->rule);
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.h b/addressbook/gui/search/e-addressbook-search-dialog.h
index 8fcd23492d..efc928e046 100644
--- a/addressbook/gui/search/e-addressbook-search-dialog.h
+++ b/addressbook/gui/search/e-addressbook-search-dialog.h
@@ -23,6 +23,8 @@
#include <ebook/e-book.h>
+#include "addressbook/gui/widgets/e-addressbook-model.h"
+#include "addressbook/gui/widgets/e-addressbook-reflow-adapter.h"
#include "filter/rule-context.h"
#include "filter/filter-rule.h"
@@ -50,6 +52,9 @@ struct _EAddressbookSearchDialog
GtkWidget *search;
GtkWidget *view;
+ EAddressbookModel *model;
+ EAddressbookReflowAdapter *adapter;
+
RuleContext *context;
FilterRule *rule;
GtkWidget *scrolled_window;