aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-03 16:07:17 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-03 16:07:17 +0800
commit1be7718e7d14edf3b4501de53fd600af1a53a156 (patch)
treebedf46615b2eb87a2942bec7185479b198e62490
parente2fbfd581d4bfc223f50af93fb48667e78f4398d (diff)
downloadgsoc2013-evolution-1be7718e7d14edf3b4501de53fd600af1a53a156.tar.gz
gsoc2013-evolution-1be7718e7d14edf3b4501de53fd600af1a53a156.tar.zst
gsoc2013-evolution-1be7718e7d14edf3b4501de53fd600af1a53a156.zip
More work. Weee! -mig
svn path=/trunk/; revision=102
-rw-r--r--calendar/eventedit.c92
-rw-r--r--calendar/gui/eventedit.c92
2 files changed, 132 insertions, 52 deletions
diff --git a/calendar/eventedit.c b/calendar/eventedit.c
index 26616f06a0..ba821e1d41 100644
--- a/calendar/eventedit.c
+++ b/calendar/eventedit.c
@@ -92,25 +92,46 @@ event_editor_setup_time_frame (EventEditor *ee)
return frame;
}
+enum {
+ ALARM_MAIL,
+ ALARM_PROGRAM,
+ ALARM_DISPLAY,
+ ALARM_AUDIO
+};
+
+#define FX GTK_FILL | GTK_EXPAND
+#define XCOL 6
static GtkWidget *
-ee_single_alarm (char *text, CalendarAlarm **alarm, void *x)
+ee_create_ae (GtkTable *table, char *str, CalendarAlarm **alarm, int type, int y)
{
- GtkWidget *hbox;
- GtkWidget *check;
- GtkWidget *entry;
+ GtkWidget *label, *entry;
- hbox = gtk_hbox_new (0, 0);
+ label = gtk_check_button_new_with_label (str);
+ gtk_table_attach (table, label, 2, 3, y, y+1, FX, 0, 0, 0);
- check = gtk_check_button_new_with_label (text);
entry = gtk_entry_new ();
gtk_widget_set_usize (entry, 40, 0);
- gtk_box_pack_start (GTK_BOX (hbox), check, 0, 0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), entry, 0, 0, 0);
-
- return hbox;
+ gtk_table_attach (table, entry, 3, 4, y, y+1, FX, 0, 5, 0);
+
+ switch (type){
+ case ALARM_MAIL:
+ label = gtk_label_new (_("Mail to:"));
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+ gtk_table_attach (table, label, XCOL, XCOL+1, y, y+1, FX, 0, 5, 0);
+ entry = gtk_entry_new ();
+ gtk_table_attach (table, entry, XCOL+1, XCOL+2, y, y+1, FX, 0, 6, 0);
+ break;
+
+ case ALARM_PROGRAM:
+ label = gtk_label_new (_("Run program:"));
+ gtk_table_attach (table, label, XCOL, XCOL+1, y, y+1, FX, 0, 5, 0);
+ entry = gnome_file_entry_new ("alarm-program", _("Select program to run at alarm time"));
+ gtk_table_attach (table, entry, XCOL+1, XCOL+2, y, y+1, 0, 0, 6, 0);
+ break;
+ }
+
}
-#define FX GTK_FILL | GTK_EXPAND
static GtkWidget *
ee_alarm_widgets (EventEditor *ee)
{
@@ -124,22 +145,36 @@ ee_alarm_widgets (EventEditor *ee)
mailto = gtk_label_new (_("Mail to:"));
mailte = gtk_entry_new ();
- dalarm = gtk_check_button_new_with_label (_("Display"));
- aalarm = gtk_check_button_new_with_label (_("Audio"));
- palarm = gtk_check_button_new_with_label (_("Program"));
- malarm = gtk_check_button_new_with_label (_("Mail"));
-
- gtk_table_attach (GTK_TABLE (table), dalarm, 2, 3, 1, 2, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), aalarm, 2, 3, 2, 3, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), palarm, 2, 3, 3, 4, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), malarm, 2, 3, 4, 5, FX, 0, 0, 0);
-#if 0
- gtk_table_attach (GTK_TABLE (table), mailto, 1, 2, 5, 6, 0, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), mailte, 1, 2, 5, 6, 0, 0, 0, 0);
-#endif
+
+ ee_create_ae (GTK_TABLE (table), _("Display"), &ee->ical->dalarm, ALARM_DISPLAY, 1);
+ ee_create_ae (GTK_TABLE (table), _("Audio"), &ee->ical->dalarm, ALARM_AUDIO, 2);
+ ee_create_ae (GTK_TABLE (table), _("Program"), &ee->ical->dalarm, ALARM_PROGRAM, 3);
+ ee_create_ae (GTK_TABLE (table), _("Mail"), &ee->ical->dalarm, ALARM_MAIL, 4);
+
return l;
}
+static GtkWidget *
+ee_classification_widgets (EventEditor *ee)
+{
+ GtkWidget *rpub, *rpriv, *conf;
+ GtkWidget *frame, *hbox;
+
+ frame = gtk_frame_new (_("Classification"));
+ hbox = gtk_hbox_new (0, 0);
+ gtk_container_add (GTK_CONTAINER (frame), hbox);
+
+ rpub = gtk_radio_button_new_with_label (NULL, _("Public"));
+ rpriv = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Private"));
+ conf = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Confidential"));
+
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), rpub);
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), rpriv);
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), conf);
+
+ return frame;
+}
+
static void
ee_ok (GtkWidget *widget, EventEditor *ee)
{
@@ -187,7 +222,8 @@ enum {
DESC_LINE,
SUMMARY_LINE,
TIME_LINE = 4,
- ALARM_LINE
+ ALARM_LINE,
+ CLASS_LINE = 8
};
#define LABEL_SPAN 2
@@ -237,7 +273,11 @@ event_editor_init_widgets (EventEditor *ee)
gtk_table_attach (ee->general_table, l,
1, 40, ALARM_LINE, ALARM_LINE + 1,
0, 0, 0, 0);
-
+
+ l = ee_classification_widgets (ee);
+ gtk_table_attach (ee->general_table, l,
+ 1, 40, CLASS_LINE, CLASS_LINE + 1,
+ 0, 0, 0, 0);
/* Separator */
gtk_box_pack_start (GTK_BOX (ee->hbox), gtk_hseparator_new (), 1, 1, 0);
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index 26616f06a0..ba821e1d41 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -92,25 +92,46 @@ event_editor_setup_time_frame (EventEditor *ee)
return frame;
}
+enum {
+ ALARM_MAIL,
+ ALARM_PROGRAM,
+ ALARM_DISPLAY,
+ ALARM_AUDIO
+};
+
+#define FX GTK_FILL | GTK_EXPAND
+#define XCOL 6
static GtkWidget *
-ee_single_alarm (char *text, CalendarAlarm **alarm, void *x)
+ee_create_ae (GtkTable *table, char *str, CalendarAlarm **alarm, int type, int y)
{
- GtkWidget *hbox;
- GtkWidget *check;
- GtkWidget *entry;
+ GtkWidget *label, *entry;
- hbox = gtk_hbox_new (0, 0);
+ label = gtk_check_button_new_with_label (str);
+ gtk_table_attach (table, label, 2, 3, y, y+1, FX, 0, 0, 0);
- check = gtk_check_button_new_with_label (text);
entry = gtk_entry_new ();
gtk_widget_set_usize (entry, 40, 0);
- gtk_box_pack_start (GTK_BOX (hbox), check, 0, 0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), entry, 0, 0, 0);
-
- return hbox;
+ gtk_table_attach (table, entry, 3, 4, y, y+1, FX, 0, 5, 0);
+
+ switch (type){
+ case ALARM_MAIL:
+ label = gtk_label_new (_("Mail to:"));
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+ gtk_table_attach (table, label, XCOL, XCOL+1, y, y+1, FX, 0, 5, 0);
+ entry = gtk_entry_new ();
+ gtk_table_attach (table, entry, XCOL+1, XCOL+2, y, y+1, FX, 0, 6, 0);
+ break;
+
+ case ALARM_PROGRAM:
+ label = gtk_label_new (_("Run program:"));
+ gtk_table_attach (table, label, XCOL, XCOL+1, y, y+1, FX, 0, 5, 0);
+ entry = gnome_file_entry_new ("alarm-program", _("Select program to run at alarm time"));
+ gtk_table_attach (table, entry, XCOL+1, XCOL+2, y, y+1, 0, 0, 6, 0);
+ break;
+ }
+
}
-#define FX GTK_FILL | GTK_EXPAND
static GtkWidget *
ee_alarm_widgets (EventEditor *ee)
{
@@ -124,22 +145,36 @@ ee_alarm_widgets (EventEditor *ee)
mailto = gtk_label_new (_("Mail to:"));
mailte = gtk_entry_new ();
- dalarm = gtk_check_button_new_with_label (_("Display"));
- aalarm = gtk_check_button_new_with_label (_("Audio"));
- palarm = gtk_check_button_new_with_label (_("Program"));
- malarm = gtk_check_button_new_with_label (_("Mail"));
-
- gtk_table_attach (GTK_TABLE (table), dalarm, 2, 3, 1, 2, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), aalarm, 2, 3, 2, 3, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), palarm, 2, 3, 3, 4, FX, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), malarm, 2, 3, 4, 5, FX, 0, 0, 0);
-#if 0
- gtk_table_attach (GTK_TABLE (table), mailto, 1, 2, 5, 6, 0, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), mailte, 1, 2, 5, 6, 0, 0, 0, 0);
-#endif
+
+ ee_create_ae (GTK_TABLE (table), _("Display"), &ee->ical->dalarm, ALARM_DISPLAY, 1);
+ ee_create_ae (GTK_TABLE (table), _("Audio"), &ee->ical->dalarm, ALARM_AUDIO, 2);
+ ee_create_ae (GTK_TABLE (table), _("Program"), &ee->ical->dalarm, ALARM_PROGRAM, 3);
+ ee_create_ae (GTK_TABLE (table), _("Mail"), &ee->ical->dalarm, ALARM_MAIL, 4);
+
return l;
}
+static GtkWidget *
+ee_classification_widgets (EventEditor *ee)
+{
+ GtkWidget *rpub, *rpriv, *conf;
+ GtkWidget *frame, *hbox;
+
+ frame = gtk_frame_new (_("Classification"));
+ hbox = gtk_hbox_new (0, 0);
+ gtk_container_add (GTK_CONTAINER (frame), hbox);
+
+ rpub = gtk_radio_button_new_with_label (NULL, _("Public"));
+ rpriv = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Private"));
+ conf = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Confidential"));
+
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), rpub);
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), rpriv);
+ gtk_box_pack_start_defaults (GTK_BOX (hbox), conf);
+
+ return frame;
+}
+
static void
ee_ok (GtkWidget *widget, EventEditor *ee)
{
@@ -187,7 +222,8 @@ enum {
DESC_LINE,
SUMMARY_LINE,
TIME_LINE = 4,
- ALARM_LINE
+ ALARM_LINE,
+ CLASS_LINE = 8
};
#define LABEL_SPAN 2
@@ -237,7 +273,11 @@ event_editor_init_widgets (EventEditor *ee)
gtk_table_attach (ee->general_table, l,
1, 40, ALARM_LINE, ALARM_LINE + 1,
0, 0, 0, 0);
-
+
+ l = ee_classification_widgets (ee);
+ gtk_table_attach (ee->general_table, l,
+ 1, 40, CLASS_LINE, CLASS_LINE + 1,
+ 0, 0, 0, 0);
/* Separator */
gtk_box_pack_start (GTK_BOX (ee->hbox), gtk_hseparator_new (), 1, 1, 0);
'commitgraph'>* While portmaster will rebuild if asked, portupgrade needs to be forced to domat2014-12-181-1/+1 * Fix packaging as a user (the Makefile was trying to modify LOCALBASE)bapt2014-12-182-2/+15 * Update to 0.5.9.kwm2014-12-183-21/+28 * Convert to USES=fakerootbapt2014-12-182-407/+363 * Fix packaging as a userbapt2014-12-182-3/+2 * Fix packaging as a userbapt2014-12-172-3/+2 * Update benchmarks/iperf3 to 3.0.10.bmah2014-12-172-3/+3 * Fix packaging as userbapt2014-12-171-1/+1 * Correct the latest portmaster instructions.mat2014-12-171-1/+1 * Fix packaging as a userbapt2014-12-171-0/+1 * Update openssh entry to note LPK removalbdrewery2014-12-171-1/+4 * Fix packaging as a userbapt2014-12-171-1/+1 * Fix build as userbapt2014-12-171-0/+2 * - Mark IGNORE on 9.0-9.2 due to build failureszi2014-12-172-6/+13 * Add USES=fakeroot to allow packaging ports that are not stageable as a userbapt2014-12-172-1/+18 * Does not actually need root at allbapt2014-12-172-3/+0 * Make Perl link all .so it builds with libperl.so.mat2014-12-1712-27/+148 * - Strip binaryamdmi32014-12-171-0/+3 * Avoid defining do-install if NO_INSTALL is definedbapt2014-12-171-7/+1 * Retire BSDPAN.mat2014-12-178-124/+12 * chmod +r the metadata.json file since 0600 is not usefull for a data file.kwm2014-12-171-3/+5 * sysutils/rsnapshot: unbreak with Perl 5.18xmj2014-12-172-8/+16 * www/qooxdoo: 4.0.1 -> 4.1pi2014-12-172-11/+13 * graphics/linux-c6-sdl_ttf: Update to 2.0.11-6.el6xmj2014-12-173-11/+6 * devel/poco-devel: update 1.5.3 -> 1.5.4robak2014-12-176-76/+91 * 1. Enable kqueue support (you still need to st_set_eventsys(ST_EVENTSYS_ALT)tobez2014-12-173-3/+25 * Simple integration of Flask and WTForms, including CSRF, file uploadrm2014-12-17