aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-11-17 13:45:05 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-11-17 13:45:05 +0800
commit5db8b60d2c9900fa417822e881be8c7abaccb289 (patch)
tree3fc3e4761fe3845181cdde9c7febaf12135880c7 /mail
parent41348bb945c237f324ffebb0d05f5f468f3d5682 (diff)
downloadgsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar.gz
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar.bz2
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar.lz
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar.xz
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.tar.zst
gsoc2013-evolution-5db8b60d2c9900fa417822e881be8c7abaccb289.zip
handle an unparsable url without crashing.
2003-11-17 Not Zed <NotZed@Ximian.com> * em-folder-selection-button.c (set_contents): handle an unparsable url without crashing. svn path=/trunk/; revision=23381
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/em-folder-selection-button.c11
2 files changed, 5 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 119b4f015a..89203af080 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2003-11-17 Not Zed <NotZed@Ximian.com>
+ * em-folder-selection-button.c (set_contents): handle an
+ unparsable url without crashing.
+
* mail-tools.c (mail_tool_get_local_inbox): thin wrapper on
mail_component_get_local_inbox.
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index a903514452..a31569fd33 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -20,7 +20,6 @@
*
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -39,7 +38,6 @@
#include "em-folder-selection-button.h"
-
static void em_folder_selection_button_class_init (EMFolderSelectionButtonClass *klass);
static void em_folder_selection_button_init (EMFolderSelectionButton *emfsb);
static void em_folder_selection_button_destroy (GtkObject *obj);
@@ -48,7 +46,6 @@ static void em_folder_selection_button_clicked (GtkButton *button);
static GtkButtonClass *parent_class = NULL;
-
struct _EMFolderSelectionButtonPrivate {
GtkWidget *icon;
GtkWidget *label;
@@ -66,7 +63,6 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-
GType
em_folder_selection_button_get_type (void)
{
@@ -127,12 +123,12 @@ set_contents (EMFolderSelectionButton *button)
const char *path;
CamelURL *url;
- if (priv->uri == NULL) {
+ if (priv->uri == NULL
+ || (url = camel_url_new (priv->uri, NULL)) == NULL) {
set_contents_unselected (button);
return;
}
- url = camel_url_new (priv->uri, NULL);
path = url->fragment ? url->fragment : url->path;
if (path == NULL) {
@@ -224,7 +220,6 @@ em_folder_selection_button_clicked (GtkButton *button)
gtk_widget_show (dialog);
}
-
GtkWidget *
em_folder_selection_button_new (const char *title, const char *caption)
{
@@ -236,7 +231,6 @@ em_folder_selection_button_new (const char *title, const char *caption)
return GTK_WIDGET (button);
}
-
void
em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri)
{
@@ -252,7 +246,6 @@ em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const
set_contents (button);
}
-
const char *
em_folder_selection_button_get_selection (EMFolderSelectionButton *button)
{