balsa r7965 - in trunk: . libbalsa/imap src
- From: pawels svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7965 - in trunk: . libbalsa/imap src
- Date: Sat, 6 Sep 2008 05:52:57 +0000 (UTC)
Author: pawels
Date: Sat Sep 6 05:52:57 2008
New Revision: 7965
URL: http://svn.gnome.org/viewvc/balsa?rev=7965&view=rev
Log:
* src/balsa-bonobo.c: raise main window after receiving Bonobo cmds.
* src/balsa-app.c: add some HIG padding in the password dialog.
* src/balsa-message.c: specify parent for the MDN dialog.
* balsa.spec.in: merge minor fixes from Fedora's spec.
* libbalsa/imap/imap-handle.c: process HUPs on idle IMAP connections.
Modified:
trunk/ChangeLog
trunk/balsa.spec.in
trunk/libbalsa/imap/imap-handle.c
trunk/src/balsa-app.c
trunk/src/balsa-bonobo.c
trunk/src/balsa-message.c
Modified: trunk/balsa.spec.in
==============================================================================
--- trunk/balsa.spec.in (original)
+++ trunk/balsa.spec.in Sat Sep 6 05:52:57 2008
@@ -15,7 +15,7 @@
Summary: Mail Client
Group: Applications/Internet
-License: GPL
+License: GPLv2+
URL: http://balsa.gnome.org/
Source0: http://balsa.gnome.org/%{name}-%{version}.tar.bz2
%if ! %fedora
@@ -70,7 +70,7 @@
%prep
%if %fedora
-%setup -q -D
+%setup -q
%else
%setup -q -D -a 1
%endif
@@ -129,10 +129,10 @@
%{_libdir}/bonobo/servers/GNOME_Balsa.server
%{_datadir}/applications/*.desktop
%{_datadir}/balsa
+%{_datadir}/gnome/help/balsa/
/usr/share/icons/hicolor/*
-%{_datadir}/gnome/help/balsa/*
%{_datadir}/idl/Balsa.idl
-%{_datadir}/omf/balsa/*
+%{_datadir}/omf/balsa/
%{_datadir}/pixmaps/gnome-balsa2.png
%{_datadir}/sounds/balsa/*
%{_mandir}/man1/balsa.1*
Modified: trunk/libbalsa/imap/imap-handle.c
==============================================================================
--- trunk/libbalsa/imap/imap-handle.c (original)
+++ trunk/libbalsa/imap/imap-handle.c Sat Sep 6 05:52:57 2008
@@ -355,6 +355,13 @@
if(ASYNC_DEBUG) printf("async_process() on disconnected\n");
return FALSE;
}
+ if( (condition & G_IO_HUP) == G_IO_HUP) {
+ imap_handle_disconnect(h);
+ g_source_remove(h->async_watch_id);
+ h->async_watch_id = 0;
+ return FALSE;
+ }
+
async_cmd = cmdi_get_pending(h->cmd_info);
if(ASYNC_DEBUG) printf("async_process() enter loop\n");
while( (retval = sio_poll(h->sio, TRUE, FALSE, TRUE)) != -1 &&
@@ -418,7 +425,8 @@
h->iochannel = g_io_channel_unix_new(h->sd);
g_io_channel_set_encoding(h->iochannel, NULL, NULL);
}
- h->async_watch_id = g_io_add_watch(h->iochannel, G_IO_IN, async_process, h);
+ h->async_watch_id = g_io_add_watch(h->iochannel, G_IO_IN|G_IO_HUP,
+ async_process, h);
h->idle_enable_id = 0;
h->idle_issued = 1;
return FALSE;
@@ -496,6 +504,10 @@
if(h->iochannel) {
g_io_channel_unref(h->iochannel); h->iochannel = NULL;
}
+ if(h->async_watch_id) {
+ g_source_remove(h->async_watch_id);
+ h->async_watch_id = 0;
+ }
close(h->sd);
h->state = IMHS_DISCONNECTED;
}
Modified: trunk/src/balsa-app.c
==============================================================================
--- trunk/src/balsa-app.c (original)
+++ trunk/src/balsa-app.c Sat Sep 6 05:52:57 2008
@@ -57,6 +57,8 @@
};
#endif /* HAVE_GTKSPELL */
+#define HIG_PADDING 12
+
/* ask_password:
asks the user for the password to the mailbox on given remote server.
*/
@@ -83,6 +85,7 @@
GTK_STOCK_OK, GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
+ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), HIG_PADDING);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),
gtk_label_new_with_mnemonic(prompt));
g_free(prompt);
Modified: trunk/src/balsa-bonobo.c
==============================================================================
--- trunk/src/balsa-bonobo.c (original)
+++ trunk/src/balsa-bonobo.c Sat Sep 6 05:52:57 2008
@@ -229,19 +229,21 @@
CORBA_Environment * ev) {
gchar **urls = g_strsplit(name, ";", 20);
g_idle_add((GSourceFunc) open_mailboxes_idle_cb, urls);
-
+ gtk_window_present(GTK_WINDOW(balsa_app.main_window));
}
static void
impl_balsa_application_openUnread (PortableServer_Servant _servant,
CORBA_Environment * ev) {
g_idle_add((GSourceFunc) initial_open_unread_mailboxes, NULL);
+ gtk_window_present(GTK_WINDOW(balsa_app.main_window));
}
static void
impl_balsa_application_openInbox (PortableServer_Servant _servant,
CORBA_Environment * ev) {
initial_open_inbox();
+ gtk_window_present(GTK_WINDOW(balsa_app.main_window));
}
static void
Modified: trunk/src/balsa-message.c
==============================================================================
--- trunk/src/balsa-message.c (original)
+++ trunk/src/balsa-message.c Sat Sep 6 05:52:57 2008
@@ -147,10 +147,11 @@
static GtkNotebookClass *parent_class = NULL;
/* stuff needed for sending Message Disposition Notifications */
-static void handle_mdn_request(LibBalsaMessage *message);
+static void handle_mdn_request(GtkWindow *parent, LibBalsaMessage *message);
static LibBalsaMessage *create_mdn_reply (LibBalsaMessage *for_msg,
gboolean manual);
-static GtkWidget* create_mdn_dialog (gchar *sender, gchar *mdn_to_address,
+static GtkWidget* create_mdn_dialog (GtkWindow *parent, gchar *sender,
+ gchar *mdn_to_address,
LibBalsaMessage *send_msg);
static void mdn_dialog_response(GtkWidget * dialog, gint response,
gpointer user_data);
@@ -1127,7 +1128,7 @@
*
*/
if (is_new && message->headers->dispnotify_to)
- handle_mdn_request (message);
+ handle_mdn_request (balsa_get_parent_window(GTK_WIDGET(bm)), message);
if (!gtk_tree_model_get_iter_first (gtk_tree_view_get_model(GTK_TREE_VIEW(bm->treeview)),
&iter))
@@ -2287,7 +2288,7 @@
}
static void
-handle_mdn_request(LibBalsaMessage *message)
+handle_mdn_request(GtkWindow *parent, LibBalsaMessage *message)
{
gboolean suspicious, found;
const InternetAddressList *use_from;
@@ -2348,12 +2349,11 @@
if (action == BALSA_MDN_REPLY_ASKME) {
gchar *sender;
gchar *reply_to;
-
sender = internet_address_to_string (use_from->address, FALSE);
reply_to =
internet_address_list_to_string (message->headers->dispnotify_to,
FALSE);
- gtk_widget_show_all (create_mdn_dialog (sender, reply_to, mdn));
+ gtk_widget_show_all (create_mdn_dialog (parent, sender, reply_to, mdn));
g_free (reply_to);
g_free (sender);
} else {
@@ -2456,13 +2456,13 @@
}
static GtkWidget *
-create_mdn_dialog(gchar * sender, gchar * mdn_to_address,
+create_mdn_dialog(GtkWindow *parent, gchar * sender, gchar * mdn_to_address,
LibBalsaMessage * send_msg)
{
GtkWidget *mdn_dialog;
mdn_dialog =
- gtk_message_dialog_new(GTK_WINDOW(balsa_app.main_window),
+ gtk_message_dialog_new(parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]