evolution r34990 - in branches/mbarnes-composer: calendar/gui mail



Author: mbarnes
Date: Mon Feb 11 05:48:45 2008
New Revision: 34990
URL: http://svn.gnome.org/viewvc/evolution?rev=34990&view=rev

Log:
Get the signature editor up and running.  Still a bit buggy, but this is
the first demonstration of the new editor widget in Evolution!


Modified:
   branches/mbarnes-composer/calendar/gui/Makefile.am
   branches/mbarnes-composer/mail/em-composer-prefs.c
   branches/mbarnes-composer/mail/mail-signature-editor.c

Modified: branches/mbarnes-composer/calendar/gui/Makefile.am
==============================================================================
--- branches/mbarnes-composer/calendar/gui/Makefile.am	(original)
+++ branches/mbarnes-composer/calendar/gui/Makefile.am	Mon Feb 11 05:48:45 2008
@@ -20,6 +20,8 @@
                 $(top_srcdir)/calendar/idl/evolution-calendar.idl
 $(CALENDAR_IDL_GENERATED_C): $(CALENDAR_IDL_GENERATED_H)
 
+IDL_GENERATED = $(CALENDAR_IDL_GENERATED)
+
 # The marshallers
 MARSHAL_GENERATED = e-calendar-marshal.c e-calendar-marshal.h
 @EVO_MARSHAL_RULE@

Modified: branches/mbarnes-composer/mail/em-composer-prefs.c
==============================================================================
--- branches/mbarnes-composer/mail/em-composer-prefs.c	(original)
+++ branches/mbarnes-composer/mail/em-composer-prefs.c	Mon Feb 11 05:48:45 2008
@@ -298,16 +298,23 @@
 	gtk_tree_model_get (model, &iter, 1, &sig, -1);
 
 	if (!sig->script) {
+		GtkWidget *editor;
+
 		/* normal signature */
 		if (!sig->filename || *sig->filename == '\0') {
 			g_free (sig->filename);
 			sig->filename = g_strdup (_("Unnamed"));
 		}
 
+		editor = e_signature_editor_new ();
+		e_signature_editor_set_signature (editor, sig);
+
 		parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
-		parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+		if (GTK_WIDGET_TOPLEVEL (parent))
+			gtk_window_set_transient_for (
+				GTK_WINDOW (editor), GTK_WINDOW (parent));
 
-		mail_signature_editor (sig, (GtkWindow *) parent, FALSE);
+		gtk_widget_show (editor);
 	} else {
 		/* signature script */
 		GtkWidget *entry;
@@ -327,10 +334,11 @@
 void
 em_composer_prefs_new_signature (GtkWindow *parent, gboolean html)
 {
-	ESignature *sig;
+	GtkWidget *editor;
 
-	sig = mail_config_signature_new (NULL, FALSE, html);
-	mail_signature_editor (sig, parent, TRUE);
+	editor = e_signature_editor_new ();
+	gtk_window_set_transient_for (GTK_WINDOW (editor), parent);
+	gtk_widget_show (editor);
 }
 
 static void

Modified: branches/mbarnes-composer/mail/mail-signature-editor.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-signature-editor.c	(original)
+++ branches/mbarnes-composer/mail/mail-signature-editor.c	Mon Feb 11 05:48:45 2008
@@ -189,7 +189,7 @@
 	{ "save-and-close",
 	  GTK_STOCK_SAVE,
 	  N_("_Save and Close"),
-	  "<Control><Enter>",
+	  "<Control>Return",
 	  NULL,
 	  G_CALLBACK (action_save_and_close_cb) },
 
@@ -340,6 +340,8 @@
 	widget = gtk_hbox_new (FALSE, 6);
 	gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
 	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	/* Position 2 should be between the main and style toolbars. */
+	gtk_box_reorder_child (GTK_BOX (vbox), widget, 2);
 	gtk_widget_show (widget);
 	container = widget;
 



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