aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-07-26 23:35:36 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-07-26 23:35:36 +0800
commitfd77100a729e5576f987e80473c60e0780ce0a34 (patch)
tree7534b89812ed26df32c5fbbebff8cc84dedb8404 /calendar/gui
parentef076f8049145118bd8d19bc29367681e2dafa9f (diff)
downloadgsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar.gz
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar.bz2
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar.lz
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar.xz
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.tar.zst
gsoc2013-evolution-fd77100a729e5576f987e80473c60e0780ce0a34.zip
set a different title if we are editing; de-sensitize option menu if we
2004-07-26 JP Rosevear <jpr@novell.com> * gui/dialogs/calendar-setup.c (calendar_setup_edit_calendar): set a different title if we are editing; de-sensitize option menu if we are editing (calendar_setup_edit_task_list): set a different title if we are editing * gui/dialogs/calendar-setup.glade: use task list instead of tasks group * gui/tasks-component.c (impl__get_userCreatableItems): add assigned task as an item, use task list instead of tasks group * gui/calendar--component.c (impl__get_userCreatableItems): fiddle with shortcuts svn path=/trunk/; revision=26735
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-component.c4
-rw-r--r--calendar/gui/dialogs/calendar-setup.c7
-rw-r--r--calendar/gui/dialogs/calendar-setup.glade2
-rw-r--r--calendar/gui/tasks-component.c43
4 files changed, 37 insertions, 19 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 80e921803b..b0b3af2480 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -1252,9 +1252,9 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[2].id = CREATE_ALLDAY_EVENT_ID;
list->_buffer[2].description = _("New all day appointment");
- list->_buffer[2].menuDescription = _("All _Day Appointment");
+ list->_buffer[2].menuDescription = _("All Day A_ppointment");
list->_buffer[2].tooltip = _("Create a new all-day appointment");
- list->_buffer[2].menuShortcut = 'd';
+ list->_buffer[2].menuShortcut = 'p';
list->_buffer[2].iconName = "stock_new-24h-appointment";
list->_buffer[2].type = GNOME_Evolution_CREATABLE_OBJECT;
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 15a150b7de..213d0ac20f 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -657,11 +657,12 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source)
source_dialog->window = glade_xml_get_widget (source_dialog->gui_xml, "add-calendar-window");
if (source) {
+ gtk_window_set_title (GTK_WINDOW (source_dialog->window), "Calendar Properties");
source_dialog->source = source;
source_dialog->source_group = e_source_peek_group (source);
g_object_ref (source);
}
-
+
g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
source_dialog->name_entry = glade_xml_get_widget (source_dialog->gui_xml, "name-entry");
@@ -676,6 +677,7 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source)
gtk_option_menu_set_menu (GTK_OPTION_MENU (source_dialog->group_optionmenu), menu);
gtk_widget_show (menu);
}
+ gtk_widget_set_sensitive (source_dialog->group_optionmenu, source == NULL);
/* NOTE: This assumes that we have sources. If they don't exist, they're set up
* on startup of the calendar component. */
@@ -783,10 +785,11 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source)
source_dialog->window = glade_xml_get_widget (source_dialog->gui_xml, "add-task-list-window");
if (source) {
+ gtk_window_set_title (GTK_WINDOW (source_dialog->window), "Task List Properties");
source_dialog->source = source;
source_dialog->source_group = e_source_peek_group (source);
g_object_ref (source);
- }
+ }
g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
diff --git a/calendar/gui/dialogs/calendar-setup.glade b/calendar/gui/dialogs/calendar-setup.glade
index a625828157..4a59f20b72 100644
--- a/calendar/gui/dialogs/calendar-setup.glade
+++ b/calendar/gui/dialogs/calendar-setup.glade
@@ -462,7 +462,7 @@
</widget>
<widget class="GtkWindow" id="add-task-list-window">
- <property name="title" translatable="yes">Add Tasks Group</property>
+ <property name="title" translatable="yes">Add Task List</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index dc87020592..b3eb57995f 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -49,8 +49,9 @@
#include "widgets/misc/e-info-label.h"
#include "e-util/e-icon-factory.h"
-#define CREATE_TASK_ID "task"
-#define CREATE_TASK_LIST_ID "task-list"
+#define CREATE_TASK_ID "task"
+#define CREATE_TASK_ASSIGNED_ID "task-assigned"
+#define CREATE_TASK_LIST_ID "task-list"
enum DndTargetType {
DND_TARGET_TYPE_CALENDAR_LIST,
@@ -783,13 +784,12 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view
}
static gboolean
-create_new_todo (TasksComponent *task_component, TasksComponentView *component_view)
+create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComponentView *component_view)
{
ECal *ecal;
TasksComponentPrivate *priv;
ECalComponent *comp;
TaskEditor *editor;
- gboolean read_only;
priv = task_component->priv;
@@ -801,6 +801,8 @@ create_new_todo (TasksComponent *task_component, TasksComponentView *component_v
comp = cal_comp_task_new_with_defaults (ecal);
comp_editor_edit_comp (COMP_EDITOR (editor), comp);
+ if (is_assigned)
+ task_editor_show_assignment (editor);
comp_editor_focus (COMP_EDITOR (editor));
e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
@@ -828,7 +830,9 @@ create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type
}
if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
- create_new_todo (tasks_component, component_view);
+ create_new_todo (tasks_component, FALSE, component_view);
+ } else if (strcmp (item_type_name, CREATE_TASK_ASSIGNED_ID) == 0) {
+ create_new_todo (tasks_component, TRUE, component_view);
} else if (strcmp (item_type_name, CREATE_TASK_LIST_ID) == 0) {
calendar_setup_new_task_list (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (component_view->tasks))));
}
@@ -1028,7 +1032,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
{
GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
- list->_length = 2;
+ list->_length = 3;
list->_maximum = list->_length;
list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
@@ -1042,13 +1046,21 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[0].iconName = "stock_task";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
- list->_buffer[1].id = CREATE_TASK_LIST_ID;
- list->_buffer[1].description = _("New tasks group");
- list->_buffer[1].menuDescription = _("Tasks Gro_up");
- list->_buffer[1].tooltip = _("Create a new tasks group");
- list->_buffer[1].menuShortcut = 'u';
- list->_buffer[1].iconName = "stock_todo";
- list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER;
+ list->_buffer[1].id = CREATE_TASK_ASSIGNED_ID;
+ list->_buffer[1].description = _("New assigned task");
+ list->_buffer[1].menuDescription = _("Assigne_d Task");
+ list->_buffer[1].tooltip = _("Create a new assigned task");
+ list->_buffer[1].menuShortcut = 'd';
+ list->_buffer[1].iconName = "stock_task";
+ list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
+
+ list->_buffer[2].id = CREATE_TASK_LIST_ID;
+ list->_buffer[2].description = _("New task list");
+ list->_buffer[2].menuDescription = _("Task l_ist");
+ list->_buffer[2].tooltip = _("Create a new task list");
+ list->_buffer[2].menuShortcut = 'i';
+ list->_buffer[2].iconName = "stock_todo";
+ list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
}
@@ -1064,7 +1076,10 @@ impl_requestCreateItem (PortableServer_Servant servant,
priv = tasks_component->priv;
if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
- if (!create_new_todo (tasks_component, NULL))
+ if (!create_new_todo (tasks_component, FALSE, NULL))
+ bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
+ } else if (strcmp (item_type_name, CREATE_TASK_ASSIGNED_ID) == 0) {
+ if (!create_new_todo (tasks_component, TRUE, NULL))
bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
} else if (strcmp (item_type_name, CREATE_TASK_LIST_ID) == 0) {
/* FIXME Should we use the last opened window? */