-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
592 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<interface> | ||
<requires lib="gtk" version="4.0" /> | ||
<requires lib="libadwaita" version="1.0" /> | ||
<object class="GtkAdjustment" id="hour_adjustment"> | ||
<property name="lower">0</property> | ||
<property name="upper">23</property> | ||
<property name="step_increment">1</property> | ||
<property name="page_increment">1</property> | ||
</object> | ||
<object class="GtkAdjustment" id="minutes_adjustment"> | ||
<property name="lower">0</property> | ||
<property name="upper">59</property> | ||
<property name="step_increment">1</property> | ||
<property name="page_increment">1</property> | ||
</object> | ||
<object class="GtkAdjustment" id="seconds_adjustment"> | ||
<property name="lower">0</property> | ||
<property name="upper">59</property> | ||
<property name="step_increment">1</property> | ||
<property name="page_increment">1</property> | ||
</object> | ||
<template class="TubaDialogsSchedule" parent="AdwDialog"> | ||
<property name="content_width">500</property> | ||
<property name="content_height">600</property> | ||
<property name="width_request">360</property> | ||
<property name="height_request">200</property> | ||
<!-- translators: window title --> | ||
<property name="title" translatable="yes">Schedule Date and Time Picker</property> | ||
|
||
<child> | ||
<object class="AdwToolbarView"> | ||
<child type="top"> | ||
<object class="AdwHeaderBar"> | ||
<property name="show_end_title_buttons">0</property> | ||
<property name="show_start_title_buttons">0</property> | ||
|
||
<child type="start"> | ||
<object class="GtkButton"> | ||
<property name="label" translatable="yes">Cancel</property> | ||
<signal name="clicked" handler="on_exit" swapped="no" /> | ||
</object> | ||
</child> | ||
<child type="end"> | ||
<object class="GtkButton" id="schedule_button"> | ||
<!-- translators: Leave & as is, it gets converted to & --> | ||
<property name="label" translatable="yes">Schedule & Publish</property> | ||
<signal name="clicked" handler="on_schedule" swapped="no" /> | ||
<style> | ||
<class name="suggested-action" /> | ||
</style> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
|
||
<property name="content"> | ||
<object class="GtkScrolledWindow"> | ||
<property name="hexpand">1</property> | ||
<property name="vexpand">1</property> | ||
<child> | ||
<object class="AdwClamp"> | ||
<property name="valign">start</property> | ||
<property name="tightening-threshold">100</property> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="orientation">vertical</property> | ||
<property name="margin-top">6</property> | ||
<property name="margin-bottom">24</property> | ||
<property name="spacing">24</property> | ||
<child> | ||
<object class="AdwPreferencesGroup"> | ||
<!-- translators: Title used for calendar date picking --> | ||
<property name="title" translatable="yes">Date</property> | ||
<child> | ||
<object class="GtkListBoxRow"> | ||
<property name="activatable">false</property> | ||
<style> | ||
<class name="card" /> | ||
</style> | ||
<child> | ||
<object class="GtkCalendar" id="calendar"> | ||
<property name="margin-top">6</property> | ||
<property name="margin-bottom">6</property> | ||
<property name="margin-start">6</property> | ||
<property name="margin-end">6</property> | ||
<property name="vexpand">1</property> | ||
<property name="hexpand">1</property> | ||
<signal name="day-selected" handler="validate" /> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="AdwPreferencesGroup"> | ||
<!-- translators: Title used for time picking --> | ||
<property name="title" translatable="yes">Time</property> | ||
<child> | ||
<object class="AdwSpinRow" id="hours_spin_row"> | ||
<!-- translators: Label on an hour picker --> | ||
<property name="title" translatable="yes">Hour</property> | ||
<property name="text">0</property> | ||
<property name="adjustment">hour_adjustment</property> | ||
<property name="value">0</property> | ||
<signal name="notify::value" handler="validate" /> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="AdwSpinRow" id="minutes_spin_row"> | ||
<!-- translators: Label on an minute picker --> | ||
<property name="title" translatable="yes">Minute</property> | ||
<property name="text">0</property> | ||
<property name="adjustment">minutes_adjustment</property> | ||
<property name="value">0</property> | ||
<signal name="notify::value" handler="validate" /> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="AdwSpinRow" id="seconds_spin_row"> | ||
<!-- translators: Label on an second picker --> | ||
<property name="title" translatable="yes">Second</property> | ||
<property name="text">0</property> | ||
<property name="adjustment">seconds_adjustment</property> | ||
<property name="value">0</property> | ||
<signal name="notify::value" handler="validate" /> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="AdwComboRow" id="timezone_combo_row"> | ||
<property name="title" translatable="yes">Timezone</property> | ||
<signal name="notify::selected" handler="validate" /> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</property> | ||
</object> | ||
</child> | ||
</template> | ||
</interface> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
public class Tuba.API.ScheduledStatus : Entity, Widgetizable { | ||
// NOTE: Don't forget to update in the year 3000 | ||
public const int DRAFT_YEAR = 2000 + 3000; | ||
|
||
public class Params : Entity { | ||
public class Poll : Entity { | ||
public Gee.ArrayList<string> options { get; set; default=new Gee.ArrayList <string> (); } | ||
public int64 expires_in { get; set; default=0; } | ||
public bool multiple { get; set; default=false; } | ||
public bool hide_totals { get; set; default=false; } | ||
|
||
public override Type deserialize_array_type (string prop) { | ||
switch (prop) { | ||
case "options": | ||
return Type.STRING; | ||
} | ||
|
||
return base.deserialize_array_type (prop); | ||
} | ||
} | ||
|
||
public string text { get; set; } | ||
public Poll? poll { get; set; } | ||
public Gee.ArrayList<string>? media_ids { get; set; } | ||
public bool sensitive { get; set; default=false; } | ||
public string? spoiler_text { get; set; } | ||
public string visibility { get; set; } | ||
public string? language { get; set; } | ||
public string? in_reply_to_id { get; set; } | ||
|
||
public override Type deserialize_array_type (string prop) { | ||
switch (prop) { | ||
case "media-ids": | ||
return Type.STRING; | ||
} | ||
|
||
return base.deserialize_array_type (prop); | ||
} | ||
} | ||
|
||
public string id { get; set; } | ||
public string scheduled_at { get; set; } | ||
public Gee.ArrayList<API.Attachment>? media_attachments { get; set; default = null; } | ||
public Params? props { get; set; } | ||
|
||
public override Type deserialize_array_type (string prop) { | ||
switch (prop) { | ||
case "media-attachments": | ||
return typeof (API.Attachment); | ||
} | ||
|
||
return base.deserialize_array_type (prop); | ||
} | ||
|
||
public override Gtk.Widget to_widget () { | ||
return new Widgets.ScheduledStatus (this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.