[geary] Remove most of the remaining workarounds for earlier GTK versions.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Remove most of the remaining workarounds for earlier GTK versions.
- Date: Tue, 10 Oct 2017 21:33:35 +0000 (UTC)
commit bd7f2d1d4ca37348f7b9f03a6f927798a71ad1b6
Author: Michael James Gratton <mike vee net>
Date: Wed Oct 4 17:43:18 2017 +1100
Remove most of the remaining workarounds for earlier GTK versions.
src/client/components/main-window.vala | 5 ---
src/client/composer/composer-link-popover.vala | 9 ++----
ui/geary.css | 36 +----------------------
3 files changed, 5 insertions(+), 45 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 165e6c4..d017107 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -58,11 +58,6 @@ public class MainWindow : Gtk.ApplicationWindow {
public MainWindow(GearyApplication application) {
Object(application: application);
- // GTK+ 3.14 (and others?) ignores this property in the UI
- // file, so set it explicitly here to avoid having a menubar
- // appear when the desktop shell does not show the app menu
- this.show_menubar = false;
-
load_config(application.config);
restore_saved_window_state();
diff --git a/src/client/composer/composer-link-popover.vala b/src/client/composer/composer-link-popover.vala
index 26fb86a..b1692b5 100644
--- a/src/client/composer/composer-link-popover.vala
+++ b/src/client/composer/composer-link-popover.vala
@@ -72,8 +72,7 @@ public class ComposerLinkPopover : Gtk.Popover {
public ComposerLinkPopover(Type type) {
- // GTK_ 3.18: Re-enable this
- //set_default_widget(this.url);
+ set_default_widget(this.url);
set_focus_child(this.url);
switch (type) {
case Type.NEW_LINK:
@@ -174,15 +173,13 @@ public class ComposerLinkPopover : Gtk.Popover {
[GtkCallback]
private void on_activate_popover() {
link_activate();
- // GTK+ 3.22/4: Change change this to popdown()
- hide();
+ popdown();
}
[GtkCallback]
private void on_delete_clicked() {
link_delete();
- // GTK+ 3.22/4: Change change this to popdown()
- hide();
+ popdown();
}
[GtkCallback]
diff --git a/ui/geary.css b/ui/geary.css
index 5e5bd5e..cfeb72d 100644
--- a/ui/geary.css
+++ b/ui/geary.css
@@ -1,42 +1,29 @@
/*
* Copyright 2016 Software Freedom Conservancy Inc.
- * Copyright 2016 Michael Gratton <mike vee net>
+ * Copyright 2016, 2017 Michael Gratton <mike vee net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-/*
- * Since GTK+ 3.20 introduced some significant breaking changes to CSS
- * node names for styling GTK+ widgets, we need to duplicate selectors
- * that either either refer to a widget by node name (e.g. "GtkLabel"
- * vs "label"), or that referrs to any child nodes introduced by 3.20
- * (e.g. "frame > border").
- */
-
-.geary-folder-frame, /* GTK < 3.20 */
.geary-folder-frame > border {
border-left-width: 0;
border-top-width: 0;
border-right-width: 0;
}
-.geary-conversation-frame, /* GTK < 3.20 */
.geary-conversation-frame > border {
border-left-width: 0;
border-top-width: 0;
border-right-width: 0;
}
/* For 3-pane mode only */
-.geary-sidebar-pane-separator.vertical .conversation-frame, /* GTK < 3.20 */
.geary-sidebar-pane-separator.vertical .conversation-frame > border {
border-bottom-width: 0;
}
-.geary-composer-box, /* GTK < 3.20 */
.geary-composer-box > border {
border-width: 0px;
}
-.geary-composer-body, /* GTK < 3.20 */
.geary-composer-body > border {
border-left-width: 0;
border-right-width: 0;
@@ -54,14 +41,12 @@
/* FolderPopover */
-.list-row.geary-folder-popover-list-row, /* GTK < 3.20 */
row.geary-folder-popover-list-row {
padding: 6px;
border-color: @borders;
border-style: groove;
border-bottom-width: 1px;
}
-.list-row.geary-folder-popover-list-row > GtkLabel, /* GTK < 3.20 */
row.geary-folder-popover-list-row > label {
color: @theme_text_color;
}
@@ -71,7 +56,6 @@ row.geary-folder-popover-list-row > label {
.conversation-listbox {
padding: 18px;
}
-.conversation-listbox > .list-row, /* GTK < 3.20 */
.conversation-listbox > row {
margin: 0;
border: 1px solid @borders;
@@ -80,16 +64,13 @@ row.geary-folder-popover-list-row > label {
box-shadow: 0 4px 8px 1px rgba(0,0,0,0.4);
transition: margin 0.1s;
}
-.conversation-listbox > .list-row > GtkBox, /* GTK < 3.20 */
.conversation-listbox > row > box {
background: @theme_base_color;
transition: background 0.25s;
}
-.conversation-listbox > .list-row:hover > GtkBox, /* GTK < 3.20 */
.conversation-listbox > row:hover > box {
background: shade(@theme_base_color, 0.96);
}
-.conversation-listbox > .list-row.geary-expanded, /* GTK < 3.20 */
.conversation-listbox > row.geary-expanded {
margin-bottom: 6px;
border-bottom-width: 1px;
@@ -98,14 +79,12 @@ row.geary-folder-popover-list-row > label {
color: @theme_selected_fg_color;
background: @theme_selected_bg_color;
}
-.conversation-listbox > .list-row.geary-last, /* GTK < 3.20 */
.conversation-listbox > row.geary-last {
margin-bottom: 0;
}
/* ConversationEmail */
-.geary-unread, ConversationMessage, /* GTK < 3.20 */
.geary-unread grid.geary-message-summary {
border-color: @theme_selected_bg_color;
transition: border 0.25s;
@@ -113,7 +92,6 @@ row.geary-folder-popover-list-row > label {
/* ConversationMessage */
-ConversationMessage, /* GTK < 3.20 */
grid.geary-message-summary {
border-top: 4px solid transparent;
padding: 12px;
@@ -121,44 +99,36 @@ grid.geary-message-summary {
transition: border 4s;
}
-.geary-headers GtkLabel, /* GTK < 3.20 */
.geary-headers label {
margin: 0;
padding: 1px;
}
-.geary-headers GtkLabel.geary-header, /* GTK < 3.20 */
.geary-headers label.geary-header {
padding-right: 6px;
}
-.geary-headers GtkFlowBox > *, /* GTK < 3.20 */
.geary-headers flowboxchild {
margin: 0;
padding: 1px;
}
-.geary-headers GtkFlowBox > * GtkLabel, /* GTK < 3.20 */
.geary-headers flowboxchild label {
margin: 0;
padding: 0;
}
-.geary-headers GtkLabel.geary-from, /* GTK < 3.20 */
.geary-headers label.geary-from {
font-weight: bold;
}
-.geary-header-value > *:active, /* GTK < 3.20 */
.geary-header-value > flowboxchild:active {
background: mix(@theme_base_color, @theme_bg_color, 0.5);
}
-.geary-header-value > *:hover, /* GTK < 3.20 */
.geary-header-value > flowboxchild:hover {
background: @theme_base_color;
}
-.geary-header-value > * GtkLabel.dim-label, /* GTK < 3.20 */
.geary-header-value > flowboxchild label.dim-label {
- padding-left: 6px; /* Would be margin-left, but GTK 3.14 doesn't like it */
+ margin-left: 6px;
}
.geary-submessages .geary-message {
@@ -167,7 +137,6 @@ grid.geary-message-summary {
/* Composer */
-.geary-composer-embed GtkHeaderBar, /* GTK < 3.20 */
.geary-composer-embed headerbar {
border-top: 1px solid @borders;
border-radius: 0px;
@@ -175,7 +144,6 @@ grid.geary-message-summary {
/* EmptyPlaceholder */
-.geary-empty-placeholder > GtkImage, /* GTK < 3.20 */
.geary-empty-placeholder > image {
margin-bottom: 12px;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]