merge
This commit is contained in:
commit
32c60e7ffa
@ -28,6 +28,7 @@ before_script:
|
||||
variables:
|
||||
# RUSTFLAGS: "-C link-dead-code"
|
||||
RUST_BACKTRACE: "FULL"
|
||||
CARGO_HOME: $CI_PROJECT_DIR/cargo
|
||||
|
||||
stable:test:
|
||||
# https://hub.docker.com/_/rust/
|
||||
|
||||
@ -10,14 +10,14 @@
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">5</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
@ -51,7 +51,7 @@
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">5</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="date_label">
|
||||
<property name="visible">True</property>
|
||||
@ -164,7 +164,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
@ -172,7 +172,7 @@
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">5</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
@ -260,7 +260,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
@ -269,7 +269,7 @@
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
@ -281,7 +281,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
|
||||
@ -41,14 +41,16 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">25</property>
|
||||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="today_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
@ -102,6 +104,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
@ -155,6 +158,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
@ -208,6 +212,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
@ -255,71 +260,19 @@
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="year_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">This Year</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.5"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="year_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="rest_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Older than a Year</property>
|
||||
<property name="label" translatable="yes">Older</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.5"/>
|
||||
|
||||
@ -5,10 +5,14 @@
|
||||
<object class="GtkBox" id="container">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="cover">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="pixel_size">64</property>
|
||||
<property name="icon_name">image-x-generic-symbolic</property>
|
||||
</object>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="cover">
|
||||
<property name="visible">True</property>
|
||||
@ -77,7 +77,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="spacing">12</property>
|
||||
<child type="center">
|
||||
<object class="GtkLabel" id="description">
|
||||
<property name="visible">True</property>
|
||||
@ -191,7 +191,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">25</property>
|
||||
<property name="padding">24</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
@ -21,9 +21,11 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="margin_bottom">24</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="column_spacing">5</property>
|
||||
<property name="row_spacing">5</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="max_children_per_line">20</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
|
||||
@ -70,7 +70,7 @@ fn build_ui(app: >k::Application) {
|
||||
gtk::StyleContext::add_provider_for_screen(&gdk::Screen::get_default().unwrap(), &provider, 600);
|
||||
// Get the main window
|
||||
let window = gtk::ApplicationWindow::new(app);
|
||||
window.set_default_size(1150, 650);
|
||||
window.set_default_size(1024, 576);
|
||||
|
||||
// Get the headerbar
|
||||
let header = Rc::new(headerbar::Header::default());
|
||||
|
||||
@ -16,7 +16,6 @@ enum ListSplit {
|
||||
Yday,
|
||||
Week,
|
||||
Month,
|
||||
Year,
|
||||
Rest,
|
||||
}
|
||||
|
||||
@ -28,13 +27,11 @@ pub struct EpisodesView {
|
||||
yday_box: gtk::Box,
|
||||
week_box: gtk::Box,
|
||||
month_box: gtk::Box,
|
||||
year_box: gtk::Box,
|
||||
rest_box: gtk::Box,
|
||||
today_list: gtk::ListBox,
|
||||
yday_list: gtk::ListBox,
|
||||
week_list: gtk::ListBox,
|
||||
month_list: gtk::ListBox,
|
||||
year_list: gtk::ListBox,
|
||||
rest_list: gtk::ListBox,
|
||||
}
|
||||
|
||||
@ -47,13 +44,11 @@ impl Default for EpisodesView {
|
||||
let yday_box: gtk::Box = builder.get_object("yday_box").unwrap();
|
||||
let week_box: gtk::Box = builder.get_object("week_box").unwrap();
|
||||
let month_box: gtk::Box = builder.get_object("month_box").unwrap();
|
||||
let year_box: gtk::Box = builder.get_object("year_box").unwrap();
|
||||
let rest_box: gtk::Box = builder.get_object("rest_box").unwrap();
|
||||
let today_list: gtk::ListBox = builder.get_object("today_list").unwrap();
|
||||
let yday_list: gtk::ListBox = builder.get_object("yday_list").unwrap();
|
||||
let week_list: gtk::ListBox = builder.get_object("week_list").unwrap();
|
||||
let month_list: gtk::ListBox = builder.get_object("month_list").unwrap();
|
||||
let year_list: gtk::ListBox = builder.get_object("year_list").unwrap();
|
||||
let rest_list: gtk::ListBox = builder.get_object("rest_list").unwrap();
|
||||
|
||||
EpisodesView {
|
||||
@ -63,13 +58,11 @@ impl Default for EpisodesView {
|
||||
yday_box,
|
||||
week_box,
|
||||
month_box,
|
||||
year_box,
|
||||
rest_box,
|
||||
today_list,
|
||||
yday_list,
|
||||
week_list,
|
||||
month_list,
|
||||
year_list,
|
||||
rest_list,
|
||||
}
|
||||
}
|
||||
@ -98,9 +91,6 @@ impl EpisodesView {
|
||||
ListSplit::Month => {
|
||||
view.month_list.add(&viewep.container);
|
||||
}
|
||||
ListSplit::Year => {
|
||||
view.year_list.add(&viewep.container);
|
||||
}
|
||||
ListSplit::Rest => {
|
||||
view.rest_list.add(&viewep.container);
|
||||
}
|
||||
@ -123,10 +113,6 @@ impl EpisodesView {
|
||||
view.month_box.hide();
|
||||
}
|
||||
|
||||
if view.year_list.get_children().is_empty() {
|
||||
view.year_box.hide();
|
||||
}
|
||||
|
||||
if view.rest_list.get_children().is_empty() {
|
||||
view.rest_box.hide();
|
||||
}
|
||||
@ -152,10 +138,6 @@ impl EpisodesView {
|
||||
return false;
|
||||
}
|
||||
|
||||
if !self.year_list.get_children().is_empty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if !self.rest_list.get_children().is_empty() {
|
||||
return false;
|
||||
}
|
||||
@ -175,8 +157,6 @@ fn split(now: &DateTime<Utc>, epoch: i64) -> ListSplit {
|
||||
ListSplit::Week
|
||||
} else if now.month() == ep.month() && now.year() == ep.year() {
|
||||
ListSplit::Month
|
||||
} else if now.year() == ep.year() {
|
||||
ListSplit::Year
|
||||
} else {
|
||||
ListSplit::Rest
|
||||
}
|
||||
@ -196,7 +176,7 @@ impl Default for EpisodesViewWidget {
|
||||
let container: gtk::Box = builder.get_object("container").unwrap();
|
||||
let image: gtk::Image = builder.get_object("cover").unwrap();
|
||||
let ep = EpisodeWidget::default();
|
||||
container.pack_start(&ep.container, true, true, 5);
|
||||
container.pack_start(&ep.container, true, true, 6);
|
||||
|
||||
EpisodesViewWidget {
|
||||
container,
|
||||
@ -222,7 +202,7 @@ impl EpisodesViewWidget {
|
||||
}
|
||||
|
||||
let ep = EpisodeWidget::new(episode);
|
||||
container.pack_start(&ep.container, true, true, 5);
|
||||
container.pack_start(&ep.container, true, true, 6);
|
||||
|
||||
EpisodesViewWidget {
|
||||
container,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user