aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/Makefile.am4
-rw-r--r--mail/mail-callbacks.c4
-rw-r--r--mail/mail-types.h2
-rw-r--r--mail/subscribe-control.h45
-rw-r--r--mail/subscribe-dialog.c (renamed from mail/subscribe-control.c)56
-rw-r--r--mail/subscribe-dialog.h47
7 files changed, 95 insertions, 78 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e93799d43e..90b3b125ea 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,20 @@
2000-10-02 Chris Toshok <toshok@helixcode.com>
+ * Makefile.am (evolution_mail_SOURCES): subscribe-control.[ch] -> subscribe_dialog.[ch]
+
+ * mail-callbacks.c (manage_subscriptions): subscribe_control ->
+ subscribe_dialog. Also, pass the shell to subscribe_dialog_new.
+
+ * mail-types.h: SubscribeControl -> SubscribeDialog.
+
+ * subscribe-dialog.c, subscribe-dialog.h: rename from subscribe-control.[ch].
+
+ * subscribe-dialog.c (subscribe_dialog_construct): pass
+ Evolution_Shell in.
+ (subscribe_dialog_new): takes Evolution_Shell argument now.
+
+2000-10-02 Chris Toshok <toshok@helixcode.com>
+
* message-list.c (message_list_init_renderers): remove the 2 tree
pixbufs, so adjust the offsets to the score pixbufs. also, pass
NULL for the open/closed pixbufs to the tree cell renderer.
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 33cb58cf21..c25ae80838 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -78,8 +78,8 @@ evolution_mail_SOURCES = \
message-thread.c \
message-thread.h \
session.c \
- subscribe-control.c \
- subscribe-control.h \
+ subscribe-dialog.c \
+ subscribe-dialog.h \
mail.h
evolution_mail_LDADD = \
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index f4f1ffcb20..6545db3b17 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -37,7 +37,7 @@
#include "mail-ops.h"
#include "mail-local.h"
#include "folder-browser.h"
-#include "subscribe-control.h"
+#include "subscribe-dialog.h"
#include "filter/filter-editor.h"
#include "filter/filter-driver.h"
#include <gal/e-table/e-table.h>
@@ -827,7 +827,7 @@ void
manage_subscriptions (BonoboUIHandler *uih, void *user_data, const char *path)
{
/* XXX pass in the selected storage */
- GtkWidget *subscribe = subscribe_control_new ();
+ GtkWidget *subscribe = subscribe_dialog_new ((FOLDER_BROWSER (user_data))->shell);
gtk_widget_show (subscribe);
}
diff --git a/mail/mail-types.h b/mail/mail-types.h
index 9f72b23800..74e650fd4f 100644
--- a/mail/mail-types.h
+++ b/mail/mail-types.h
@@ -29,7 +29,7 @@ extern "C" {
typedef struct _FolderBrowser FolderBrowser;
-typedef struct _SubscribeControl SubscribeControl;
+typedef struct _SubscribeDialog SubscribeDialog;
typedef struct _MessageList MessageList;
typedef struct _MailDisplay MailDisplay;
diff --git a/mail/subscribe-control.h b/mail/subscribe-control.h
deleted file mode 100644
index 18a47dd73e..0000000000
--- a/mail/subscribe-control.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-
-#ifndef _SUBSCRIBE_CONTROL_H_
-#define _SUBSCRIBE_CONTROL_H_
-
-#include "mail-types.h"
-#include <gtk/gtktable.h>
-#include <gal/e-table/e-tree-model.h>
-#include <bonobo/bonobo-ui-compat.h>
-#include <bonobo/bonobo-property-bag.h>
-#include "shell/Evolution.h"
-
-
-#define SUBSCRIBE_CONTROL_TYPE (subscribe_control_get_type ())
-#define SUBSCRIBE_CONTROL(o) (GTK_CHECK_CAST ((o), SUBSCRIBE_CONTROL_TYPE, SubscribeControl))
-#define SUBSCRIBE_CONTROL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SUBSCRIBE_CONTROL_TYPE, SubscribeControlClass))
-#define IS_SUBSCRIBE_CONTROL(o) (GTK_CHECK_TYPE ((o), SUBSCRIBE_CONTROL_TYPE))
-#define IS_SUBSCRIBE_CONTROL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_CONTROL_TYPE))
-
-struct _SubscribeControl {
- GtkObject parent;
-
- BonoboUIHandler *uih;
-
- GtkWidget *app;
-
- GtkWidget *storage_set_view;
- GtkWidget *hpaned;
- GtkWidget *table;
- GtkWidget *description;
- GtkWidget *etable;
- ETreeModel *model;
- ETreePath *root;
-};
-
-
-typedef struct {
- GtkObjectClass parent_class;
-} SubscribeControlClass;
-
-GtkType subscribe_control_get_type (void);
-GtkWidget *subscribe_control_new (void);
-
-#endif /* _SUBSCRIBE_CONTROL_H_ */
diff --git a/mail/subscribe-control.c b/mail/subscribe-dialog.c
index 5204c10d6b..c95866e110 100644
--- a/mail/subscribe-control.c
+++ b/mail/subscribe-dialog.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * subscribe-control.c: Subscribe control top level component
+ * subscribe-dialog.c: Subscribe dialog
*
* Author:
* Chris Toshok (toshok@helixcode.com)
@@ -9,7 +9,7 @@
*/
#include <config.h>
#include <gnome.h>
-#include "subscribe-control.h"
+#include "subscribe-dialog.h"
#include "e-util/e-html-utils.h"
#include <gtkhtml/gtkhtml.h>
#include <gal/util/e-util.h>
@@ -70,7 +70,7 @@ typedef struct {
} SubscribeData;
-static GtkObjectClass *subscribe_control_parent_class;
+static GtkObjectClass *subscribe_dialog_parent_class;
static void subscribe_close (BonoboUIHandler *uih, void *user_data, const char *path);
static void subscribe_select_all (BonoboUIHandler *uih, void *user_data, const char *path);
@@ -155,7 +155,7 @@ static void
subscribe_close (BonoboUIHandler *uih,
void *user_data, const char *path)
{
- SubscribeControl *sc = (SubscribeControl*)user_data;
+ SubscribeDialog *sc = (SubscribeDialog*)user_data;
gtk_widget_destroy (sc->app);
}
@@ -175,7 +175,7 @@ subscribe_unselect_all (BonoboUIHandler *uih,
static void
subscribe_folder_foreach (int model_row, gpointer closure)
{
- SubscribeControl *sc = SUBSCRIBE_CONTROL (closure);
+ SubscribeDialog *sc = SUBSCRIBE_DIALOG (closure);
ETreePath *node = e_tree_model_node_at_row (sc->model, model_row);
SubscribeData *data = e_tree_model_node_get_data (sc->model, node);
@@ -190,7 +190,7 @@ subscribe_folder_foreach (int model_row, gpointer closure)
static void
subscribe_folder (GtkWidget *widget, gpointer user_data)
{
- SubscribeControl *sc = SUBSCRIBE_CONTROL (user_data);
+ SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
e_table_selected_row_foreach (E_TABLE_SCROLLED(sc->etable)->table,
subscribe_folder_foreach, sc);
@@ -199,7 +199,7 @@ subscribe_folder (GtkWidget *widget, gpointer user_data)
static void
unsubscribe_folder_foreach (int model_row, gpointer closure)
{
- SubscribeControl *sc = SUBSCRIBE_CONTROL (closure);
+ SubscribeDialog *sc = SUBSCRIBE_DIALOG (closure);
ETreePath *node = e_tree_model_node_at_row (sc->model, model_row);
SubscribeData *data = e_tree_model_node_get_data (sc->model, node);
@@ -215,7 +215,7 @@ unsubscribe_folder_foreach (int model_row, gpointer closure)
static void
unsubscribe_folder (GtkWidget *widget, gpointer user_data)
{
- SubscribeControl *sc = SUBSCRIBE_CONTROL (user_data);
+ SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
e_table_selected_row_foreach (E_TABLE_SCROLLED(sc->etable)->table,
unsubscribe_folder_foreach, sc);
@@ -381,7 +381,7 @@ etree_is_editable (ETreeModel *etree, ETreePath *path, int col, void *model_data
" from The Book of Mozilla, 12:10"
static void
-subscribe_control_gui_init (SubscribeControl *sc)
+subscribe_dialog_gui_init (SubscribeDialog *sc)
{
int i;
ECell *cells[3];
@@ -411,7 +411,7 @@ subscribe_control_gui_init (SubscribeControl *sc)
/* Build the menu and toolbar */
sc->uih = bonobo_ui_handler_new ();
if (!sc->uih) {
- g_message ("subscribe_control_gui_init(): eeeeek, could not create the UI handler!");
+ g_message ("subscribe_dialog_gui_init(): eeeeek, could not create the UI handler!");
return;
}
@@ -490,7 +490,6 @@ subscribe_control_gui_init (SubscribeControl *sc)
cells[1] = e_cell_toggle_new (0, 2, toggles);
cells[0] = e_cell_tree_new (E_TABLE_MODEL(sc->model),
NULL, NULL,
- /*tree_expanded_pixbuf, tree_unexpanded_pixbuf,*/
TRUE, cells[2]);
for (i = 0; i < COL_LAST; i++) {
@@ -536,51 +535,52 @@ subscribe_control_gui_init (SubscribeControl *sc)
}
static void
-subscribe_control_destroy (GtkObject *object)
+subscribe_dialog_destroy (GtkObject *object)
{
- SubscribeControl *subscribe_control;
+ SubscribeDialog *subscribe_dialog;
- subscribe_control = SUBSCRIBE_CONTROL (object);
+ subscribe_dialog = SUBSCRIBE_DIALOG (object);
- subscribe_control_parent_class->destroy (object);
+ subscribe_dialog_parent_class->destroy (object);
}
static void
-subscribe_control_class_init (GtkObjectClass *object_class)
+subscribe_dialog_class_init (GtkObjectClass *object_class)
{
- object_class->destroy = subscribe_control_destroy;
+ object_class->destroy = subscribe_dialog_destroy;
- subscribe_control_parent_class = gtk_type_class (PARENT_TYPE);
+ subscribe_dialog_parent_class = gtk_type_class (PARENT_TYPE);
}
static void
-subscribe_control_init (GtkObject *object)
+subscribe_dialog_init (GtkObject *object)
{
}
static void
-subscribe_control_construct (GtkObject *object)
+subscribe_dialog_construct (GtkObject *object, Evolution_Shell shell)
{
- SubscribeControl *sc = SUBSCRIBE_CONTROL (object);
+ SubscribeDialog *sc = SUBSCRIBE_DIALOG (object);
/*
* Our instance data
*/
+ sc->shell = shell;
- subscribe_control_gui_init (sc);
+ subscribe_dialog_gui_init (sc);
}
GtkWidget *
-subscribe_control_new ()
+subscribe_dialog_new (Evolution_Shell shell)
{
- SubscribeControl *subscribe_control;
+ SubscribeDialog *subscribe_dialog;
- subscribe_control = gtk_type_new (subscribe_control_get_type ());
+ subscribe_dialog = gtk_type_new (subscribe_dialog_get_type ());
- subscribe_control_construct (GTK_OBJECT (subscribe_control));
+ subscribe_dialog_construct (GTK_OBJECT (subscribe_dialog), shell);
- return GTK_WIDGET (subscribe_control->app);
+ return GTK_WIDGET (subscribe_dialog->app);
}
-E_MAKE_TYPE (subscribe_control, "SubscribeControl", SubscribeControl, subscribe_control_class_init, subscribe_control_init, PARENT_TYPE);
+E_MAKE_TYPE (subscribe_dialog, "SubscribeDialog", SubscribeDialog, subscribe_dialog_class_init, subscribe_dialog_init, PARENT_TYPE);
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
new file mode 100644
index 0000000000..5805c50b5f
--- /dev/null
+++ b/mail/subscribe-dialog.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+
+#ifndef _SUBSCRIBE_DIALOG_H_
+#define _SUBSCRIBE_DIALOG_H_
+
+#include "mail-types.h"
+#include <gtk/gtktable.h>
+#include <gal/e-table/e-tree-model.h>
+#include <bonobo/bonobo-ui-compat.h>
+#include <bonobo/bonobo-property-bag.h>
+#include "shell/Evolution.h"
+
+
+#define SUBSCRIBE_DIALOG_TYPE (subscribe_dialog_get_type ())
+#define SUBSCRIBE_DIALOG(o) (GTK_CHECK_CAST ((o), SUBSCRIBE_DIALOG_TYPE, SubscribeDialog))
+#define SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SUBSCRIBE_DIALOG_TYPE, SubscribeDialogClass))
+#define IS_SUBSCRIBE_DIALOG(o) (GTK_CHECK_TYPE ((o), SUBSCRIBE_DIALOG_TYPE))
+#define IS_SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
+
+struct _SubscribeDialog {
+ GtkObject parent;
+
+ Evolution_Shell shell;
+
+ BonoboUIHandler *uih;
+
+ GtkWidget *app;
+
+ GtkWidget *storage_set_view;
+ GtkWidget *hpaned;
+ GtkWidget *table;
+ GtkWidget *description;
+ GtkWidget *etable;
+ ETreeModel *model;
+ ETreePath *root;
+};
+
+
+typedef struct {
+ GtkObjectClass parent_class;
+} SubscribeDialogClass;
+
+GtkType subscribe_dialog_get_type (void);
+GtkWidget *subscribe_dialog_new (Evolution_Shell shell);
+
+#endif /* _SUBSCRIBE_DIALOG_H_ */