Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypw committed Dec 25, 2024
1 parent cc2f607 commit 5939f56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Dialogs/PreferencesDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public class Scratch.Dialogs.Preferences : Granite.Dialog {
main_box.add (stackswitcher);
main_box.add (stack);

plugins.hook_preferences_dialog (this);
plugins.hook_preferences_dialog (this); // Unused?

if (plugins.get_n_plugins () > 0) {
var pbox = plugins.get_view ();
Expand Down
5 changes: 4 additions & 1 deletion src/Services/PluginManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ namespace Scratch.Services {

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

0 comments on commit 5939f56

Please sign in to comment.