aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-accounts.c6
-rw-r--r--mail/mail-callbacks.c10
-rw-r--r--mail/subscribe-dialog.c26
-rw-r--r--mail/subscribe-dialog.h11
5 files changed, 30 insertions, 30 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d4bfd1277a..1838a14774 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,10 +1,15 @@
2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
+ * subscribe-dialog.h (subscribe_dialog_show): Helper macro.
+
+ * subscribe-dialog.c (subscribe_dialog_run_and_close): Removed.
+
* mail-callbacks.c (check_send_configuration): Don't use
gnome_dialog_run_and_close() here, we can easily get away with
just using a gtk_widget_show().
(providers_config): Don't use a gnome_dialog_run_and_close() here
- either.
+ either. No longer need to use e_gnome_dialog utils.
+ (manage_subscriptions): Don't run_and_close().
2001-10-17 <NotZed@Ximian.com>
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index a650d53336..fa3c0a750b 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -345,18 +345,18 @@ mail_able (GtkButton *button, gpointer data)
if (dialog->accounts_row >= 0) {
int row;
-
+
row = dialog->accounts_row;
account = gtk_clist_get_row_data (dialog->mail_accounts, row);
account->source->enabled = !account->source->enabled;
-
+
if (account->source && account->source->url) {
if (account->source->enabled)
mail_load_storage_by_uri (dialog->shell, account->source->url, account->name);
else
mail_remove_storage_by_uri (account->source->url);
}
-
+
mail_autoreceive_setup ();
mail_config_write ();
load_accounts (dialog);
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index a24141adee..2a4c9d227c 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2128,7 +2128,7 @@ providers_config (BonoboUIComponent *uih, void *user_data, const char *path)
if (!accounts_dialog) {
accounts_dialog = mail_accounts_dialog_new (fb->shell);
- e_gnome_dialog_set_parent (GNOME_DIALOG (accounts_dialog), FB_WINDOW (fb));
+ gnome_dialog_set_parent (GNOME_DIALOG (accounts_dialog), FB_WINDOW (fb));
gtk_signal_connect (GTK_OBJECT (accounts_dialog), "destroy",
accounts_dialog_close, NULL);
gnome_dialog_set_close (GNOME_DIALOG (accounts_dialog), TRUE);
@@ -2229,6 +2229,7 @@ static GtkObject *subscribe_dialog = NULL;
static void
subscribe_dialog_destroy (GtkWidget *widget, gpointer user_data)
{
+ gtk_object_unref (subscribe_dialog);
subscribe_dialog = NULL;
}
@@ -2237,11 +2238,12 @@ manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path)
{
if (!subscribe_dialog) {
subscribe_dialog = subscribe_dialog_new ();
- gtk_signal_connect (GTK_OBJECT (subscribe_dialog), "destroy",
+ gtk_signal_connect (GTK_OBJECT (SUBSCRIBE_DIALOG (subscribe_dialog)->app), "destroy",
subscribe_dialog_destroy, NULL);
- subscribe_dialog_run_and_close (SUBSCRIBE_DIALOG (subscribe_dialog));
- gtk_object_unref (GTK_OBJECT (subscribe_dialog));
+ gnome_dialog_set_close (GNOME_DIALOG (SUBSCRIBE_DIALOG (subscribe_dialog)->app), TRUE);
+
+ subscribe_dialog_show (subscribe_dialog);
} else {
gdk_window_raise (SUBSCRIBE_DIALOG (subscribe_dialog)->app->window);
}
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index d007bfee50..ead4d0a209 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -1593,11 +1593,10 @@ static void
subscribe_dialog_construct (GtkObject *object)
{
SubscribeDialog *sc = SUBSCRIBE_DIALOG (object);
-
+
/* Load the XML */
-
sc->priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/subscribe-dialog.glade", NULL);
-
+
sc->app = glade_xml_get_widget (sc->priv->xml, "Manage Subscriptions");
sc->priv->hbox = glade_xml_get_widget (sc->priv->xml, "tree_box");
sc->priv->search_entry = glade_xml_get_widget (sc->priv->xml, "search_entry");
@@ -1606,32 +1605,29 @@ subscribe_dialog_construct (GtkObject *object)
sc->priv->sub_button = glade_xml_get_widget (sc->priv->xml, "subscribe_button");
sc->priv->unsub_button = glade_xml_get_widget (sc->priv->xml, "unsubscribe_button");
sc->priv->refresh_button = glade_xml_get_widget (sc->priv->xml, "refresh_button");
-
+
/* create default view */
-
sc->priv->default_widget = sc_create_default_widget();
sc->priv->current_widget = sc->priv->default_widget;
gtk_box_pack_start (GTK_BOX (sc->priv->hbox), sc->priv->default_widget, TRUE, TRUE, 0);
gtk_widget_show (sc->priv->default_widget);
-
+
gtk_widget_set_sensitive (sc->priv->all_radio, FALSE);
gtk_widget_set_sensitive (sc->priv->filter_radio, FALSE);
gtk_widget_set_sensitive (sc->priv->search_entry, FALSE);
gtk_widget_set_sensitive (sc->priv->sub_button, FALSE);
gtk_widget_set_sensitive (sc->priv->unsub_button, FALSE);
gtk_widget_set_sensitive (sc->priv->refresh_button, FALSE);
-
+
/* hook up some signals */
-
gtk_signal_connect (GTK_OBJECT (sc->priv->search_entry), "activate", sc_search_activated, sc);
gtk_signal_connect (GTK_OBJECT (sc->priv->sub_button), "clicked", sc_subscribe_pressed, sc);
gtk_signal_connect (GTK_OBJECT (sc->priv->unsub_button), "clicked", sc_unsubscribe_pressed, sc);
gtk_signal_connect (GTK_OBJECT (sc->priv->refresh_button), "clicked", sc_refresh_pressed, sc);
gtk_signal_connect (GTK_OBJECT (sc->priv->all_radio), "toggled", sc_all_toggled, sc);
gtk_signal_connect (GTK_OBJECT (sc->priv->filter_radio), "toggled", sc_filter_toggled, sc);
-
+
/* Get the list of stores */
-
populate_store_list (sc);
}
@@ -1639,17 +1635,11 @@ GtkObject *
subscribe_dialog_new (void)
{
SubscribeDialog *subscribe_dialog;
-
+
subscribe_dialog = gtk_type_new (SUBSCRIBE_DIALOG_TYPE);
subscribe_dialog_construct (GTK_OBJECT (subscribe_dialog));
-
+
return GTK_OBJECT (subscribe_dialog);
}
E_MAKE_TYPE (subscribe_dialog, "SubscribeDialog", SubscribeDialog, subscribe_dialog_class_init, subscribe_dialog_init, PARENT_TYPE);
-
-void
-subscribe_dialog_run_and_close (SubscribeDialog *dialog)
-{
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog->app));
-}
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
index 10fa5d9f44..e546ea8f83 100644
--- a/mail/subscribe-dialog.h
+++ b/mail/subscribe-dialog.h
@@ -41,10 +41,11 @@
#define IS_SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
typedef struct _SubscribeDialogPrivate SubscribeDialogPrivate;
-struct _SubscribeDialog {
- GtkObject parent;
- GtkWidget *app;
+struct _SubscribeDialog {
+ GtkObject parent;
+
+ GtkWidget *app;
SubscribeDialogPrivate *priv;
};
@@ -55,6 +56,8 @@ typedef struct {
GtkType subscribe_dialog_get_type (void);
GtkObject *subscribe_dialog_new (void);
-void subscribe_dialog_run_and_close (SubscribeDialog *dialog);
+
+/* helper macro */
+#define subscribe_dialog_show(dialog) gtk_widget_show (SUBSCRIBE_DIALOG (dialog)->app)
#endif /* _SUBSCRIBE_DIALOG_H_ */