If you can't get a pixbuf icon for the folder's type, do not crash.

* evolution-folder-selector-button.c (set_folder): If you can't
get a pixbuf icon for the folder's type, do not crash.  [#39599]

* e-shell.c (impl_Shell__get_displayName): Removed.  [#38974]
(e_shell_class_init): Do not install anymore.

* Evolution-Shell.idl: Remove displayName attribute.

svn path=/trunk/; revision=20359
This commit is contained in:
Ettore Perazzoli
2003-03-19 18:32:52 +00:00
parent 28a37c0885
commit ec3cf6dfcd
4 changed files with 27 additions and 27 deletions

View File

@ -1,3 +1,26 @@
2003-03-19 Ettore Perazzoli <ettore@ximian.com>
* evolution-folder-selector-button.c (set_folder): If you can't
get a pixbuf icon for the folder's type, do not crash. [#39599]
* e-shell.c (impl_Shell__get_displayName): Removed. [#38974]
(e_shell_class_init): Do not install anymore.
* Evolution-Shell.idl: Remove displayName attribute.
2003-03-18 Ettore Perazzoli <ettore@ximian.com>
* importer/evolution-importer.c
(impl_GNOME_Evolution_Importer_loadFile): Get a physical_uri arg
instead of a folderpath arg.
* importer/evolution-importer-client.c
(evolution_importer_client_load_file): Get a physical_uri arg.
* e-shell-importer.c (start_import): Get a physical_uri arg
instead of a folderpath.
(folder_selected): Updated accordingly.
2003-03-14 Dan Winship <danw@ximian.com>
* e-storage.c (e_storage_get_has_subfolders): Add

View File

@ -26,9 +26,6 @@ module Evolution {
typedef sequence<string> FolderTypeNameList;
/* The X display name. */
readonly attribute string displayName;
/**
* getComponentByType:
* @type: name of a valid folder type

View File

@ -327,26 +327,6 @@ raise_exception_if_not_ready (PortableServer_Servant servant,
return FALSE;
}
static CORBA_char *
impl_Shell__get_displayName (PortableServer_Servant servant,
CORBA_Environment *ev)
{
char *display_string;
CORBA_char *retval;
if (raise_exception_if_not_ready (servant, ev))
return NULL;
display_string = DisplayString (gdk_display);
if (display_string == NULL)
return CORBA_string_dup ("");
retval = CORBA_string_dup (display_string);
XFree (display_string);
return retval;
}
static GNOME_Evolution_ShellComponent
impl_Shell_getComponentByType (PortableServer_Servant servant,
const CORBA_char *type,
@ -1208,7 +1188,6 @@ e_shell_class_init (EShellClass *klass)
G_TYPE_POINTER);
epv = & klass->epv;
epv->_get_displayName = impl_Shell__get_displayName;
epv->getComponentByType = impl_Shell_getComponentByType;
epv->getIconByType = impl_Shell_getIconByType;
epv->createNewView = impl_Shell_createNewView;

View File

@ -95,7 +95,6 @@ set_folder (EvolutionFolderSelectorButton *folder_selector_button,
priv->selected_folder = folder;
if (!folder) {
/* FIXME: Will this work? */
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), NULL);
gtk_label_set_text (GTK_LABEL (priv->label),
_("<click here to select a folder>"));
@ -103,8 +102,10 @@ set_folder (EvolutionFolderSelectorButton *folder_selector_button,
}
pixbuf = evolution_shell_client_get_pixbuf_for_type (priv->shell_client, folder->type, TRUE);
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), pixbuf);
g_object_unref (pixbuf);
if (pixbuf != NULL) {
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), pixbuf);
g_object_unref (pixbuf);
}
storage_lname = NULL;
p = strchr (folder->evolutionUri, '/');