[geary] Minor ComposerWidget code cleanup.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Minor ComposerWidget code cleanup.
- Date: Mon, 3 Oct 2016 23:48:02 +0000 (UTC)
commit bb517365afb044fb911ce2568e331ac9987dbf0b
Author: Michael James Gratton <mike vee net>
Date: Thu Sep 29 14:57:50 2016 +1000
Minor ComposerWidget code cleanup.
src/client/composer/composer-widget.vala | 33 ++++++++++++++---------------
1 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index e4f3cbd..82f6dd6 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -245,7 +245,7 @@ public class ComposerWidget : Gtk.EventBox {
owned get { return get_html(); }
set {
this.body_html = value;
- this.editor.load_string(HTML_BODY, "text/html", "UTF8", "");
+ this.editor.load_string(HTML_BODY, "text/html", "UTF-8", "");
}
}
@@ -1613,7 +1613,6 @@ public class ComposerWidget : Gtk.EventBox {
box.pack_start(remove_button, false, false);
remove_button.clicked.connect(() => remove_attachment(target, box));
-
show_attachments();
} else {
this.inline_files.add(target);
@@ -1903,20 +1902,6 @@ public class ComposerWidget : Gtk.EventBox {
}
}
- private void on_insert_link(SimpleAction action, Variant? param) {
- link_dialog("http://";);
- }
-
- private static void on_link_clicked(WebKit.DOM.Element element, WebKit.DOM.Event event,
- ComposerWidget composer) {
- try {
- composer.editor.get_dom_document().get_default_view().get_selection().
- select_all_children(element);
- } catch (Error e) {
- debug("Error selecting link: %s", e.message);
- }
- }
-
private void link_dialog(string link) {
Gtk.Dialog dialog = new Gtk.Dialog();
bool existing_link = false;
@@ -2399,7 +2384,7 @@ public class ComposerWidget : Gtk.EventBox {
inspector.close();
return false;
});
-
+
unowned WebKit.WebView r = inspector_view;
return r;
}
@@ -2456,6 +2441,20 @@ public class ComposerWidget : Gtk.EventBox {
dialog.destroy();
}
+ private void on_insert_link(SimpleAction action, Variant? param) {
+ link_dialog("http://";);
+ }
+
+ private static void on_link_clicked(WebKit.DOM.Element element, WebKit.DOM.Event event,
+ ComposerWidget composer) {
+ try {
+ composer.editor.get_dom_document().get_default_view().get_selection().
+ select_all_children(element);
+ } catch (Error e) {
+ debug("Error selecting link: %s", e.message);
+ }
+ }
+
private void on_resource_request_starting(WebKit.WebFrame web_frame,
WebKit.WebResource web_resource,
WebKit.NetworkRequest request,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]