gnome_entry



I changed the gtk_entry in the send message window to be gnome_entry.
this makes the entries into history combo boxes saving the last entries
in the list.  included is a patch.  hopefully someone can commit it.

Mike



----------------------------------------------------------------------
And anyone can be tooted?

		-- Homer Simpson, on tutoring
		   The Way We Was
----------------------------------------------------------------------
--- balsa/src/sendmsg-window.c	Wed Dec 15 08:47:34 1999
+++ balsa-new/src/sendmsg-window.c	Wed Dec 15 19:52:52 1999
@@ -305,19 +305,19 @@
 		 GdkDragContext * context,
 		 gint x,
 		 gint y,
-		 GtkSelectionData * selection_data,
+	GtkSelectionData * selection_data,
 		 guint info,
 		 guint32 time,
 		 GnomeIconList * iconlist)
 {
 
-   if (strlen (gtk_entry_get_text (GTK_ENTRY(widget))) == 0)
+   if (strlen (gtk_entry_get_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))))) == 0)
    {
-      gtk_entry_set_text (GTK_ENTRY(widget), selection_data->data);
+      gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))), selection_data->data);
       return;
    } else {
-      gtk_entry_append_text (GTK_ENTRY(widget),",");
-      gtk_entry_append_text (GTK_ENTRY(widget),selection_data->data);
+      gtk_entry_append_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))),",");
+      gtk_entry_append_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))),selection_data->data);
    }
 }
 
@@ -340,7 +340,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->to = gtk_entry_new ();
+  msg->to = gnome_entry_new ("balsa_send_to");
   gtk_table_attach (GTK_TABLE (table), msg->to, 1, 2, 0, 1,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -395,7 +395,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->cc = gtk_entry_new ();
+  msg->cc = gnome_entry_new ("balsa_send_cc");
   gtk_table_attach (GTK_TABLE (table), msg->cc, 1, 2, 3, 4,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -420,7 +420,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->bcc = gtk_entry_new ();
+  msg->bcc = gnome_entry_new ("balsa_send_bcc");
   gtk_table_attach (GTK_TABLE (table), msg->bcc, 1, 2, 4, 5,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -608,7 +608,7 @@
 	addr = message->from;
 
       tmp = address_to_gchar (addr);
-      gtk_entry_set_text (GTK_ENTRY (msg->to), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->to))), tmp);
       g_free (tmp);
     }
     
@@ -687,17 +687,17 @@
 
     if (message->to_list) {
       tmp = make_string_from_list (message->to_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->to), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->to))), tmp);
       g_free (tmp);
     }
     if (message->cc_list) {
       tmp = make_string_from_list (message->cc_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->cc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
       g_free (tmp);
     }
     if (message->bcc_list) {
       tmp = make_string_from_list (message->bcc_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->bcc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->bcc))), tmp);
       g_free (tmp);
     }
     if (message->subject)
@@ -709,15 +709,15 @@
       gchar *tmp;
 
       tmp = make_string_from_list (message->to_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->cc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
       g_free (tmp);
 
       if (message->cc_list)
 	{
-	  gtk_entry_append_text (GTK_ENTRY (msg->cc), ", ");
+	  gtk_entry_append_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), ", ");
 
 	  tmp = make_string_from_list (message->cc_list);
-	  gtk_entry_append_text (GTK_ENTRY (msg->cc), tmp);
+	  gtk_entry_append_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
 	  g_free (tmp);
 	}
     }
@@ -820,7 +820,7 @@
   Body *body;
   gchar *tmp;
 
-  tmp = gtk_entry_get_text (GTK_ENTRY (bsmsg->to));
+  tmp = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to))));
   {
     size_t len;
     len = strlen (tmp);
@@ -849,9 +849,9 @@
   message->from->mailbox = g_strdup (balsa_app.address->mailbox);
   message->subject = g_strdup (gtk_entry_get_text (GTK_ENTRY (bsmsg->subject)));
 
-  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->to)));
-  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->cc)));
-  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->bcc)));
+  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to)))));
+  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->cc)))));
+  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->bcc)))));
   
   tmp = gtk_entry_get_text (GTK_ENTRY(GTK_COMBO(bsmsg->fcc)->entry));
   message->fcc_mailbox = NULL;
@@ -932,7 +932,7 @@
   Body *body;
   gchar *tmp;
 
-  tmp = gtk_entry_get_text (GTK_ENTRY (bsmsg->to));
+  tmp = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to))));
   {
     size_t len;
     len = strlen (tmp);
@@ -961,9 +961,9 @@
   message->from->mailbox = g_strdup (balsa_app.address->mailbox);
   message->subject = g_strdup (gtk_entry_get_text (GTK_ENTRY (bsmsg->subject)));
 
-  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->to)));
-  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->cc)));
-  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->bcc)));
+  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to)))));
+  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->cc)))));
+  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->bcc)))));
   
   message->reply_to = address_new ();
 
