Fix compilation for Gtk3.14 and older setups. Bug 775452
This commit is contained in:
parent
b582b40f59
commit
d4acac034d
6 changed files with 22 additions and 13 deletions
|
|
@ -145,7 +145,12 @@ public class MainWindow : Gtk.ApplicationWindow {
|
|||
else
|
||||
debug("Error parsing css on lines %u-%u: %s", start, end, error.message);
|
||||
});
|
||||
provider.load_from_resource(@"/org/gnome/Geary/geary.css");
|
||||
try {
|
||||
File file = File.new_for_uri(@"resource:///org/gnome/Geary/geary.css");
|
||||
provider.load_from_file(file);
|
||||
} catch (Error e) {
|
||||
error("Could not load CSS: %s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
private void setup_layout(Configuration config) {
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@ public class SearchBar : Gtk.SearchBar {
|
|||
search_entry.search_changed.connect(() => {
|
||||
search_text_changed(search_entry.text);
|
||||
});
|
||||
search_entry.stop_search.connect(() => {
|
||||
search_entry.text = "";
|
||||
});
|
||||
search_entry.activate.connect(() => {
|
||||
search_text_changed(search_entry.text);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -714,6 +714,17 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
}
|
||||
}
|
||||
|
||||
// This code is in a separate method due to https://bugzilla.gnome.org/show_bug.cgi?id=742621
|
||||
// connect_to_draft_manager() is simply for symmetry. When above bug is fixed, this code can
|
||||
// be moved back into open/close methods
|
||||
private void disconnect_from_draft_manager() {
|
||||
this.draft_manager.notify[Geary.App.DraftManager.PROP_DRAFT_STATE]
|
||||
.disconnect(on_draft_state_changed);
|
||||
this.draft_manager.notify[Geary.App.DraftManager.PROP_CURRENT_DRAFT_ID]
|
||||
.disconnect(on_draft_id_changed);
|
||||
this.draft_manager.fatal.disconnect(on_draft_manager_fatal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and opens the composer's draft manager.
|
||||
*/
|
||||
|
|
@ -1433,11 +1444,7 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
if (this.draft_manager == null)
|
||||
return;
|
||||
|
||||
this.draft_manager.notify[Geary.App.DraftManager.PROP_DRAFT_STATE]
|
||||
.disconnect(on_draft_state_changed);
|
||||
this.draft_manager.notify[Geary.App.DraftManager.PROP_CURRENT_DRAFT_ID]
|
||||
.disconnect(on_draft_id_changed);
|
||||
this.draft_manager.fatal.disconnect(on_draft_manager_fatal);
|
||||
disconnect_from_draft_manager();
|
||||
|
||||
// drop ref even if close failed
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class SpellCheckPopover {
|
|||
if (country_name != null)
|
||||
label_text += " (" + country_name + ")";
|
||||
Gtk.Label label = new Gtk.Label(label_text);
|
||||
label.set_xalign(0.0f);
|
||||
GtkUtil.set_label_xalign(label, 0.0f);
|
||||
label.set_size_request(-1, 24);
|
||||
|
||||
box.pack_start(label, false, false);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class ConversationMessage : Gtk.Grid {
|
|||
|
||||
Gtk.Label primary = new Gtk.Label(null);
|
||||
primary.ellipsize = Pango.EllipsizeMode.END;
|
||||
primary.set_xalign(0.0f);
|
||||
GtkUtil.set_label_xalign(primary, 0.0f);
|
||||
primary.get_style_context().add_class(PRIMARY_CLASS);
|
||||
if (type == Type.FROM) {
|
||||
primary.get_style_context().add_class(FROM_CLASS);
|
||||
|
|
@ -70,7 +70,7 @@ public class ConversationMessage : Gtk.Grid {
|
|||
|
||||
Gtk.Label secondary = new Gtk.Label(null);
|
||||
secondary.ellipsize = Pango.EllipsizeMode.END;
|
||||
secondary.set_xalign(0.0f);
|
||||
GtkUtil.set_label_xalign(secondary, 0.0f);
|
||||
secondary.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
|
||||
secondary.set_text(address.address);
|
||||
address_parts.add(secondary);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ private string pretty_print_coarse(CoarseDate coarse_date, ClockFormat clock_for
|
|||
return _("Now");
|
||||
|
||||
case CoarseDate.MINUTES:
|
||||
return ngettext("%dm ago", "%dm ago", (ulong) (diff / TimeSpan.MINUTE)).printf(diff / TimeSpan.MINUTE);
|
||||
return ngettext("%dm ago", "%dm ago", (ulong) (diff / TimeSpan.MINUTE)).printf((int) (diff / TimeSpan.MINUTE));
|
||||
|
||||
case CoarseDate.HOURS:
|
||||
int rounded = (int) Math.round((double) diff / TimeSpan.HOUR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue