aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-01-30 17:33:36 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-01-30 17:33:36 +0800
commit20d72f43f15e96ec4d90b14315909c7c5654b986 (patch)
tree7dd1729ac20119e9c628e24ba008225b9b2efe85 /calendar
parent0ba6389de0b801639fec724d97a5a04ba73613f6 (diff)
downloadgsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar.gz
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar.bz2
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar.lz
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar.xz
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.tar.zst
gsoc2013-evolution-20d72f43f15e96ec4d90b14315909c7c5654b986.zip
fixes #225816
svn path=/trunk/; revision=31353
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog16
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c31
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.glade19
3 files changed, 63 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 592e4133ef..5cfe74f80e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,19 @@
+2006-01-18 Johnny Jacob <johnnyjacob@gmail.com>
+
+ Fixes #225816
+ * gui/dialogs/alatm-list-dialog.glade : Added edit button.
+ * gui/dialogs/alarm-list-dialog.c (init_widgets), (get_widgets) :
+ Get and connect signals for edit button.
+ (sensitize_buttons) : Handle the sesitivity of edit button.
+ (edit_clicked_cb) : Added. Handle edit button click event.
+ * gui/dialogs/alarm-dialogs.c (populate_widgets) : Added. Extract data
+ from alarm and fill in the widgets.
+ (alarm_to_repeat_widgets): Added. Alarm data to repeat widgets.
+ (alarm_to_aalarm_widgets): Added. Alarm data to audio alarm widgets.
+ (alarm_to_dalarm_widgets): Added. Alarm data to display alarm widgets.
+ (alarm_to_palarm_widgets): Added. Alarm data to procedure alarm widgets.
+ (alarm_to_dialog): call populate_widgets.
+
2006-01-28 Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
** Fixes Bug #327347
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index f1cacfa159..9b365ca6a3 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -65,6 +65,7 @@ typedef struct {
GtkWidget *list;
GtkWidget *add;
+ GtkWidget *edit;
GtkWidget *delete;
GtkWidget *box;
@@ -83,12 +84,14 @@ get_widgets (Dialog *dialog)
dialog->box = GW ("vbox53");
dialog->list = GW ("list");
dialog->add = GW ("add");
+ dialog->edit = GW ("edit");
dialog->delete = GW ("delete");
#undef GW
return (dialog->list
&& dialog->add
+ && dialog->edit
&& dialog->delete);
}
@@ -114,6 +117,7 @@ sensitize_buttons (Dialog *dialog)
else
gtk_widget_set_sensitive (dialog->add, TRUE);
gtk_widget_set_sensitive (dialog->delete, have_selected && !read_only);
+ gtk_widget_set_sensitive (dialog->edit, have_selected && !read_only);
}
/* Callback used for the "add reminder" button */
@@ -146,6 +150,31 @@ add_clicked_cb (GtkButton *button, gpointer data)
sensitize_buttons (dialog);
}
+/* Callback used for the "edit reminder" button */
+static void
+edit_clicked_cb (GtkButton *button, gpointer data)
+{
+ Dialog *dialog = data;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ GtkTreePath *path;
+ ECalComponentAlarm *alarm;
+ GtkTreeView *view;
+
+ view = GTK_TREE_VIEW (dialog->list);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list));
+ if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ g_warning ("Could not get a selection to delete.");
+ return;
+ }
+
+ alarm = e_alarm_list_get_alarm (dialog->list_store, &iter);
+
+ if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm))
+ gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
+}
+
/* Callback used for the "delete reminder" button */
static void
delete_clicked_cb (GtkButton *button, gpointer data)
@@ -211,6 +240,8 @@ init_widgets (Dialog *dialog)
G_CALLBACK (add_clicked_cb), dialog);
g_signal_connect (dialog->delete, "clicked",
G_CALLBACK (delete_clicked_cb), dialog);
+ g_signal_connect (dialog->edit, "clicked",
+ G_CALLBACK (edit_clicked_cb), dialog);
g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list)), "changed",
G_CALLBACK (selection_changed_cb), dialog);
diff --git a/calendar/gui/dialogs/alarm-list-dialog.glade b/calendar/gui/dialogs/alarm-list-dialog.glade
index 7a0f9e75b9..779a30071a 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.glade
+++ b/calendar/gui/dialogs/alarm-list-dialog.glade
@@ -94,9 +94,6 @@
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
</widget>
</child>
</widget>
@@ -148,6 +145,10 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -198,6 +199,18 @@
<property name="focus_on_click">True</property>
</widget>
</child>
+
+ <child>
+ <widget class="GtkButton" id="edit">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-edit</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>