File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1621,9 +1621,10 @@ void dt_gui_favorite_presets_menu_show(GtkWidget *w)
16211621}
16221622
16231623// Comparator function to sort menu items alphabetically by their labels in reverse order
1624- static gint _compare_menu_items (GtkMenuItem * a , GtkMenuItem * b )
1624+ static gint _compare_menu_items (gpointer a , gpointer b )
16251625{
1626- return - g_utf8_collate (gtk_menu_item_get_label (a ), gtk_menu_item_get_label (b ));
1626+ int d = g_object_get_data (a , "builtin" ) - g_object_get_data (b , "builtin" );
1627+ return d ? d : - g_utf8_collate (gtk_menu_item_get_label (a ), gtk_menu_item_get_label (b ));
16271628}
16281629
16291630// Function to sort GtkMenuShell items
@@ -1801,6 +1802,7 @@ GtkMenu *dt_gui_presets_popup_menu_show_for_module(dt_iop_module_t *module)
18011802 else
18021803 label = g_strdup (* s );
18031804 mi = gtk_check_menu_item_new_with_label (label );
1805+ g_object_set_data (G_OBJECT (mi ), "builtin" , GINT_TO_POINTER (chk_writeprotect ));
18041806 dt_gui_add_class (mi , "dt_transparent_background" );
18051807 g_free (label );
18061808
You can’t perform that action at this time.
0 commit comments