Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1372,10 +1372,9 @@ namespace Scratch {
}

private void action_go_to () {
toolbar.format_bar.line_menubutton.active = true;
toolbar.format_bar.activate_line_menubutton ();
}


private void action_to_lower_case () {
var doc = document_view.current_document;
if (doc == null) {
Expand Down
10 changes: 7 additions & 3 deletions src/Widgets/FormatBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
public class Code.FormatBar : Gtk.Box {
public bool tab_style_set_by_editor_config { get; set; default = false; }
public bool tab_width_set_by_editor_config { get; set; default = false; }
public FormatButton line_menubutton { get; private set;}
public Gtk.InfoBar editorconfig_infobar { get; set construct; }
public Gtk.Box tab_box { get; set construct; }
public Gtk.SpinButton width_spinbutton { get; set construct; }

private FormatButton line_menubutton;
private FormatButton lang_menubutton;
private FormatButton tab_menubutton;
private Granite.SwitchModelButton space_tab_modelbutton;
Expand Down Expand Up @@ -70,6 +70,10 @@ public class Code.FormatBar : Gtk.Box {
create_line_popover ();
}

public void activate_line_menubutton () {
line_menubutton.active = true;
}

private void create_language_popover () {
lang_selection_listbox = new Gtk.ListBox ();
lang_selection_listbox.selection_mode = Gtk.SelectionMode.SINGLE;
Expand Down Expand Up @@ -317,7 +321,7 @@ public class Code.FormatBar : Gtk.Box {
}
}

public class FormatButton : Gtk.MenuButton {
private class FormatButton : Gtk.MenuButton {
public unowned string text {
set {
label_widget.label = "<span font-features='tnum'>%s</span>".printf (value);
Expand Down Expand Up @@ -355,7 +359,7 @@ public class Code.FormatBar : Gtk.Box {
}
}

public class LangEntry : Gtk.ListBoxRow {
private class LangEntry : Gtk.ListBoxRow {
public string? lang_id { get; construct; }
public string lang_name { get; construct; }
public unowned SList<Gtk.RadioButton> group { get; construct; }
Expand Down