[geary/wip/765516-gtk-widget-conversation-viewer: 207/207] Clean up ComposerEmbed a bit.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/765516-gtk-widget-conversation-viewer: 207/207] Clean up ComposerEmbed a bit.
- Date: Tue, 4 Oct 2016 00:13:48 +0000 (UTC)
commit efeb8c6f11ec0e45ee8a3528451b9cc594cfbddf
Author: Michael James Gratton <mike vee net>
Date: Tue Sep 27 10:30:16 2016 +1000
Clean up ComposerEmbed a bit.
* src/client/composer/composer-widget.vala: Removed uneeded embedded
composer style - we're setting a min size for the composer on the GTK
widget now.
* src/client/composer/composer-embed.vala: Don't bother setting the HTML
CSS class now it is unused. Use Source.REMOVE for callback return
values for clarity.
src/client/composer/composer-embed.vala | 17 +++--------------
src/client/composer/composer-widget.vala | 3 ---
2 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/src/client/composer/composer-embed.vala b/src/client/composer/composer-embed.vala
index ffb62b5..ec89b2a 100644
--- a/src/client/composer/composer-embed.vala
+++ b/src/client/composer/composer-embed.vala
@@ -66,14 +66,9 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
}
private void on_loaded() {
- try {
- composer.editor.get_dom_document().body.get_class_list().add("embedded");
- } catch (Error error) {
- debug("Error setting class of editor: %s", error.message);
- }
Idle.add(() => {
recalc_height();
- return false;
+ return Source.REMOVE;
});
}
@@ -123,12 +118,6 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
disable_scroll_reroute(this);
this.composer.editor_scrolled.get_vscrollbar().show();
- try {
- this.composer.editor.get_dom_document().body.get_class_list().remove("embedded");
- } catch (Error error) {
- debug("Error setting class of editor: %s", error.message);
- }
-
remove(this.composer);
close_container();
}
@@ -206,7 +195,7 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
.query_selector("#message-body").offset_height;
} catch (Error error) {
debug("Error getting height of editor: %s", error.message);
- return false;
+ return Source.REMOVE;
}
if (view_height != inner_view_height || min_height != base_height + MIN_EDITOR_HEIGHT) {
@@ -217,7 +206,7 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
int widget_height = int.max(view_height + base_height - 2, min_height); //? about 2
set_size_request(-1, widget_height);
}
- return false;
+ return Source.REMOVE;
}
private bool on_inner_scroll_event(Gdk.EventScroll event) {
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 1fe6c98..d64f5e3 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -177,9 +177,6 @@ public class ComposerWidget : Gtk.EventBox {
outline: 0px solid transparent;
min-height: 100%;
}
- .embedded #message-body {
- min-height: 200px;
- }
blockquote {
margin-top: 0px;
margin-bottom: 0px;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]