aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/test-source-list.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-11-15 04:49:01 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-11-15 04:49:01 +0800
commit50a2665bff9c48dc25701194157802e836db9290 (patch)
treec437b9969f3549bf715a845df73d1861b8896494 /e-util/test-source-list.c
parent40711386d6bff4321c410f8dde035c2e1a8527df (diff)
downloadgsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.gz
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.bz2
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.lz
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.xz
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.zst
gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.zip
config accessor (calendar_config_set_calendars_selected): ditto
2003-11-14 JP Rosevear <jpr@ximian.com> * gui/calendar-config.c (calendar_config_get_calendars_selected): config accessor (calendar_config_set_calendars_selected): ditto (calendar_config_add_notification_calendars_selected): config notification * gui/calendar-config.h: add protos * gui/calendar-config-keys.h: add new key * gui/calendar-component.c (is_in_uids): util function (update_uris_for_selection): save the selection in the configuration (update_selection): update the selection from the config info (source_selection_changed_cb): only pass one param (config_selection_changed_cb): listen for config changes (impl_dispose): remove config notification (impl_createControls): use bonobo_exception_set; add a config notification 2003-11-14 JP Rosevear <jpr@ximian.com> * test-source-list.c (on_idle_do_stuff): we only need the uid to remove and peek at stuff * e-source-list.h: update proto types * e-source-list.c (e_source_list_peek_source_by_uid): allow peek by uid only (e_source_list_remove_source_by_uid): allow removal by uid only svn path=/trunk/; revision=23362
Diffstat (limited to 'e-util/test-source-list.c')
-rw-r--r--e-util/test-source-list.c45
1 files changed, 19 insertions, 26 deletions
diff --git a/e-util/test-source-list.c b/e-util/test-source-list.c
index 7c38436326..b869df01d7 100644
--- a/e-util/test-source-list.c
+++ b/e-util/test-source-list.c
@@ -377,36 +377,31 @@ on_idle_do_stuff (void *unused_data)
if (remove_source_arg != NULL) {
ESource *source;
- if (group_arg == NULL) {
- fprintf (stderr, "When using --remove-source, you need to specify a group using --group.\n");
- exit (1);
- }
-
- source = e_source_list_peek_source_by_uid (list, group_arg, remove_source_arg);
+ source = e_source_list_peek_source_by_uid (list, remove_source_arg);
if (source == NULL) {
- fprintf (stderr, "No such source \"%s\" in group \"%s\".\n", remove_source_arg, group_arg);
+ fprintf (stderr, "No such source \"%s\".\n", remove_source_arg);
exit (1);
}
- e_source_list_remove_source_by_uid (list, group_arg, remove_source_arg);
+ e_source_list_remove_source_by_uid (list, remove_source_arg);
e_source_list_sync (list, NULL);
}
if (set_name_arg != NULL) {
- if (group_arg == NULL) {
+ if (group_arg == NULL && source_arg == NULL) {
fprintf (stderr,
- "When using --set-name, you need to specify a source (using --group and\n"
- "--source) or a group (using --group alone).\n");
+ "When using --set-name, you need to specify a source (using --source"
+ "alone) or a group (using --group alone).\n");
exit (1);
}
if (source_arg != NULL) {
- ESource *source = e_source_list_peek_source_by_uid (list, group_arg, source_arg);
+ ESource *source = e_source_list_peek_source_by_uid (list, source_arg);
if (source != NULL) {
e_source_set_name (source, set_name_arg);
} else {
- fprintf (stderr, "No such source \"%s\" in group \"%s\".\n", source_arg, group_arg);
+ fprintf (stderr, "No such source \"%s\".\n", source_arg);
exit (1);
}
} else {
@@ -418,7 +413,7 @@ on_idle_do_stuff (void *unused_data)
fprintf (stderr, "No such group \"%s\".\n", group_arg);
exit (1);
}
- }
+ }
e_source_list_sync (list, NULL);
}
@@ -426,14 +421,14 @@ on_idle_do_stuff (void *unused_data)
if (set_relative_uri_arg != NULL && add_source_arg == NULL) {
ESource *source;
- if (source_arg == NULL || group_arg == NULL) {
+ if (source_arg == NULL) {
fprintf (stderr,
- "When using --set-relative-uri, you need to specify a source using --group\n"
- "and --source.\n");
+ "When using --set-relative-uri, you need to specify a source using "
+ "--source.\n");
exit (1);
}
- source = e_source_list_peek_source_by_uid (list, group_arg, source_arg);
+ source = e_source_list_peek_source_by_uid (list, source_arg);
e_source_set_relative_uri (source, set_relative_uri_arg);
e_source_list_sync (list, NULL);
}
@@ -442,17 +437,16 @@ on_idle_do_stuff (void *unused_data)
ESource *source;
guint32 color;
- if (add_source_arg == NULL && (source_arg == NULL || group_arg == NULL)) {
+ if (add_source_arg == NULL && source_arg == NULL) {
fprintf (stderr,
- "When using --set-color, you need to specify a source using --group\n"
- "and --source.\n");
+ "When using --set-color, you need to specify a source using --source\n");
exit (1);
}
if (add_source_arg != NULL)
source = new_source;
else
- source = e_source_list_peek_source_by_uid (list, group_arg, source_arg);
+ source = e_source_list_peek_source_by_uid (list, source_arg);
sscanf (set_color_arg, "%06x", &color);
e_source_set_color (source, color);
@@ -462,17 +456,16 @@ on_idle_do_stuff (void *unused_data)
if (unset_color) {
ESource *source;
- if (add_source_arg == NULL && (source_arg == NULL || group_arg == NULL)) {
+ if (add_source_arg == NULL && source_arg == NULL) {
fprintf (stderr,
- "When using --unset-color, you need to specify a source using --group\n"
- "and --source.\n");
+ "When using --unset-color, you need to specify a source using --source\n");
exit (1);
}
if (add_source_arg != NULL)
source = new_source;
else
- source = e_source_list_peek_source_by_uid (list, group_arg, source_arg);
+ source = e_source_list_peek_source_by_uid (list, source_arg);
e_source_unset_color (source);
e_source_list_sync (list, NULL);