aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/calendar-component.c1
-rw-r--r--calendar/gui/tasks-component.c1
-rw-r--r--widgets/misc/ChangeLog10
-rw-r--r--widgets/misc/e-source-selector.c23
-rw-r--r--widgets/misc/e-source-selector.h2
6 files changed, 43 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c454c7aee6..82978774e1 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-24 Rodney Dawes <dobey@novell.com>
+
+ * gui/calendar-component.c (create_component_view):
+ * gui/tasks-component.c (create_component_view):
+ Add a call to e_source_selector_set_select_new here so that we can
+ select new sources when we create them
+
2004-06-23 Jeffrey Stedfast <fejj@novell.com>
* conduits/todo/todo-conduit.c: Bump the version to 0.1.5 to help
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 857812f5c3..4bf64da90f 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -1032,6 +1032,7 @@ create_component_view (CalendarComponent *calendar_component)
/* Create sidebar selector */
component_view->source_selector = e_source_selector_new (calendar_component->priv->source_list);
+ e_source_selector_set_select_new (component_view->source_selector, TRUE);
g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
calendar_component);
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 9f5edbcda0..e685977a5d 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -846,6 +846,7 @@ create_component_view (TasksComponent *tasks_component)
/* Create sidebar selector */
component_view->source_selector = e_source_selector_new (tasks_component->priv->source_list);
+ e_source_selector_set_select_new (component_view->source_selector, TRUE);
g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
tasks_component);
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 11ba7c99fd..8a38b6a6b2 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,13 @@
+2004-06-24 Rodney Dawes <dobey@novell.com>
+
+ * e-source-selector.[ch]: Add new "select_new" property to
+ private structure of the ESourceSelector
+ (rebuild_cb): Add code to select the new source, and cause the
+ selection_changed signal to get emitted, if we select new sources
+ (init): Don't select new sources by default
+ (e_source_selector_set_select_new): Add function to set whether or not
+ we want to select new sources when we add them
+
2004-06-16 Not Zed <NotZed@Ximian.com>
* e-source-selector.c (cell_toggled_callback): fix a path leak and
diff --git a/widgets/misc/e-source-selector.c b/widgets/misc/e-source-selector.c
index 1a0e0d1fbd..466930ed4f 100644
--- a/widgets/misc/e-source-selector.c
+++ b/widgets/misc/e-source-selector.c
@@ -53,6 +53,7 @@ struct _ESourceSelectorPrivate {
gboolean toggled_last;
gboolean checkboxes_shown;
gboolean toggle_selection;
+ gboolean select_new;
};
typedef struct {
@@ -276,6 +277,10 @@ rebuild_model (ESourceSelector *selector)
row_ref = g_hash_table_lookup (rebuild_data->remaining_uids, e_source_peek_uid (source));
if (!row_ref) {
+ if (selector->priv->select_new) {
+ select_source (selector, source);
+ rebuild_data->selection_changed = TRUE;
+ }
gtk_tree_store_append (GTK_TREE_STORE (tree_store), &child_iter, &iter);
gtk_tree_store_set (GTK_TREE_STORE (tree_store), &child_iter, 0, source, -1);
@@ -726,6 +731,7 @@ init (ESourceSelector *selector)
priv->toggled_last = FALSE;
priv->checkboxes_shown = TRUE;
+ priv->select_new = FALSE;
priv->selected_sources = create_selected_sources_hash ();
@@ -891,7 +897,7 @@ e_source_selector_selection_shown (ESourceSelector *selector)
* @selector:
* @state:
*
- * Set the source selectr behaviour, whether you can toggle the
+ * Set the source selector behaviour, whether you can toggle the
* current selection or not.
**/
void
@@ -903,6 +909,21 @@ e_source_selector_set_toggle_selection(ESourceSelector *selector, gboolean state
}
/**
+ * e_source_selector_set_select_new:
+ * @selector: An ESourceSelector widget
+ * @state: A gboolean
+ *
+ * Set whether or not to select new sources added to @selector.
+ **/
+void
+e_source_selector_set_select_new (ESourceSelector *selector, gboolean state)
+{
+ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
+
+ selector->priv->select_new = state;
+}
+
+/**
* e_source_selector_select_source:
* @selector: An ESourceSelector widget
* @source: An ESource.
diff --git a/widgets/misc/e-source-selector.h b/widgets/misc/e-source-selector.h
index 0b65d9443a..ec7d52bc26 100644
--- a/widgets/misc/e-source-selector.h
+++ b/widgets/misc/e-source-selector.h
@@ -74,6 +74,8 @@ gboolean e_source_selector_selection_shown (ESourceSelector *selector);
void e_source_selector_set_toggle_selection(ESourceSelector *selector, gboolean state);
+void e_source_selector_set_select_new (ESourceSelector *selector, gboolean state);
+
ESource *e_source_selector_peek_primary_selection (ESourceSelector *selector);
void e_source_selector_set_primary_selection (ESourceSelector *selector,
ESource *source);