[evolution/wip/webkit-composer: 140/372] Fix runtime warnings and widget layouting
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 140/372] Fix runtime warnings and widget layouting
- Date: Thu, 6 Feb 2014 11:35:16 +0000 (UTC)
commit ce00168fb4cf32b8f241cde37857f15933e4917d
Author: Dan Vrátil <dvratil redhat com>
Date: Wed Aug 29 15:43:41 2012 +0200
Fix runtime warnings and widget layouting
composer/e-composer-actions.c | 6 +++---
composer/e-composer-private.c | 18 ++++++++++--------
plugins/external-editor/external-editor.c | 6 ++++--
3 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 7f9a13f..fca3acc 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -513,17 +513,17 @@ e_composer_actions_init (EMsgComposer *composer)
/* FIXME WEBKIT Make sure this works */
g_object_bind_property (
editor_widget, "editable",
- e_editor_get_action (editor, "edit"), "sensitive",
+ e_editor_get_action (editor, "edit-menu"), "sensitive",
G_BINDING_SYNC_CREATE);
g_object_bind_property (
editor_widget, "editable",
- e_editor_get_action (editor, "format"), "sensitive",
+ e_editor_get_action (editor, "format-menu"), "sensitive",
G_BINDING_SYNC_CREATE);
g_object_bind_property (
editor_widget, "editable",
- e_editor_get_action (editor, "insert"), "sensitive",
+ e_editor_get_action (editor, "insert-menu"), "sensitive",
G_BINDING_SYNC_CREATE);
#if defined (HAVE_NSS)
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 03bda8e..96fa4f0 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -242,17 +242,17 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->focus_tracker = focus_tracker;
container = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_hexpand (container, TRUE);
+ gtk_widget_show (container);
e_editor_window_pack_above (E_EDITOR_WINDOW (composer), container);
/* Construct the activity bar. */
-
widget = e_activity_bar_new ();
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
priv->activity_bar = g_object_ref (widget);
/* EActivityBar controls its own visibility. */
/* Construct the alert bar for errors. */
-
widget = e_alert_bar_new ();
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
priv->alert_bar = g_object_ref (widget);
@@ -262,8 +262,8 @@ e_composer_private_constructed (EMsgComposer *composer)
widget = e_composer_header_table_new (client_cache);
gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- gtk_box_reorder_child (GTK_BOX (container), widget, 2);
+ gtk_widget_set_hexpand (widget, TRUE);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
priv->header_table = g_object_ref (widget);
gtk_widget_show (widget);
@@ -315,14 +315,16 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->gallery_icon_view = g_object_ref (widget);
g_free (gallery_path);
- g_signal_connect (
- composer, "notify::html-mode",
- G_CALLBACK (composer_update_gallery_visibility), NULL);
-
+ g_signal_connect_swapped (
+ editor_widget, "notify::mode",
+ G_CALLBACK (composer_update_gallery_visibility), composer);
g_signal_connect_swapped (
ACTION (PICTURE_GALLERY), "toggled",
G_CALLBACK (composer_update_gallery_visibility), composer);
+ /* Initial sync */
+ composer_update_gallery_visibility (composer);
+
/* XXX What is this for? */
/* FIXME WEBKIT Yes, what is this for?
g_object_set_data (G_OBJECT (composer), "vbox", editor->vbox);
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 9f95f5e..c9c13cd 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -151,17 +151,19 @@ enable_disable_composer (EMsgComposer *composer,
gboolean enable)
{
EEditor *editor;
+ EEditorWidget *editor_widget;
GtkAction *action;
GtkActionGroup *action_group;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
if (enable) {
- webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor), TRUE);
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), TRUE);
} else {
- webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor), FALSE);
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
}
action = E_EDITOR_ACTION_EDIT_MENU (editor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]