aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-06-26 01:35:55 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-06-26 01:35:55 +0800
commit6a4275e077299ac5e9ea8bed23787ae73c73043a (patch)
tree23f49ff3a63c45a38ae1f1b6aad6107e34798be9
parent71bd5f404a73118c52c8c3a149b1984083a48c62 (diff)
downloadgsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar.gz
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar.bz2
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar.lz
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar.xz
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.tar.zst
gsoc2013-evolution-6a4275e077299ac5e9ea8bed23787ae73c73043a.zip
use "Contacts..."
2004-06-25 JP Rosevear <jpr@novell.com> * gui/dialogs/e-delegate-dialog.glade: use "Contacts..." * gui/dialogs/alarm-dialog.glade: add custom message email toggle * gui/dialogs/alarm-dialog.c (get_widgets): get custom email message toggle (check_custom_email): check the custom message when setting sensitivity of OK button (malarm_message_toggled_cb): check custom email (malarm_description_changed_cb): ditto (action_selection_done_cb): ditto svn path=/trunk/; revision=26517
-rw-r--r--calendar/ChangeLog17
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c42
-rw-r--r--calendar/gui/dialogs/alarm-dialog.glade140
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.glade2
4 files changed, 155 insertions, 46 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c16f49a06f..fc5358765f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,10 +1,25 @@
2004-06-25 JP Rosevear <jpr@novell.com>
+ * gui/dialogs/e-delegate-dialog.glade: use "Contacts..."
+
+ * gui/dialogs/alarm-dialog.glade: add custom message email toggle
+
+ * gui/dialogs/alarm-dialog.c (get_widgets): get custom email
+ message toggle
+ (check_custom_email): check the custom message when setting
+ sensitivity of OK button
+ (malarm_message_toggled_cb): check custom email
+ (malarm_description_changed_cb): ditto
+ (action_selection_done_cb): ditto
+
+2004-06-25 JP Rosevear <jpr@novell.com>
+
* gui/dialogs/alarm-dialog.c (alarm_to_dialog): set the default
address here if possible
(dialog_to_alarm): don't set it here
(check_custom_email): check for To: entries
- (malarm_addresses_changed_cb): update when the text in the to entry changes
+ (malarm_addresses_changed_cb): update when the text in the to
+ entry changes
(action_selection_done_cb): for the custom email settings
(init_widgets): listen for email To: changes
(alarm_dialog_run): only save the alarm if the response was "OK"
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index b243453d89..6365009e14 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -103,6 +103,7 @@ typedef struct {
GtkWidget *malarm_address_group;
GtkWidget *malarm_addresses;
GtkWidget *malarm_addressbook;
+ GtkWidget *malarm_message;
GtkWidget *malarm_description;
GNOME_Evolution_Addressbook_SelectNames corba_select_names;
@@ -190,6 +191,7 @@ clear_widgets (Dialog *dialog)
gtk_widget_set_sensitive (dialog->repeat_group, FALSE);
gtk_widget_set_sensitive (dialog->dalarm_group, FALSE);
gtk_widget_set_sensitive (dialog->aalarm_group, FALSE);
+ gtk_widget_set_sensitive (dialog->malarm_group, FALSE);
gtk_notebook_set_current_page (GTK_NOTEBOOK (dialog->option_notebook), 0);
}
@@ -370,6 +372,9 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
e_cal_component_free_attendee_list (attendee_list);
e_destination_freev (destv);
+ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->malarm_message)))
+ return;
+
/* Description */
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
@@ -550,6 +555,7 @@ get_widgets (Dialog *dialog)
dialog->malarm_group = GW ("malarm-group");
dialog->malarm_address_group = GW ("malarm-address-group");
dialog->malarm_addressbook = GW ("malarm-addressbook");
+ dialog->malarm_message = GW ("malarm-message");
dialog->malarm_description = GW ("malarm-description");
dialog->palarm_group = GW ("palarm-group");
@@ -578,6 +584,7 @@ get_widgets (Dialog *dialog)
&& dialog->malarm_group
&& dialog->malarm_address_group
&& dialog->malarm_addressbook
+ && dialog->malarm_message
&& dialog->malarm_description
&& dialog->palarm_group
&& dialog->palarm_program
@@ -765,6 +772,8 @@ static void
check_custom_email (Dialog *dialog)
{
char *str;
+ GtkTextBuffer *text_buffer;
+ GtkTextIter text_iter_start, text_iter_end;
EDestination **destv;
gboolean sens;
@@ -773,7 +782,12 @@ check_custom_email (Dialog *dialog)
destv = e_destination_importv (str);
g_free (str);
- sens = destv != NULL;
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
+ gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
+ gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
+ str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
+
+ sens = (destv != NULL) && (e_dialog_toggle_get (dialog->malarm_message) ? str && *str : TRUE);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens);
e_destination_freev (destv);
@@ -792,6 +806,26 @@ malarm_addresses_changed_cb (BonoboListener *listener,
}
static void
+malarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data)
+{
+ Dialog *dialog = data;
+ gboolean active;
+
+ active = gtk_toggle_button_get_active (toggle);
+
+ gtk_widget_set_sensitive (dialog->malarm_group, active);
+ check_custom_email (dialog);
+}
+
+static void
+malarm_description_changed_cb (GtkWidget *widget, gpointer data)
+{
+ Dialog *dialog = data;
+
+ check_custom_email (dialog);
+}
+
+static void
action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
{
Dialog *dialog = data;
@@ -865,6 +899,12 @@ init_widgets (Dialog *dialog)
G_CALLBACK (palarm_program_changed_cb), dialog);
/* Handle custom email */
+ g_signal_connect (G_OBJECT (dialog->malarm_message), "toggled",
+ G_CALLBACK (malarm_message_toggled_cb), dialog);
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
+ g_signal_connect (G_OBJECT (text_buffer), "changed",
+ G_CALLBACK (malarm_description_changed_cb), dialog);
+
cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (dialog->malarm_addresses));
pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade
index 3c1c47ae38..d1396ec776 100644
--- a/calendar/gui/dialogs/alarm-dialog.glade
+++ b/calendar/gui/dialogs/alarm-dialog.glade
@@ -562,7 +562,8 @@
<child>
<widget class="GtkNotebook" id="option-notebook">
<property name="visible">True</property>
- <property name="show_tabs">False</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
<property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
@@ -649,6 +650,7 @@
<property name="yalign">0</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">option-notebook</property>
</widget>
<packing>
<property name="left_attach">0</property>
@@ -950,7 +952,7 @@
<property name="spacing">0</property>
<child>
- <widget class="GtkVBox" id="malarm-group">
+ <widget class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
@@ -988,57 +990,109 @@
</child>
<child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message to Send</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <widget class="GtkVBox" id="vbox27">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkTextView" id="malarm-description">
+ <widget class="GtkCheckButton" id="malarm-message">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
+ <property name="label" translatable="yes">Custom _message</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="malarm-group">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <property name="visible">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="malarm-description">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Mes_sage:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">option-notebook</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
diff --git a/calendar/gui/dialogs/e-delegate-dialog.glade b/calendar/gui/dialogs/e-delegate-dialog.glade
index f08c03ad1d..af24ca2b63 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.glade
+++ b/calendar/gui/dialogs/e-delegate-dialog.glade
@@ -88,7 +88,7 @@
<widget class="GtkButton" id="addressbook">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Addressbook...</property>
+ <property name="label" translatable="yes">Contacts...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
</widget>