[evolution-patches] Fixes for Calendar
- From: Srinivasa Ragavan <sragavan novell com>
- To: Evolution Patches <evolution-patches gnome org>
- Subject: [evolution-patches] Fixes for Calendar
- Date: Wed, 05 Oct 2005 18:09:34 +0530
This fixes quite a few issues in calendar.
* expander for attachment bar
* acclerators
* preview pane hide
* contacts view, r click, Ins Del key support and size of the Attendee
heading.
-Srini
Index: calendar/calendar.error.xml
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar.error.xml,v
retrieving revision 1.3
diff -u -p -r1.3 calendar.error.xml
--- calendar/calendar.error.xml 6 Jul 2005 07:14:57 -0000 1.3
+++ calendar/calendar.error.xml 5 Oct 2005 12:15:36 -0000
@@ -106,22 +106,22 @@
<button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
</error>
- <error id="prompt-save-appointment" type="question" default="GTK_RESPONSE_YES">
+ <error id="prompt-save-appointment" type="warning" default="GTK_RESPONSE_YES">
<title>Save Appointment</title>
<_primary>Would you like to save your changes to this appointment?</_primary>
- <_secondary>You have made changes to this appointment, but not yet saved them.</_secondary>
- <button _label="Discard Changes" response="GTK_RESPONSE_NO"/>
+ <_secondary>You have changed this appointment, but not yet saved them.</_secondary>
+ <button _label="_Discard Changes" response="GTK_RESPONSE_NO"/>
<button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="Save Changes" response="GTK_RESPONSE_YES"/>
+ <button _label="_Save Changes" response="GTK_RESPONSE_YES"/>
</error>
- <error id="prompt-save-task" type="question" default="GTK_RESPONSE_YES">
+ <error id="prompt-save-task" type="warning" default="GTK_RESPONSE_YES">
<title>Save Task</title>
<_primary>Would you like to save your changes to this task?</_primary>
<_secondary>You have made changes to this task, but not yet saved them.</_secondary>
- <button _label="Discard Changes" response="GTK_RESPONSE_NO"/>
+ <button _label="_Discard Changes" response="GTK_RESPONSE_NO"/>
<button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="Save Changes" response="GTK_RESPONSE_YES"/>
+ <button _label="_Save Changes" response="GTK_RESPONSE_YES"/>
</error>
<error id="prompt-meeting-invite" type="question" default="GTK_RESPONSE_YES">
Index: calendar/gui/apps_evolution_calendar.schemas.in.in
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/apps_evolution_calendar.schemas.in.in,v
retrieving revision 1.12
diff -u -p -r1.12 apps_evolution_calendar.schemas.in.in
--- calendar/gui/apps_evolution_calendar.schemas.in.in 30 May 2005 09:14:26 -0000 1.12
+++ calendar/gui/apps_evolution_calendar.schemas.in.in 5 Oct 2005 12:15:39 -0000
@@ -148,6 +148,20 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/calendar/display/show_task_preview</key>
+ <applyto>/apps/evolution/calendar/display/show_task_preview</applyto>
+ <owner>evolution-calendar</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Show the "Preview" pane</short>
+ <long>
+ Show the "Preview" pane.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/calendar/display/task_vpane_position</key>
<applyto>/apps/evolution/calendar/display/task_vpane_position</applyto>
<owner>evolution-calendar</owner>
Index: calendar/gui/e-meeting-list-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-list-view.c,v
retrieving revision 1.22
diff -u -p -r1.22 e-meeting-list-view.c
--- calendar/gui/e-meeting-list-view.c 5 Aug 2005 08:03:55 -0000 1.22
+++ calendar/gui/e-meeting-list-view.c 5 Oct 2005 12:15:44 -0000
@@ -347,6 +347,8 @@ build_table (EMeetingListView *lview)
GtkTreeView *view = GTK_TREE_VIEW (lview);
EMeetingListViewPrivate *priv;
GHashTable *edit_table;
+ GtkTreeViewColumn *col;
+ int pos;
priv = lview->priv;
edit_table = priv->renderers;
@@ -355,45 +357,62 @@ build_table (EMeetingListView *lview)
renderer = e_select_names_renderer_new ();
g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Attendee"), renderer,
+ /* The extra space is just a hack to occupy more space for Attendee */
+ pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Attendee "), renderer,
"text", E_MEETING_STORE_ATTENDEE_COL,
"name", E_MEETING_STORE_CN_COL,
"email", E_MEETING_STORE_ADDRESS_COL,
"underline", E_MEETING_STORE_ATTENDEE_UNDERLINE_COL,
NULL);
+ col = gtk_tree_view_get_column (view, pos -1);
+ gtk_tree_view_column_set_resizable (col, TRUE);
+ gtk_tree_view_column_set_reorderable(col, TRUE);
+ g_object_set (col, "width", 50, NULL);
g_signal_connect (renderer, "cell_edited", G_CALLBACK (attendee_edited_cb), view);
g_signal_connect (renderer, "editing-canceled", G_CALLBACK (attendee_editing_canceled_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL), renderer);
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_type_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Type"), renderer,
+ pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Type"), renderer,
"text", E_MEETING_STORE_TYPE_COL,
NULL);
+ col = gtk_tree_view_get_column (view, pos -1);
+ gtk_tree_view_column_set_resizable (col, TRUE);
+ gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (type_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_TYPE_COL), renderer);
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_role_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Role"), renderer,
+ pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Role"), renderer,
"text", E_MEETING_STORE_ROLE_COL,
NULL);
+ col = gtk_tree_view_get_column (view, pos -1);
+ gtk_tree_view_column_set_resizable (col, TRUE);
+ gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (role_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ROLE_COL), renderer);
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_rsvp_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("RSVP"), renderer,
+ pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("RSVP"), renderer,
"text", E_MEETING_STORE_RSVP_COL,
NULL);
+ col = gtk_tree_view_get_column (view, pos -1);
+ gtk_tree_view_column_set_resizable (col, TRUE);
+ gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (rsvp_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_RSVP_COL), renderer);
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_status_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Status"), renderer,
+ pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Status"), renderer,
"text", E_MEETING_STORE_STATUS_COL,
NULL);
+ col = gtk_tree_view_get_column (view, pos -1);
+ gtk_tree_view_column_set_resizable (col, TRUE);
+ gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (status_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_STATUS_COL), renderer);
Index: calendar/gui/e-meeting-time-sel.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-time-sel.c,v
retrieving revision 1.69
diff -u -p -r1.69 e-meeting-time-sel.c
--- calendar/gui/e-meeting-time-sel.c 24 Aug 2005 03:07:49 -0000 1.69
+++ calendar/gui/e-meeting-time-sel.c 5 Oct 2005 12:16:23 -0000
@@ -333,6 +333,9 @@ e_meeting_time_selector_construct (EMeet
mts->list_view = e_meeting_list_view_new (mts->model);
e_meeting_list_view_column_set_visible (mts->list_view, "Role", FALSE);
e_meeting_list_view_column_set_visible (mts->list_view, "RSVP", FALSE);
+ e_meeting_list_view_column_set_visible (mts->list_view, "Status", FALSE);
+ e_meeting_list_view_column_set_visible (mts->list_view, "Type", FALSE);
+
gtk_widget_show (GTK_WIDGET (mts->list_view));
Index: calendar/gui/e-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.c,v
retrieving revision 1.122
diff -u -p -r1.122 e-tasks.c
--- calendar/gui/e-tasks.c 3 Oct 2005 06:16:51 -0000 1.122
+++ calendar/gui/e-tasks.c 5 Oct 2005 12:16:29 -0000
@@ -518,8 +518,9 @@ setup_widgets (ETasks *tasks)
ETasksPrivate *priv;
ETable *etable;
ECalModel *model;
-
+ GConfClient *gconf = gconf_client_get_default();
priv = tasks->priv;
+ gboolean state;
priv->search_bar = cal_search_bar_new (CAL_SEARCH_TASKS_DEFAULT);
g_signal_connect (priv->search_bar, "sexp_changed",
@@ -586,7 +587,11 @@ setup_widgets (ETasks *tasks)
priv->preview = e_cal_component_preview_new ();
e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ());
gtk_paned_add2 (GTK_PANED (priv->paned), priv->preview);
- gtk_widget_show (priv->preview);
+ state = gconf_client_get_bool(gconf, "/apps/evolution/calendar/display/show_task_preview", NULL);
+ g_object_unref (gconf);
+
+ if (state)
+ gtk_widget_show (priv->preview);
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
g_signal_connect (G_OBJECT (model), "model_row_changed",
@@ -997,6 +1002,52 @@ e_tasks_new_task (ETasks *tasks)
g_object_unref (comp);
comp_editor_focus (COMP_EDITOR (tedit));
+}
+
+void
+e_tasks_show_preview (ETasks *tasks, gboolean state)
+{
+ ETasksPrivate *priv;
+
+ g_return_val_if_fail (tasks != NULL, FALSE);
+ g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
+ priv = tasks->priv;
+
+ if (state) {
+ ECalModel *model;
+ ECalModelComponent *comp_data;
+ ECalComponent *comp;
+ ETable *etable;
+ const char *uid;
+ int n_selected;
+
+ etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
+ n_selected = e_table_selected_count (etable);
+
+ if (n_selected != 1) {
+ e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
+ } else {
+ model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
+
+ comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+
+ e_cal_component_preview_display (E_CAL_COMPONENT_PREVIEW (priv->preview), comp_data->client, comp);
+
+ e_cal_component_get_uid (comp, &uid);
+ if (priv->current_uid)
+ g_free (priv->current_uid);
+ priv->current_uid = g_strdup (uid);
+
+ g_object_unref (comp);
+ }
+ gtk_widget_show (priv->preview);
+
+ } else {
+ e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
+ gtk_widget_hide (priv->preview);
+ }
}
gboolean
Index: calendar/gui/e-tasks.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.h,v
retrieving revision 1.25
diff -u -p -r1.25 e-tasks.h
--- calendar/gui/e-tasks.h 2 Aug 2005 13:50:54 -0000 1.25
+++ calendar/gui/e-tasks.h 5 Oct 2005 12:16:29 -0000
@@ -78,7 +78,7 @@ void e_tasks_complete_selected (ET
void e_tasks_delete_selected (ETasks *tasks);
void e_tasks_delete_completed (ETasks *tasks);
-
+void e_tasks_show_preview (ETasks *tasks, gboolean state);
void e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic);
void e_tasks_discard_view_menus (ETasks *tasks);
Index: calendar/gui/tasks-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
retrieving revision 1.83
diff -u -p -r1.83 tasks-control.c
--- calendar/gui/tasks-control.c 30 Sep 2005 16:48:04 -0000 1.83
+++ calendar/gui/tasks-control.c 5 Oct 2005 12:16:31 -0000
@@ -102,6 +102,11 @@ static void tasks_control_forward_cmd
gpointer data,
const char *path);
+static void tasks_control_view_preview (BonoboUIComponent *uic,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
+ void *data);
BonoboControl *
tasks_control_new (void)
@@ -245,7 +250,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("TasksPrintPreview", tasks_control_print_preview_cmd),
BONOBO_UI_VERB ("TasksAssign", tasks_control_assign_cmd),
BONOBO_UI_VERB ("TasksForward", tasks_control_forward_cmd),
-
+ BONOBO_UI_VERB ("ViewPreview", tasks_control_view_preview),
BONOBO_UI_VERB_END
};
@@ -257,6 +262,8 @@ tasks_control_activate (BonoboControl *c
int n_selected;
ECalendarTable *cal_table;
ETable *etable;
+ gboolean state;
+ GConfClient *gconf = gconf_client_get_default();
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
@@ -289,8 +296,13 @@ tasks_control_activate (BonoboControl *c
tasks_control_sensitize_commands (control, tasks, n_selected);
- bonobo_ui_component_thaw (uic, NULL);
+ state = gconf_client_get_bool(gconf, "/apps/evolution/calendar/display/show_task_preview", NULL);
+ g_object_unref (gconf);
+ bonobo_ui_component_thaw (uic, NULL);
+
+ bonobo_ui_component_add_listener(uic, "ViewPreview", tasks_control_view_preview, tasks);
+ bonobo_ui_component_set_prop(uic, "/commands/ViewPreview", "state", state?"1":"0", NULL);
/* Show the dialog for setting the timezone if the user hasn't chosen
a default timezone already. This is done in the startup wizard now,
so we don't do it here. */
@@ -516,4 +528,21 @@ tasks_control_forward_cmd (BonoboUICompo
itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, comp_data->client, NULL, NULL);
g_object_unref (comp);
}
-}
+}
+
+static void
+tasks_control_view_preview (BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+{
+ GConfClient *gconf;
+ ETasks *tasks;
+
+ if (type != Bonobo_UIComponent_STATE_CHANGED)
+ return;
+
+ tasks = E_TASKS (data);
+
+ gconf = mail_config_get_gconf_client ();
+ gconf_client_set_bool(gconf, "/apps/evolution/calendar/display/show_task_preview", state[0] != '0', NULL);
+
+ e_tasks_show_preview (tasks, state[0] != '0');
+}
Index: calendar/gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.151
diff -u -p -r1.151 comp-editor.c
--- calendar/gui/dialogs/comp-editor.c 30 Sep 2005 11:26:54 -0000 1.151
+++ calendar/gui/dialogs/comp-editor.c 5 Oct 2005 12:17:06 -0000
@@ -994,6 +994,22 @@ attachment_bar_changed_cb (EAttachmentBa
}
+static void
+attachment_expander_activate_cb (EExpander *expander,
+ void *data)
+{
+ CompEditor *editor = COMP_EDITOR (data);
+ gboolean show = e_expander_get_expanded (expander);
+
+ /* Update the expander label */
+ if (show)
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Hide Attachment _Bar"));
+ else
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Show Attachment _Bar"));
+}
+
static gboolean
attachment_bar_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, CompEditor *editor)
{
@@ -1246,7 +1262,7 @@ setup_widgets (CompEditor *editor)
g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "event",
G_CALLBACK (attachment_bar_icon_clicked_cb), editor);
priv->attachment_expander_label =
- gtk_label_new_with_mnemonic (_("_Attachment Bar (drop attachments here)"));
+ gtk_label_new_with_mnemonic (_("Show Attachment _Bar"));
priv->attachment_expander_num = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (priv->attachment_expander_num), TRUE);
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_label), 0.0, 0.5);
@@ -1264,18 +1280,20 @@ setup_widgets (CompEditor *editor)
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_icon,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_num,
- FALSE, TRUE, 0);
+ TRUE, TRUE, 0);
gtk_widget_show_all (expander_hbox);
gtk_widget_hide (priv->attachment_expander_icon);
- gtk_box_pack_start (GTK_BOX (vbox), expander_hbox,
- FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_scrolled_window, FALSE, FALSE, GNOME_PAD_SMALL);
-
- gtk_widget_show (priv->attachment_scrolled_window);
- gtk_widget_show (expander_hbox);
-
-
+ priv->attachment_expander = e_expander_new ("");
+ e_expander_set_label_widget (E_EXPANDER (priv->attachment_expander), expander_hbox);
+ atk_object_set_name (gtk_widget_get_accessible (priv->attachment_expander), _("Attachment Button: Press space key to toggle attachment bar"));
+ gtk_container_add (GTK_CONTAINER (priv->attachment_expander), priv->attachment_scrolled_window);
+
+ gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_expander, FALSE, FALSE, GNOME_PAD_SMALL);
+ gtk_widget_show (priv->attachment_expander);
+ e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE);
+ g_signal_connect_after (priv->attachment_expander, "activate",
+ G_CALLBACK (attachment_expander_activate_cb), editor);
}
/* Object initialization function for the calendar component editor */
@@ -1691,7 +1709,7 @@ comp_editor_append_page (CompEditor *edi
page_widget = comp_editor_page_get_widget (page);
g_assert (page_widget != NULL);
- label_widget = gtk_label_new (label);
+ label_widget = gtk_label_new_with_mnemonic (label);
is_first_page = (priv->pages == NULL);
@@ -2089,6 +2107,8 @@ set_attachment_list (CompEditor *editor,
}
e_attachment_bar_attach_mime_part ((EAttachmentBar *) editor->priv->attachment_bar, part);
+ e_expander_set_expanded (E_EXPANDER (editor->priv->attachment_expander), TRUE);
+ printf("Setting to true\n");
camel_object_unref (part);
}
Index: calendar/gui/dialogs/event-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-editor.c,v
retrieving revision 1.69
diff -u -p -r1.69 event-editor.c
--- calendar/gui/dialogs/event-editor.c 18 Aug 2005 11:20:23 -0000 1.69
+++ calendar/gui/dialogs/event-editor.c 5 Oct 2005 12:17:13 -0000
@@ -138,7 +138,7 @@ event_editor_construct (EventEditor *ee,
gtk_object_sink (GTK_OBJECT (priv->event_page));
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->event_page),
- _("Appointment"));
+ _("_Appointment"));
g_signal_connect (G_OBJECT (priv->event_page), "client_changed",
G_CALLBACK (client_changed_cb), ee);
@@ -147,7 +147,7 @@ event_editor_construct (EventEditor *ee,
gtk_object_sink (GTK_OBJECT (priv->recur_page));
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->recur_page),
- _("Recurrence"));
+ _("_Recurrence"));
if (priv->is_meeting) {
@@ -161,7 +161,7 @@ event_editor_construct (EventEditor *ee,
gtk_object_sink (GTK_OBJECT (priv->sched_page));
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
+ _("Schedulin_g"));
}
priv->meet_page = meeting_page_new (priv->model, client);
@@ -171,11 +171,11 @@ event_editor_construct (EventEditor *ee,
if (comp_editor_get_flags (COMP_EDITOR (ee)) & COMP_EDITOR_DELEGATE) {
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Delegatees"));
+ _("_Delegatees"));
} else
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Attendees"));
+ _("_Attendees"));
priv->meeting_shown=TRUE;
}
comp_editor_set_e_cal (COMP_EDITOR (ee), client);
@@ -245,10 +245,10 @@ event_editor_edit_comp (CompEditor *edit
if (!priv->meeting_shown) {
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
+ _("Schedulin_g"));
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Invitations"));
+ _("In_vitations"));
}
if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
@@ -419,10 +419,10 @@ show_meeting (EventEditor *ee)
if (!priv->meeting_shown) {
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
+ _("Schedulin_g"));
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Invitations"));
+ _("In_vitations"));
priv->meeting_shown = TRUE;
comp_editor_set_changed (COMP_EDITOR (ee), FALSE);
Index: calendar/gui/dialogs/event-page.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.glade,v
retrieving revision 1.29
diff -u -p -r1.29 event-page.glade
--- calendar/gui/dialogs/event-page.glade 6 May 2005 04:34:18 -0000 1.29
+++ calendar/gui/dialogs/event-page.glade 5 Oct 2005 12:17:23 -0000
@@ -624,7 +624,7 @@
<widget class="GtkCheckButton" id="show-time-as-busy">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Show time as _busy</property>
+ <property name="label" translatable="yes">Show time as bus_y</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -646,7 +646,7 @@
<widget class="GtkCheckButton" id="alarm">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Alarm</property>
+ <property name="label" translatable="yes">Ala_rm</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
Index: calendar/gui/dialogs/meeting-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/meeting-page.c,v
retrieving revision 1.105
diff -u -p -r1.105 meeting-page.c
--- calendar/gui/dialogs/meeting-page.c 24 Aug 2005 03:07:50 -0000 1.105
+++ calendar/gui/dialogs/meeting-page.c 5 Oct 2005 12:17:31 -0000
@@ -32,6 +32,8 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkwindow.h>
+#include <gtk/gtktreeselection.h>
+#include <gdk/gdkkeysyms.h>
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <libgnomeui/gnome-stock-icons.h>
@@ -747,41 +749,51 @@ remove_clicked_cb (GtkButton *btn, Meeti
MeetingPagePrivate *priv;
EMeetingAttendee *ia;
GtkTreeSelection *selection;
+ GList *paths = NULL, *tmp;
GtkTreeIter iter;
- GtkTreePath *path;
+ GtkTreePath *path = NULL;
gboolean valid_iter;
char *address;
priv = mpage->priv;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &(priv->model)))) {
g_warning ("Could not get a selection to delete.");
return;
}
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->model), &iter);
-
- gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
- ia = e_meeting_store_find_attendee (priv->model, address, NULL);
- g_free (address);
- if (!ia)
- return;
- else if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
- return;
- remove_attendee (mpage, ia);
+ for (tmp = paths; tmp; tmp=tmp->next) {
+ path = tmp->data;
+
+ gtk_tree_model_get_iter (GTK_TREE_MODEL(priv->model), &iter, path);
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
+ ia = e_meeting_store_find_attendee (priv->model, address, NULL);
+ g_free (address);
+ if (!ia)
+ return;
+ else if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
+ return;
+
+ remove_attendee (mpage, ia);
+ }
+
/* Select closest item after removal */
+ gtk_tree_path_next(path);
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
if (!valid_iter) {
gtk_tree_path_prev (path);
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
}
-
- if (valid_iter)
+
+ if (valid_iter) {
+ gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_iter (selection, &iter);
-
- gtk_tree_path_free (path);
+ }
+
+ g_list_foreach (paths, gtk_tree_path_free, NULL);
+ g_list_free (paths);
}
/* Function called to invite more people */
@@ -864,6 +876,14 @@ client_changed_cb (CompEditorPage *page,
}
static void
+popup_add_cb (EPopup *ep, EPopupItem *pitem, void *data)
+{
+ MeetingPage *mpage = data;
+
+ add_clicked_cb (NULL, mpage);
+}
+
+static void
popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data)
{
MeetingPage *mpage = data;
@@ -880,11 +900,8 @@ enum {
};
static EPopupItem context_menu_items[] = {
-#if 0
- { E_POPUP_ITEM, "00.delegate", N_("_Delegate To..."), popup_delegate_cb, NULL, NULL, CAN_DELEGATE },
- { E_POPUP_BAR, "05.bar" },
-#endif
{ E_POPUP_ITEM, "10.delete", N_("_Remove"), popup_delete_cb, NULL, GTK_STOCK_REMOVE, CAN_DELETE },
+ { E_POPUP_ITEM, "15.add", N_("_Add "), popup_add_cb, NULL, GTK_STOCK_ADD},
};
static void
@@ -914,24 +931,25 @@ button_press_event (GtkWidget *widget, G
return FALSE;
/* only if we right-click on an attendee */
- if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->list_view), event->x, event->y, &path, NULL, NULL, NULL))
- return FALSE;
- if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path))
- return FALSE;
-
- gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
- ia = e_meeting_store_find_attendee (priv->model, address, &priv->row);
- g_free (address);
- if (!ia)
- return FALSE;
-
- if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
- disable_mask = CAN_DELETE;
+ if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->list_view), event->x, event->y, &path, NULL, NULL, NULL)) {
+ if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path))
+ return FALSE;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
+ ia = e_meeting_store_find_attendee (priv->model, address, &priv->row);
+ g_free (address);
+ if (!ia)
+ return FALSE;
+
+ if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
+ disable_mask = CAN_DELETE;
+ }
ep = e_cal_popup_new("org.gnome.evolution.calendar.meeting.popup");
+
for (i=0;i<sizeof(context_menu_items)/sizeof(context_menu_items[0]);i++)
menus = g_slist_prepend(menus, &context_menu_items[i]);
-
+
e_popup_add_items((EPopup *)ep, menus, NULL, context_popup_free, mpage);
menu = e_popup_create_menu_once((EPopup *)ep, NULL, disable_mask);
gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
@@ -939,6 +957,45 @@ button_press_event (GtkWidget *widget, G
return TRUE;
}
+static gboolean
+list_view_event (EMeetingListView *list_view, GdkEvent *event, MeetingPage *mpage) {
+
+ MeetingPagePrivate *priv= mpage->priv;
+
+ if (event->type == GDK_2BUTTON_PRESS) {
+ EMeetingAttendee *attendee;
+
+ attendee = e_meeting_store_add_attendee_with_defaults (priv->model);
+
+ if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_PAGE_DELEGATE) {
+ e_meeting_attendee_set_delfrom (attendee, g_strdup_printf ("MAILTO:%s", mpage->priv->user_add));
+ }
+
+ e_meeting_list_view_edit (mpage->priv->list_view, attendee);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+static gboolean
+list_key_press (EMeetingListView *list_view, GdkEventKey *event, MeetingPage *mpage)
+{
+ if (event->keyval == GDK_Delete) {
+ MeetingPagePrivate *priv;
+
+ priv = mpage->priv;
+ remove_clicked_cb (NULL, mpage);
+
+ return TRUE;
+ } else if (event->keyval == GDK_Insert) {
+ add_clicked_cb (NULL, mpage);
+ }
+
+ return FALSE;
+}
+
/**
* meeting_page_construct:
* @mpage: An task details page.
@@ -959,6 +1016,7 @@ meeting_page_construct (MeetingPage *mpa
GList *address_strings = NULL, *l;
GtkWidget *sw;
EAccount *a;
+ GtkTreeSelection *selection;
priv = mpage->priv;
@@ -1022,11 +1080,15 @@ meeting_page_construct (MeetingPage *mpa
priv->model = ems;
priv->list_view = e_meeting_list_view_new (priv->model);
+ selection = gtk_tree_view_get_selection (priv->list_view);
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
+
g_signal_connect (G_OBJECT (priv->list_view), "button_press_event", G_CALLBACK (button_press_event), mpage);
+ g_signal_connect (G_OBJECT (priv->list_view), "event", G_CALLBACK (list_view_event), mpage);
gtk_widget_show (GTK_WIDGET (priv->list_view));
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_widget_show (sw);
gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list_view));
@@ -1040,6 +1102,7 @@ meeting_page_construct (MeetingPage *mpa
g_signal_connect_after (G_OBJECT (mpage), "client_changed",
G_CALLBACK (client_changed_cb), NULL);
+ g_signal_connect (priv->list_view, "key_press_event", list_key_press, mpage);
return mpage;
}
Index: calendar/gui/dialogs/meeting-page.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/meeting-page.glade,v
retrieving revision 1.15
diff -u -p -r1.15 meeting-page.glade
--- calendar/gui/dialogs/meeting-page.glade 6 Jun 2005 21:05:18 -0000 1.15
+++ calendar/gui/dialogs/meeting-page.glade 5 Oct 2005 12:17:33 -0000
@@ -329,7 +329,7 @@
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes">Con_tacts...</property>
+ <property name="label" translatable="yes">Co_ntacts...</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
Index: calendar/gui/dialogs/task-details-page.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-details-page.glade,v
retrieving revision 1.22
diff -u -p -r1.22 task-details-page.glade
--- calendar/gui/dialogs/task-details-page.glade 3 Feb 2005 13:50:38 -0000 1.22
+++ calendar/gui/dialogs/task-details-page.glade 5 Oct 2005 12:17:40 -0000
@@ -83,7 +83,7 @@
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Status:</property>
+ <property name="label" translatable="yes">Stat_us:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
Index: calendar/gui/dialogs/task-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-editor.c,v
retrieving revision 1.85
diff -u -p -r1.85 task-editor.c
--- calendar/gui/dialogs/task-editor.c 29 Sep 2005 13:02:56 -0000 1.85
+++ calendar/gui/dialogs/task-editor.c 5 Oct 2005 12:17:43 -0000
@@ -134,7 +134,7 @@ task_editor_construct (TaskEditor *te, E
gtk_object_sink (GTK_OBJECT (priv->task_page));
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_page),
- _("Task"));
+ _("_Task"));
g_signal_connect (G_OBJECT (priv->task_page), "client_changed",
G_CALLBACK (client_changed_cb), te);
@@ -143,7 +143,7 @@ task_editor_construct (TaskEditor *te, E
gtk_object_sink (GTK_OBJECT (priv->task_details_page));
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_details_page),
- _("Status"));
+ _("_Status"));
if (!e_cal_is_read_only (client, &read_only, NULL))
read_only = TRUE;
@@ -158,7 +158,7 @@ task_editor_construct (TaskEditor *te, E
gtk_object_sink (GTK_OBJECT (priv->meet_page));
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
+ _("Assig_nment"));
}
comp_editor_set_e_cal (COMP_EDITOR (te), client);
@@ -220,7 +220,7 @@ task_editor_edit_comp (CompEditor *edito
if (!priv->assignment_shown)
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
+ _("Assig_nment"));
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *ca = l->data;
@@ -377,7 +377,7 @@ show_assignment (TaskEditor *te)
if (!priv->assignment_shown) {
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
+ _("Assig_nment"));
priv->assignment_shown = TRUE;
comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown);
Index: calendar/gui/dialogs/task-page.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-page.glade,v
retrieving revision 1.37
diff -u -p -r1.37 task-page.glade
--- calendar/gui/dialogs/task-page.glade 3 Feb 2005 13:50:38 -0000 1.37
+++ calendar/gui/dialogs/task-page.glade 5 Oct 2005 12:17:44 -0000
@@ -250,7 +250,7 @@
<widget class="GtkButton" id="categories-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Ca_tegories...</property>
+ <property name="label" translatable="yes">Categor_ies...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
Index: ui/evolution-addressbook.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-addressbook.xml,v
retrieving revision 1.69
diff -u -p -r1.69 evolution-addressbook.xml
--- ui/evolution-addressbook.xml 5 Aug 2005 10:28:32 -0000 1.69
+++ ui/evolution-addressbook.xml 5 Oct 2005 12:19:21 -0000
@@ -59,9 +59,9 @@
_tip="Move Selected Contacts to Another Folder..."
accel="*Control**Shift*v"/>
- <cmd name="ContactsViewPreview" _label="_Preview Pane"
+ <cmd name="ContactsViewPreview" _label="Contact _Preview"
_tip="Show contact preview window"
- accel="*Control*grave"
+ accel="*Control**Alt*v"
type="toggle"/>
</commands>
@@ -84,7 +84,7 @@
</submenu>
<submenu name="View" _label="_View">
- <menuitem name="ContactsViewPreview" verb="" _label="_Preview Pane"/>
+ <menuitem name="ContactsViewPreview" verb="" _label="Contact _Preview"/>
</submenu>
<submenu name="Edit" _label="_Edit">
Index: ui/evolution-mail-global.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-mail-global.xml,v
retrieving revision 1.34
diff -u -p -r1.34 evolution-mail-global.xml
--- ui/evolution-mail-global.xml 17 Aug 2005 14:35:32 -0000 1.34
+++ ui/evolution-mail-global.xml 5 Oct 2005 12:19:21 -0000
@@ -33,7 +33,7 @@
<cmd name="ViewPreview"
_tip="Show message preview window"
- accel="*Control*m"
+ accel="*Control**Alt*v"
type="toggle"/>
</commands>
Index: ui/evolution-tasks.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-tasks.xml,v
retrieving revision 1.38
diff -u -p -r1.38 evolution-tasks.xml
--- ui/evolution-tasks.xml 25 Jul 2005 07:53:17 -0000 1.38
+++ ui/evolution-tasks.xml 5 Oct 2005 12:19:21 -0000
@@ -15,6 +15,9 @@
<cmd name="TasksPurge" _label="Purg_e" _tip="Delete completed tasks" accel="*Control*e"/>
<cmd name="TasksAssign" _label="_Assign Task" accel="*Control*a"/>
<cmd name="TasksForward" _label="_Forward as iCalendar" accel="*Control*f"/>
+
+ <cmd name="ViewPreview" _tip="Show task preview window" accel="*Control**Alt*v" type="toggle"/>
+
</commands>
<menu>
@@ -43,6 +46,12 @@
<separator/>
<menuitem name="TasksMarkComplete" verb="" _label="Mar_k as Complete"/>
+ </placeholder>
+ </submenu>
+
+ <submenu name="View" _label="_View">
+ <placeholder name="ViewPreview">
+ <menuitem name="ViewPreview" verb="" _label="Task _Preview"/>
</placeholder>
</submenu>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]