--- balsa/src/sendmsg-window.c	Wed Dec 15 08:47:34 1999
+++ balsa-new/src/sendmsg-window.c	Wed Dec 15 19:52:52 1999
@@ -305,19 +305,19 @@
 		 GdkDragContext * context,
 		 gint x,
 		 gint y,
-		 GtkSelectionData * selection_data,
+	GtkSelectionData * selection_data,
 		 guint info,
 		 guint32 time,
 		 GnomeIconList * iconlist)
 {
 
-   if (strlen (gtk_entry_get_text (GTK_ENTRY(widget))) == 0)
+   if (strlen (gtk_entry_get_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))))) == 0)
    {
-      gtk_entry_set_text (GTK_ENTRY(widget), selection_data->data);
+      gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))), selection_data->data);
       return;
    } else {
-      gtk_entry_append_text (GTK_ENTRY(widget),",");
-      gtk_entry_append_text (GTK_ENTRY(widget),selection_data->data);
+      gtk_entry_append_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))),",");
+      gtk_entry_append_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(widget))),selection_data->data);
    }
 }
 
@@ -340,7 +340,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->to = gtk_entry_new ();
+  msg->to = gnome_entry_new ("balsa_send_to");
   gtk_table_attach (GTK_TABLE (table), msg->to, 1, 2, 0, 1,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -395,7 +395,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->cc = gtk_entry_new ();
+  msg->cc = gnome_entry_new ("balsa_send_cc");
   gtk_table_attach (GTK_TABLE (table), msg->cc, 1, 2, 3, 4,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -420,7 +420,7 @@
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5,
 		    GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
 
-  msg->bcc = gtk_entry_new ();
+  msg->bcc = gnome_entry_new ("balsa_send_bcc");
   gtk_table_attach (GTK_TABLE (table), msg->bcc, 1, 2, 4, 5,
 		    GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
 
@@ -608,7 +608,7 @@
 	addr = message->from;
 
       tmp = address_to_gchar (addr);
-      gtk_entry_set_text (GTK_ENTRY (msg->to), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->to))), tmp);
       g_free (tmp);
     }
     
@@ -687,17 +687,17 @@
 
     if (message->to_list) {
       tmp = make_string_from_list (message->to_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->to), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->to))), tmp);
       g_free (tmp);
     }
     if (message->cc_list) {
       tmp = make_string_from_list (message->cc_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->cc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
       g_free (tmp);
     }
     if (message->bcc_list) {
       tmp = make_string_from_list (message->bcc_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->bcc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->bcc))), tmp);
       g_free (tmp);
     }
     if (message->subject)
@@ -709,15 +709,15 @@
       gchar *tmp;
 
       tmp = make_string_from_list (message->to_list);
-      gtk_entry_set_text (GTK_ENTRY (msg->cc), tmp);
+      gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
       g_free (tmp);
 
       if (message->cc_list)
 	{
-	  gtk_entry_append_text (GTK_ENTRY (msg->cc), ", ");
+	  gtk_entry_append_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), ", ");
 
 	  tmp = make_string_from_list (message->cc_list);
-	  gtk_entry_append_text (GTK_ENTRY (msg->cc), tmp);
+	  gtk_entry_append_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(msg->cc))), tmp);
 	  g_free (tmp);
 	}
     }
@@ -820,7 +820,7 @@
   Body *body;
   gchar *tmp;
 
-  tmp = gtk_entry_get_text (GTK_ENTRY (bsmsg->to));
+  tmp = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to))));
   {
     size_t len;
     len = strlen (tmp);
@@ -849,9 +849,9 @@
   message->from->mailbox = g_strdup (balsa_app.address->mailbox);
   message->subject = g_strdup (gtk_entry_get_text (GTK_ENTRY (bsmsg->subject)));
 
-  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->to)));
-  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->cc)));
-  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->bcc)));
+  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to)))));
+  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->cc)))));
+  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->bcc)))));
   
   tmp = gtk_entry_get_text (GTK_ENTRY(GTK_COMBO(bsmsg->fcc)->entry));
   message->fcc_mailbox = NULL;
@@ -932,7 +932,7 @@
   Body *body;
   gchar *tmp;
 
-  tmp = gtk_entry_get_text (GTK_ENTRY (bsmsg->to));
+  tmp = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to))));
   {
     size_t len;
     len = strlen (tmp);
@@ -961,9 +961,9 @@
   message->from->mailbox = g_strdup (balsa_app.address->mailbox);
   message->subject = g_strdup (gtk_entry_get_text (GTK_ENTRY (bsmsg->subject)));
 
-  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->to)));
-  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->cc)));
-  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (bsmsg->bcc)));
+  message->to_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->to)))));
+  message->cc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->cc)))));
+  message->bcc_list = make_list_from_string (gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry(GNOME_ENTRY(bsmsg->bcc)))));
   
   message->reply_to = address_new ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]