diff options
author | JP Rosevear <jpr@ximian.com> | 2004-01-24 13:36:53 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-01-24 13:36:53 +0800 |
commit | 7e9fd7e25164e3a1bc5706c6c25feca5cdafba25 (patch) | |
tree | dc633debad12c5fffcf920552a62d138223eecfc | |
parent | df1cd4c9ef44f3b1062fe482ad865302eba29fd4 (diff) | |
download | gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar.gz gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar.bz2 gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar.lz gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar.xz gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.tar.zst gsoc2013-evolution-7e9fd7e25164e3a1bc5706c6c25feca5cdafba25.zip |
if the source is primary, don't allow it to be un-selected
2004-01-24 JP Rosevear <jpr@ximian.com>
* e-source-selector.c (cell_toggled_callback): if the source is
primary, don't allow it to be un-selected
svn path=/trunk/; revision=24397
-rw-r--r-- | widgets/misc/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/misc/e-source-selector.c | 25 |
2 files changed, 19 insertions, 11 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 8db55ee74c..f8fc8bbef3 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-24 JP Rosevear <jpr@ximian.com> + + * e-source-selector.c (cell_toggled_callback): if the source is + primary, don't allow it to be un-selected + 2004-01-20 Rodney Dawes <dobey@ximian.com> * e-combo-button.c (paint): Be even more exactly like the GtkButton diff --git a/widgets/misc/e-source-selector.c b/widgets/misc/e-source-selector.c index f64c192bd4..f26ce4030b 100644 --- a/widgets/misc/e-source-selector.c +++ b/widgets/misc/e-source-selector.c @@ -475,17 +475,20 @@ cell_toggled_callback (GtkCellRendererToggle *renderer, gtk_tree_path_free (path); } else { source = E_SOURCE (data); - if (source_is_selected (selector, source)) - unselect_source (selector, source); - else - select_source (selector, source); - - selector->priv->toggled_last = TRUE; - - gtk_tree_model_row_changed (model, path, &iter); - g_signal_emit (selector, signals[SELECTION_CHANGED], 0); - - gtk_tree_path_free (path); + + if (e_source_selector_peek_primary_selection (selector) != source) { + if (source_is_selected (selector, source)) + unselect_source (selector, source); + else + select_source (selector, source); + + selector->priv->toggled_last = TRUE; + + gtk_tree_model_row_changed (model, path, &iter); + g_signal_emit (selector, signals[SELECTION_CHANGED], 0); + + gtk_tree_path_free (path); + } } g_object_unref (data); |