aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-03-10 09:06:18 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-03-10 09:06:18 +0800
commit7a92d9cc82b7775a0f5cb1fde233119d435a79b6 (patch)
tree0bf446e28f6068a36dc3164725d3c37b05db4f6c /calendar
parentf963cc39a7d21f64f578dae50fd08c44181a3bf6 (diff)
downloadgsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar.gz
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar.bz2
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar.lz
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar.xz
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.tar.zst
gsoc2013-evolution-7a92d9cc82b7775a0f5cb1fde233119d435a79b6.zip
Add e_lookup_action() and e_lookup_action_group() to e-util, so
I don't have to keep writing the algorithm over and over again. Add EFileActivity, which provides a GCancellable for GIO operations. Cancelling the activity cancels the GIO operation, and vice versa. Also provides a handy GFileProgressCallback function which updates the activity's "percent" property. svn path=/branches/kill-bonobo/; revision=37396
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 4e1bf9972f..7be36d043b 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -2341,46 +2341,28 @@ GtkAction *
comp_editor_get_action (CompEditor *editor,
const gchar *action_name)
{
- GtkAction *action = NULL;
- GList *iter;
+ GtkUIManager *ui_manager;
g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL);
g_return_val_if_fail (action_name != NULL, NULL);
- iter = gtk_ui_manager_get_action_groups (editor->priv->manager);
- while (iter != NULL && action == NULL) {
- GtkActionGroup *action_group = iter->data;
+ ui_manager = comp_editor_get_ui_manager (editor);
- action = gtk_action_group_get_action (
- action_group, action_name);
- iter = g_list_next (iter);
- }
- g_return_val_if_fail (action != NULL, NULL);
-
- return action;
+ return e_lookup_action (ui_manager, action_name);
}
GtkActionGroup *
comp_editor_get_action_group (CompEditor *editor,
const gchar *group_name)
{
- GList *iter;
+ GtkUIManager *ui_manager;
g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL);
g_return_val_if_fail (group_name != NULL, NULL);
- iter = gtk_ui_manager_get_action_groups (editor->priv->manager);
- while (iter != NULL) {
- GtkActionGroup *action_group = iter->data;
- const gchar *name;
-
- name = gtk_action_group_get_name (action_group);
- if (strcmp (name, group_name) == 0)
- return action_group;
- iter = g_list_next (iter);
- }
+ ui_manager = comp_editor_get_ui_manager (editor);
- g_return_val_if_reached (NULL);
+ return e_lookup_action_group (ui_manager, group_name);
}
GtkWidget *