[evolution-patches] patch for review (45775)
- From: wu yang <Yang Wu sun com>
- To: Rodrigo Moya <rodrigo ximian com>
- Cc: evolution-patches ximian com, sceri-evolution-acc sun com
- Subject: [evolution-patches] patch for review (45775)
- Date: Tue, 19 Aug 2003 18:48:02 +0800
This patch is for evolution calendar keyboard navigation.
Bug#45775
in DayView, WeekView, Task: Alt+o, open the editing dialog for current
selected item
Thanks
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1851
diff -u -b -B -r1.1851 ChangeLog
--- ChangeLog 14 Aug 2003 07:16:14 -0000 1.1851
+++ ChangeLog 19 Aug 2003 10:43:17 -0000
@@ -1,3 +1,13 @@
+2003-08-19 Andrew Wu <Yang Wu sun com>
+
+ * gui/e-cal-view.c,e-cal-view.h
+ add a singal--"open_event", and bind it to "alt+o".
+ (e_cal_view_open_event):open a dialog to edit the selected event.
+
+ * gui/e-calendar-table.c
+ (e_calendar_table_on_key_press):"alt+o" to open a dialog
+ to edit the selected task.
+
2003-08-12 Hans Petter Jansson <hpj ximian com>
* gui/calendar-offline-handler.c (impl_dispose): Chain. Prevent
Index: gui/e-cal-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-view.c,v
retrieving revision 1.12
diff -u -b -B -r1.12 e-cal-view.c
--- gui/e-cal-view.c 8 Aug 2003 14:57:44 -0000 1.12
+++ gui/e-cal-view.c 19 Aug 2003 10:43:19 -0000
@@ -25,6 +25,8 @@
#include <string.h>
#include <gtk/gtkinvisible.h>
#include <gtk/gtkstock.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtkbindings.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include "e-util/e-dialog-utils.h"
@@ -74,7 +76,7 @@
static void e_cal_view_class_init (ECalViewClass *klass);
static void e_cal_view_init (ECalView *cal_view, ECalViewClass *klass);
static void e_cal_view_destroy (GtkObject *object);
-
+static void e_cal_view_open_event (ECalView *cal_view);
static GObjectClass *parent_class = NULL;
static GdkAtom clipboard_atom = GDK_NONE;
@@ -82,6 +84,7 @@
enum {
SELECTION_CHANGED,
TIMEZONE_CHANGED,
+ OPEN_EVENT,
LAST_SIGNAL
};
@@ -93,6 +96,8 @@
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GtkBindingSet *binding_set;
+
parent_class = g_type_class_peek_parent (klass);
/* Create class' signals */
@@ -112,6 +117,14 @@
NULL, NULL,
cal_util_marshal_VOID__POINTER_POINTER,
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+ e_cal_view_signals[OPEN_EVENT] =
+ g_signal_new ("open_event",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ECalViewClass, open_event),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
/* Method override */
object_class->destroy = e_cal_view_destroy;
@@ -122,10 +135,21 @@
klass->set_selected_time_range = NULL;
klass->get_visible_time_range = NULL;
klass->update_query = NULL;
+ klass->open_event = e_cal_view_open_event;
/* clipboard atom */
if (!clipboard_atom)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
+
+ /*
+ * Key bindings
+ */
+
+ binding_set = gtk_binding_set_by_class (klass);
+
+ gtk_binding_entry_add_signal (binding_set, GDK_o,
+ GDK_MOD1_MASK,
+ "open_event", 0);
}
static void
@@ -1184,3 +1208,20 @@
return popup;
}
+
+
+static void
+e_cal_view_open_event (ECalView *cal_view)
+{
+ GList *selected;
+
+ selected = e_cal_view_get_selected_events (cal_view);
+ if (selected) {
+ ECalViewEvent *event = (ECalViewEvent *) selected->data;
+
+ if (event)
+ gnome_calendar_edit_object (cal_view->priv->calendar, event->comp, FALSE);
+
+ g_list_free (selected);
+ }
+}
Index: gui/e-cal-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-view.h,v
retrieving revision 1.9
diff -u -b -B -r1.9 e-cal-view.h
--- gui/e-cal-view.h 24 Jul 2003 16:02:54 -0000 1.9
+++ gui/e-cal-view.h 19 Aug 2003 10:43:19 -0000
@@ -83,6 +83,7 @@
void (* set_selected_time_range) (ECalView *cal_view, time_t start_time, time_t end_time);
gboolean (* get_visible_time_range) (ECalView *cal_view, time_t *start_time, time_t *end_time);
void (* update_query) (ECalView *cal_view);
+ void (* open_event) (ECalView *cal_view);
};
GType e_cal_view_get_type (void);
Index: gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.94
diff -u -b -B -r1.94 e-calendar-table.c
--- gui/e-calendar-table.c 8 Aug 2003 14:57:44 -0000 1.94
+++ gui/e-calendar-table.c 19 Aug 2003 10:43:23 -0000
@@ -1215,6 +1215,10 @@
if (event->keyval == GDK_Delete) {
delete_cb (NULL, cal_table);
return TRUE;
+ } else if ((event->keyval == GDK_o)
+ &&(event->state & GDK_MOD1_MASK)) {
+ open_task_by_row (cal_table, row);
+ return TRUE;
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]