Remove most of the remaining workarounds for earlier GTK versions.

This commit is contained in:
Michael James Gratton 2017-10-04 17:43:18 +11:00
parent 592a5265a9
commit bd7f2d1d4c
3 changed files with 5 additions and 45 deletions

View file

@ -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();

View file

@ -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]

View file

@ -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;
}