Skip to content

Commit 5939f56

Browse files
committed
Add some comments
1 parent cc2f607 commit 5939f56

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Dialogs/PreferencesDialog.vala

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class Scratch.Dialogs.Preferences : Granite.Dialog {
144144
main_box.add (stackswitcher);
145145
main_box.add (stack);
146146

147-
plugins.hook_preferences_dialog (this);
147+
plugins.hook_preferences_dialog (this); // Unused?
148148

149149
if (plugins.get_n_plugins () > 0) {
150150
var pbox = plugins.get_view ();

src/Services/PluginManager.vala

+4-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ namespace Scratch.Services {
162162

163163
// Bind the engine ListModel and use a row factory
164164
list_box.bind_model (engine, get_widget_for_plugin_info);
165-
//Cannot sort a ListModel so sort the ListBox (is there a better way?)
165+
// Cannot sort a ListModel so sort the ListBox (is there a better way?)
166+
// Gtk warns the function will be ignored but it does in fact work, at least
167+
// on initial display. We know the model will not change while the view is used
168+
// In Gtk4 could use SortListModel
166169
list_box.set_sort_func ((r1, r2) => {
167170
return strcmp (
168171
r1.get_child ().get_data<string> ("name"),

0 commit comments

Comments
 (0)