aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-log-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-24 17:41:14 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-24 22:31:43 +0800
commit2195753a72fcdcfc0e3a51de67a00fe04a00ecb5 (patch)
treee56a8879ffbc8b7a7b4a8ea195bb87cbecf9fd8a /libempathy-gtk/empathy-log-window.c
parent66303ff03c1d7801fbf7fee7ca8fa4c2a3f6639a (diff)
downloadgsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar.gz
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar.bz2
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar.lz
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar.xz
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.tar.zst
gsoc2013-empathy-2195753a72fcdcfc0e3a51de67a00fe04a00ecb5.zip
Calendar widget should be disabled if no contact selected (#645582)
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r--libempathy-gtk/empathy-log-window.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 56b5e0c45..8bb92b82e 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -774,6 +774,12 @@ static void
log_window_chats_changed_cb (GtkTreeSelection *selection,
EmpathyLogWindow *window)
{
+ gboolean selected;
+
+ /* The calendar has to be sensitive only if there is something selected */
+ selected = log_window_chats_get_selected (window, NULL, NULL);
+ gtk_widget_set_sensitive (window->calendar_chats, selected);
+
/* Use last date by default */
gtk_calendar_clear_marks (GTK_CALENDAR (window->calendar_chats));
@@ -981,6 +987,9 @@ log_window_chats_accounts_changed_cb (GtkWidget *combobox,
empathy_chat_view_clear (window->chatview_chats);
log_window_chats_populate (window);
+
+ /* No chat is selected as we just changed the account */
+ gtk_widget_set_sensitive (window->calendar_chats, FALSE);
}
static void