rendered paste bodyIndex: src/html.c
===================================================================
RCS file: /cvsroot/bluefish/bluefish-gtk2/src/Attic/html.c,v
retrieving revision 1.44.2.1
diff -u -r1.44.2.1 html.c
--- src/html.c 30 May 2005 20:48:40 -0000 1.44.2.1
+++ src/html.c 29 Jun 2005 20:07:18 -0000
@@ -325,8 +325,8 @@
/* time insert struct */
typedef struct {
- GtkWidget *check[6];
- GtkWidget *label[6];
+ GtkWidget *check[8];
+ GtkWidget *label[8];
GtkWidget *dialog;
Tbfwin *bfwin;
} TimeInsert;
@@ -347,7 +347,7 @@
insert_string = g_malloc0(32);
final_string = g_malloc0(255);
- for (count = 1; count < 6; count++) {
+ for (count = 1; count < 8; count++) {
if (GTK_TOGGLE_BUTTON(timeinsert->check[count])->active) {
gtk_label_get(GTK_LABEL(timeinsert->label[count]), &temp_string);
insert_string = extract_time_string(temp_string);
@@ -378,6 +378,7 @@
void insert_time_dialog(Tbfwin *bfwin) {
gint month, year, count;
+ gchar isotime[60];
time_t time_var;
gchar *temp = NULL;
struct tm *time_struct;
@@ -394,7 +395,7 @@
vbox = gtk_vbox_new(FALSE, 1);
gtk_container_add(GTK_CONTAINER(timeinsert->dialog), vbox);
- for (count = 1; count < 6; count++) {
+ for (count = 1; count < 8; count++) {
switch (count) {
case 1:
temp = g_strdup_printf(_(" _Time (%i:%i:%i)"), time_struct->tm_hour, time_struct->tm_min, time_struct->tm_sec);
@@ -441,6 +442,14 @@
/* Replace \n on ')' */
temp[strlen(temp) - 1] = ')';
break;
+ case 6:
+ strftime(isotime, 40, "%a, %d %b %Y %H:%M:%S %Z", time_struct);
+ temp = g_strdup_printf(_(" _RFC 822 Time (%s)"), isotime);
+ break;
+ case 7:
+ strftime(isotime, 30, "%Y-%m-%dT%H:%M:%S%z", time_struct);
+ temp = g_strdup_printf(_(" _ISO-8601 Time (%s)"), isotime);
+ break;
default:
break;
} /* end of switch count */