aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-10-11 22:03:13 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-10-11 22:03:13 +0800
commiteeb89358f6f3aa8f211b33c23842a8deb08171a8 (patch)
tree5874c18c42397a4a387d6c4aa87718044b31431d /shell/e-shell-window.c
parentaa70b15ea030e8c5a42ea9512c522140e6b8f5e7 (diff)
downloadgsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar.gz
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar.bz2
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar.lz
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar.xz
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.tar.zst
gsoc2013-evolution-eeb89358f6f3aa8f211b33c23842a8deb08171a8.zip
** Fix for bug #329823
2007-10-11 Milan Crha <mcrha@redhat.com> ** Fix for bug #329823 * Evolution-Shell.idl: (setButtonIcon): * e-sidebar.h: (e_sidebar_change_button_icon): * e-sidebar.c: (struct Button), (button_new), (button_free), (e_sidebar_change_button_icon): * e-shell.h: (EMainShellFunc), (e_shell_foreach_shell_window): * e-shell.c: (EMainShellFunc), (e_shell_foreach_shell_window): * e-component-view.h: (e_component_view_set_button_icon): * e-component-view.c: (e_component_view_set_button_icon): * e-shell-window.h: (e_shell_window_change_component_button_icon): * e-shell-window.c: (e_shell_window_change_component_button_icon): * e-shell-view.c: (struct change_icon_struct), (change_button_icon_func), (impl_ShellView_setButtonIcon), (e_shell_view_class_init): Added support to change component's button icon. * mail-component.h: (mail_indicate_new_mail): * mail-component.c: (mail_indicate_new_mail), (struct _MailComponentPrivate), (impl_dispose), (impl_createView): New function to indicate new mails on sidebar's button and storing component_view in priv struct for later use. * em-folder-view.c: (emfv_list_done_message_selected): * mail-folder-cache.c: (real_flush_updates): Indicate changes like for plugins for new mails. svn path=/trunk/; revision=34374
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 14a1a439a2..5bf644e8d8 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -1290,3 +1290,36 @@ e_shell_window_set_title(EShellWindow *window, const char *component_id, const c
}
}
+/**
+ * e_shell_window_change_component_button_icon
+ * Changes icon of components button at sidebar. For more info how this behaves see
+ * info at @ref e_sidebar_change_button_icon.
+ * @param window EShellWindow instance.
+ * @param component_id ID of the component.
+ * @param icon Icon buffer.
+ **/
+void
+e_shell_window_change_component_button_icon (EShellWindow *window, const char *component_id, GdkPixbuf *icon)
+{
+ EShellWindowPrivate *priv;
+ GSList *p;
+
+ g_return_if_fail (window != NULL);
+ g_return_if_fail (component_id != NULL);
+
+ priv = window->priv;
+
+ if (priv->destroyed)
+ return;
+
+ for (p = priv->component_views; p != NULL; p = p->next) {
+ ComponentView *this_view = p->data;
+
+ if (strcmp (this_view->component_id, component_id) == 0
+ || (this_view->component_alias != NULL
+ && strcmp (this_view->component_alias, component_id) == 0)) {
+ e_sidebar_change_button_icon (E_SIDEBAR (priv->sidebar), icon, this_view->button_id);
+ break;
+ }
+ }
+}