aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-12-04 00:37:22 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-12-04 00:37:22 +0800
commit4d8aef368f8eb4d518741a20c4ae6fc113f2545d (patch)
tree9c122139171505d19f55a1784ceeb62944994b97
parent5b7662b8c7a5e988c74ad142d7e5f63aee4085fa (diff)
downloadgsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar.gz
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar.bz2
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar.lz
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar.xz
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.tar.zst
gsoc2013-evolution-4d8aef368f8eb4d518741a20c4ae6fc113f2545d.zip
cast the parent (impl_createControls): add notification for primary tasks
2003-12-03 JP Rosevear <jpr@ximian.com> * gui/tasks-component.c (rename_task_list_cb): cast the parent (impl_createControls): add notification for primary tasks (config_primary_selection_changed_cb): handle primary selection changing in gconf * gui/calendar-config-keys.h: fix config key for primary tasks svn path=/trunk/; revision=23605
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/calendar-config-keys.h2
-rw-r--r--calendar/gui/tasks-component.c26
3 files changed, 29 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6428c8fbde..a746076b29 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2003-12-03 JP Rosevear <jpr@ximian.com>
+ * gui/tasks-component.c (rename_task_list_cb): cast the parent
+ (impl_createControls): add notification for primary tasks
+ (config_primary_selection_changed_cb): handle primary selection
+ changing in gconf
+
+ * gui/calendar-config-keys.h: fix config key for primary tasks
+
+2003-12-03 JP Rosevear <jpr@ximian.com>
+
* gui/calendar-component.c (rename_calendar_cb): cast the parent
(config_primary_selection_changed_cb): handle the primary
selection changing elsewhere
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h
index 55181d2769..ebe16b6539 100644
--- a/calendar/gui/calendar-config-keys.h
+++ b/calendar/gui/calendar-config-keys.h
@@ -54,7 +54,7 @@ G_BEGIN_DECLS
/* Task display settings */
#define CALENDAR_CONFIG_TASKS_SELECTED_TASKS CALENDAR_CONFIG_PREFIX "/tasks/selected_tasks"
-#define CALENDAR_CONFIG_PRIMARY_TASKS CALENDAR_CONFIG_PREFIX "/display/primary_tasks"
+#define CALENDAR_CONFIG_PRIMARY_TASKS CALENDAR_CONFIG_PREFIX "/tasks/primary_tasks"
#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED CALENDAR_CONFIG_PREFIX "/tasks/hide_completed"
#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS CALENDAR_CONFIG_PREFIX "/tasks/hide_completed_units"
#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE CALENDAR_CONFIG_PREFIX "/tasks/hide_completed_value"
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 57079a62e9..89b3c83d90 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -66,7 +66,7 @@ struct _TasksComponentPrivate {
ETasks *tasks;
GtkWidget *source_selector;
- guint selected_not;
+ GList *notifications;
};
/* Utility functions. */
@@ -369,7 +369,7 @@ rename_task_list_cb (GtkWidget *widget, TasksComponent *comp)
return;
/* create the dialog to prompt the user for the new name */
- dialog = gtk_message_dialog_new (gtk_widget_get_toplevel (widget),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_OK_CANCEL,
@@ -420,6 +420,12 @@ config_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, g
update_selection (data);
}
+static void
+config_primary_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
+{
+ update_primary_selection (data);
+}
+
/* GObject methods */
static void
@@ -480,7 +486,8 @@ impl_createControls (PortableServer_Servant servant,
TasksComponentPrivate *priv;
GtkWidget *selector_scrolled_window;
BonoboControl *sidebar_control, *view_control;
-
+ guint not;
+
priv = component->priv;
/* create sidebar selector */
@@ -530,9 +537,14 @@ impl_createControls (PortableServer_Servant servant,
update_selection (component);
update_primary_selection (component);
- /* If it gets fiddled with, ie from another evolution window, update it */
- priv->selected_not = calendar_config_add_notification_calendars_selected (config_selection_changed_cb,
- component);
+ /* If it gets fiddled with update */
+ not = calendar_config_add_notification_tasks_selected (config_selection_changed_cb,
+ component);
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
+
+ not = calendar_config_add_notification_primary_tasks (config_primary_selection_changed_cb,
+ component);
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* Return the controls */
*corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
@@ -540,7 +552,7 @@ impl_createControls (PortableServer_Servant servant,
/* The tasks component doesn't use the status bar so just return an empty label. */
{
- GtkLabel *label = gtk_label_new ("");
+ GtkWidget *label = gtk_label_new ("");
BonoboControl *control;
gtk_widget_show (label);