Skip to content

Commit

Permalink
fix(composer): set the editor as the focused widget (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Mar 15, 2024
1 parent 54feaca commit a1cb7ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Dialogs/Composer/Dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public class Tuba.Dialogs.Compose : Adw.Dialog {
);
p_edit.bind_property ("can-publish", p_poll, "can-publish", GLib.BindingFlags.SYNC_CREATE);

p_edit.editor_grab_focus ();
this.focus_widget = p_edit.editor;
}

private void setup_pages (ComposerPage[] pages) {
Expand Down
6 changes: 1 addition & 5 deletions src/Dialogs/Composer/EditorPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,9 @@ public class Tuba.EditorPage : ComposerPage {
builder.add_string_value (status.sensitive ? status.spoiler_text : "");
}

protected GtkSource.View editor;
public GtkSource.View editor;
protected Gtk.Label char_counter;

public void editor_grab_focus () {
editor.grab_focus ();
}

#if LIBSPELLING
protected Spelling.TextBufferAdapter adapter;
private void update_spelling_settings () {
Expand Down

0 comments on commit a1cb7ec

Please sign in to comment.