Skip to content

Commit

Permalink
Revert "feat(composer): focus picker (GeopJr#1101)"
Browse files Browse the repository at this point in the history
This reverts commit ed3f9f9.
  • Loading branch information
rmader committed Sep 10, 2024
1 parent ee4381d commit cbeda9b
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 581 deletions.
1 change: 0 additions & 1 deletion data/gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/tuba-radio-checked-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/tuba-mail-unread-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/tuba-starred-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/tuba-camera-focus-symbolic.svg</file>
<!-- <file preprocess="xml-stripblanks">icons/scalable/actions/tuba-language-symbolic.svg</file> -->

<file>gtk/help-overlay.ui</file>
Expand Down
2 changes: 0 additions & 2 deletions data/icons/scalable/actions/tuba-camera-focus-symbolic.svg

This file was deleted.

10 changes: 0 additions & 10 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,3 @@ popover.mini-profile > contents {
.report-status:hover .attachment-picture {
filter: none;
}

.focuspickerdialog .last-row {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

.focuspickerdialog .focus-picker {
border-radius: 9999px;
padding: 4px;
}
9 changes: 0 additions & 9 deletions src/API/Attachment.vala
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
public class Tuba.API.Attachment : Entity, Widgetizable {
public class Meta : Entity {
public class Focus : Entity {
public float x { get; set; }
public float y { get; set; }
}

public Focus? focus { get; set; }
}

public string id { get; set; }
public string kind { get; set; default = "unknown"; }
public string url { get; set; }
public string? description { get; set; }
public Meta? meta { get; set; }
public string? blurhash { get; set; default=null; }
private string? t_preview_url { get; set; }
public string? preview_url {
Expand Down
11 changes: 2 additions & 9 deletions src/Dialogs/Composer/AttachmentsPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,10 @@ public class Tuba.AttachmentsPage : ComposerPage {

for (var i = 0; i < attachments.get_n_items (); i++) {
var attachment = attachments.get_item (i) as API.Attachment;
var page_attachment = ((AttachmentsPageAttachment) list.get_row_at_index (i).child);
var attachment_page_attachment_alt = page_attachment.alt_text;
var attachment_page_attachment_alt = ((AttachmentsPageAttachment) list.get_row_at_index (i).child).alt_text;

attachment.description = attachment_page_attachment_alt;

string? focus = null;
if (attachment.meta != null && attachment.meta.focus != null) {
focus = "%.2f,%.2f".printf (page_attachment.pos_x, page_attachment.pos_y);
}

status.add_media (attachment.id, attachment.description, focus);
status.add_media (attachment.id, attachment.description);
status.media_attachments.add (attachment);
}
status.sensitive = media_sensitive;
Expand Down
Loading

0 comments on commit cbeda9b

Please sign in to comment.