aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-11 05:17:14 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-11 05:17:14 +0800
commit93248701c8dec093723f78b809a857b0a4183e5c (patch)
treed269a46fdbb85e9d08cdc697fe93bf6d86155035
parent96006806fbfcc6a32eaa2ce7301b239e0da6488b (diff)
downloadgsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar.gz
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar.bz2
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar.lz
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar.xz
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.tar.zst
gsoc2013-evolution-93248701c8dec093723f78b809a857b0a4183e5c.zip
(update_folder_title_bar): Get a @folder arg
instead of a @type arg. Use the custom icon if the folder has one. (update_for_current_uri): Updated accordingly. svn path=/trunk/; revision=17410
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-shell-view.c73
2 files changed, 47 insertions, 33 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 6f3800622a..92229d986f 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,12 @@
2002-07-10 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-view.c (update_folder_title_bar): Get a @folder arg
+ instead of a @type arg. Use the custom icon if the folder has
+ one.
+ (update_for_current_uri): Updated accordingly.
+
+2002-07-10 Ettore Perazzoli <ettore@ximian.com>
+
* evolution-test-component.c (setup_custom_storage): Pass
@sorting_priority to evolution_storage_new_folder() so we test it.
Also make /FirstFolder have an "inbox" custom icon.
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 3cd04a983e..be8a3ba77b 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -27,6 +27,27 @@
#include <config.h>
#endif
+#include "e-shell-view.h"
+
+#include "evolution-shell-view.h"
+
+#include "e-gray-bar.h"
+#include "e-history.h"
+#include "e-icon-factory.h"
+#include "e-shell-constants.h"
+#include "e-shell-folder-title-bar.h"
+#include "e-shell-utils.h"
+#include "e-shell-view-menu.h"
+#include "e-shell.h"
+#include "e-shortcuts-view.h"
+#include "e-storage-set-view.h"
+#include "e-title-bar.h"
+
+#include "e-util/e-gtk-utils.h"
+
+#include "widgets/misc/e-clipped-label.h"
+#include "widgets/misc/e-bonobo-widget.h"
+
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -48,26 +69,6 @@
#include <gal/widgets/e-unicode.h>
#include <gal/widgets/e-scroll-frame.h>
-#include "widgets/misc/e-clipped-label.h"
-#include "widgets/misc/e-bonobo-widget.h"
-
-#include "e-util/e-gtk-utils.h"
-
-#include "evolution-shell-view.h"
-
-#include "e-gray-bar.h"
-#include "e-history.h"
-#include "e-shell-constants.h"
-#include "e-shell-folder-title-bar.h"
-#include "e-shell-utils.h"
-#include "e-shell.h"
-#include "e-shortcuts-view.h"
-#include "e-storage-set-view.h"
-#include "e-title-bar.h"
-
-#include "e-shell-view.h"
-#include "e-shell-view-menu.h"
-
static BonoboWindowClass *parent_class = NULL;
@@ -1758,24 +1759,32 @@ update_window_icon (EShellView *shell_view,
static void
update_folder_title_bar (EShellView *shell_view,
const char *title,
- const char *type)
+ EFolder *folder)
{
EShellViewPrivate *priv;
- EFolderTypeRegistry *folder_type_registry;
GdkPixbuf *folder_icon;
priv = shell_view->priv;
- if (type == NULL) {
- title = NULL;
+ if (folder == NULL) {
folder_icon = NULL;
} else {
- folder_type_registry = e_shell_get_folder_type_registry (priv->shell);
- folder_icon = e_folder_type_registry_get_icon_for_type (folder_type_registry, type, TRUE);
+ const char *icon_name;
+
+ icon_name = e_folder_get_custom_icon_name (folder);
+ if (icon_name != NULL) {
+ folder_icon = e_icon_factory_get_icon (icon_name, TRUE);
+ } else {
+ EFolderTypeRegistry *folder_type_registry;
+
+ folder_type_registry = e_shell_get_folder_type_registry (priv->shell);
+ folder_icon = e_folder_type_registry_get_icon_for_type (folder_type_registry,
+ e_folder_get_type_string (folder),
+ TRUE);
+ }
}
- if (folder_icon != NULL)
- e_shell_folder_title_bar_set_icon (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), folder_icon);
+ e_shell_folder_title_bar_set_icon (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), folder_icon);
if (title != NULL) {
char *s;
@@ -1801,10 +1810,8 @@ update_for_current_uri (EShellView *shell_view)
priv = shell_view->priv;
- /* if we update when there is a timeout set, the selection
- * will jump around against the user's wishes. so we just
- * return.
- */
+ /* If we update when there is a timeout set, the selection will jump
+ around against the user's wishes. So we just return. */
if (priv->set_folder_timeout != 0)
return;
@@ -1840,7 +1847,7 @@ update_for_current_uri (EShellView *shell_view)
gtk_window_title = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), utf8_window_title);
gtk_window_set_title (GTK_WINDOW (shell_view), gtk_window_title);
- update_folder_title_bar (shell_view, title, type);
+ update_folder_title_bar (shell_view, title, folder);
update_window_icon (shell_view, type);
g_free (gtk_window_title);